The problem is that the device names as /dev/sda
and /dev/sdb
can change: add a disk to the system and the names can be easily messed up.
Labels will not change, as the UUID (unique identifier) for disks. To avoid problems, when you install a new Ubuntu system normally the disks and partition are mounted/recognized by their UUID, and not the device name; look at my /etc/fstab
:
# /etc/fstab: static file system information.
#
# Use 'blkid' 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>
# / was on /dev/sda1 during installation
UUID=0dfa0702-cb80-417c-b06e-5c946216d174 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda5 during installation
UUID=12fa4e6a-6a16-4d4d-84bb-9bbdfae8e0a1 /home ext4 defaults 0 2
# swap was on /dev/sda3 during installation
UUID=3773a8fb-fdbc-4e77-8358-7fa5ed65cc5f none swap sw 0 0
You can use the labels if you prefer, with label=
if you have them (at least, I think). See also https://wiki.archlinux.org/index.php/Persistent_block_device_naming