In some versions of Ubuntu. Disks are mounted by UUID. in My machine, /proc/mounts

/dev/disk/by-uuid/UUID / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0


UUID=U-U-I-D  /   ext4  errors=remount-ro        0  1  

But in /etc/mtab

/dev/sda1 / ext4 rw,errors=remount-ro,commit=0 0 0

So is it guaranteed that there will be no UUID in /etc/mtab ?


This is not guaranteed in general. On Ubuntu, I think it's always true in typical situations, but there may be corner cases lurking. Specifically, to generate /etc/mtab, the mount program runs some code (the function fsprobe_get_devname_by_spec) to convert a specification such as UUID=… or LABEL=… into a device path such as /dev/sdz99. This is not done if you pass the --no-canonicalize option to mount.

There are systems where /etc/mtab is a symbolic link to /proc/mounts. This is useful where the root filesystem is mounted read-only.


mtab is what the mount command reads from to show currently mounted filesystems, I dont think it ever shows UUIDs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.