UUID indicates the unique UUID of the hard disk partition.
In Linux, sdxx/hdxx must be used to represent the name of the storage device, but it is not fixed for a certain partition (when your storage device moves-you mount the system on a removable hard disk, external to another computer, or abnormal situations I encountered a year ago ), in different situations, a partition may be identified by the system as sdax, hdax, or sdbx, so it should not be stored in a static configuration file, the configuration file here refers to the menu of/etc/fstab and grub. lst. Let's look at an fstab example:
/Dev/sda1/boot ext2 defaults, noatime 1 2
The above is a traditional writing method. I just mentioned that it has drawbacks. We will replace/dev/sda1 with UUID:
B9475401-1180-4766-8799-8f605284f514/boot ext2 defaults, noatime 1 2
Because the uuid is fixed as the partition identifier, even if your storage device moves, the system can still recognize the partition.
View the uuid partition method, terminal InputBlkidOrLs-L/dev/Disk/by-UUID, Usually the latter is more effective
Let's look at an example of menu. lst using UUID in GRUB:
Title Gentoo Linux 2.6.26-r4
Root (hd0, 0)
Kernel/boot/kernel-2.6.26-gentoo-r4 root =/dev/ram0 root =/dev/sda3
After modification
Title Gentoo Linux 2.6.26-r4
UUID b9475401-1180-4766-8799-8f605284f514
Kernel/boot/kernel-2.6.26-gentoo-r4 root =/dev/ram0 root = UUID = 54db021e-4058-4d68-8998-a8d08ff9d273
When should this be used? When you boot grub from another hard disk (pure, non-grub4dos), switch configfile to start the system on your hard disk without modifying the grub version that supports UUID, I can only tell you to use the new version whenever possible.
It is worth noting that,Letters in UIDs must be in lowercase.I have touched a nail.
Refer:
Http://www.joeblog.info/index.php? /Archives/369-finding-the-uuids-of-your-harddisks.html and menu. lst automatically configured by Ubuntu 8.10
In addition, we recommend that you take a look at the uuid introduction in Ubuntu community guest ENTs.