Is it possible to use UUIDs to mount drives, rather than using these values in fstab?
I have a script which mounts devices, however there is no way to guarantee that the drive labels such as /dev/sda2
will always be the same.
I'm aware I can mount the drive at boot time using this method with fstab
, however in the case of external disks, they may not always be present at boot time.
Best Answer
Yes it's possible, you just use the
UUID
option:Or
Or
The
mount --help
: