Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used to identify the intended partition? (Choose TWO correct answers.)
Click on the arrows to vote for the correct answer
A. B. C. D. E.CE
In Linux, the /etc/fstab
file is used to define how filesystems should be mounted during the boot process. When mounting a filesystem, an explicit device name or a combination of options can be used to identify the intended partition.
Here are the two options that can be used instead of supplying an explicit device in /etc/fstab
:
e2label
or tune2fs
command. When the filesystem is mounted using the label, the mount command looks up the label in /etc/fstab
to determine the device name and mount options.For example, to mount a filesystem with the label mydata
, the /etc/fstab
entry would look like this:
bashLABEL=mydata /mnt/data ext4 defaults 0 2
blkid
command. When the filesystem is mounted using the UUID, the mount command looks up the UUID in /etc/fstab
to determine the device name and mount options.For example, to mount a filesystem with the UUID 5d5f5e5c-8863-4d28-bf06-7892c83b795f
, the /etc/fstab
entry would look like this:
bashUUID=5d5f5e5c-8863-4d28-bf06-7892c83b795f /mnt/data ext4 defaults 0 2
In summary, the LABEL
and UUID
options can be used instead of supplying an explicit device in /etc/fstab
to identify the intended partition. These options are useful when the device names may change, such as when using removable storage devices or when adding new hard drives to a system.