logIt Log Around The Clock

Mount with fstab and UUID

Check UUID:

$ blkid
 
/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="46E439E9E439DBBD" LABEL="SYSTEM" TYPE="ntfs"
/dev/sda5: LABEL="DATA" UUID="0686-FAFA" TYPE="vfat"
/dev/sda6: UUID="4ddd1e8c-e2e2-4397-838b-ea953e0a7795" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda7: TYPE="swap" UUID="9be4f92e-4f22-41f4-9aee-1c93f9cdf6ac"
/dev/sda8: UUID="6a969f33-240b-440c-9a43-e68f8b28fd19" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda9: UUID="d7aac664-c177-46aa-be67-40aad4d3f129" TYPE="ext3" SEC_TYPE="ext2"
/dev/sda10: UUID="36cdb4cb-351b-4f47-9c24-64a9e80c826b" TYPE="ext4"

or

$ sudo vol_id -u /dev/sda7
9be4f92e-4f22-41f4-9aee-1c93f9cdf6ac

Put it in /etc/fstab to mount the device at boot.

# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda10 during installation
UUID=36cdb4cb-351b-4f47-9c24-64a9e80c826b /               ext4    relatime,errors=remount-ro 0       1
# /home was on /dev/sda9 during installation
#UUID=d7aac664-c177-46aa-be67-40aad4d3f129 /home           ext3    relatime        0       2
# /home moved to /dev/sda8 using ext4 file system, /apps uses previous /home in /dev/sda9
UUID=6a969f33-240b-440c-9a43-e68f8b28fd19 /home           ext3    relatime        0       2
UUID=d7aac664-c177-46aa-be67-40aad4d3f129 /apps           ext3    relatime        0       2
# swap was on /dev/sda7 during installation
UUID=9be4f92e-4f22-41f4-9aee-1c93f9cdf6ac none            swap sw              0       0
# /dev/sda5
UUID=0686-FAFA  /media/sda5     vfat    defaults,utf8,umask=007,gid=46 0       1

The sixth field <pass>, is used by the fsck program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a <pass> of 1, and other filesystems should have a <pass> of 2.


Leave a Reply