http://unix.stackexchange.com/questions/93767/why-cant-i-specify-my-root-fs-with-a-uuid
blkid
partuuid=009009-09
(uuid是需要initramfs中的驱动的,没有的话它认识partuuid,very nice)
The parameter you have to pass to boot from UUID is The documentation explains why it's coming back with kernel-parameters.txt: root= [KNL] Root filesystem See name_to_dev_t comment in init/do_mounts.c. init/do_mounts.c: /* * Convert a name into device number. We accept the following variants: * * 1) device number in hexadecimal represents itself * 2) /dev/nfs represents Root_NFS (0xff) * 3) /dev/<disk_name> represents the device number of disk * 4) /dev/<disk_name><decimal> represents the device number * of partition - device number of disk plus the partition number * 5) /dev/<disk_name>p<decimal> - same as the above, that form is * used when disk name of partitioned disk ends on a digit. * 6) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing the * unique id of a partition if the partition table provides it. * The UUID may be either an EFI/GPT UUID, or refer to an MSDOS * partition using the format SSSSSSSS-PP, where SSSSSSSS is a zero- * filled hex representation of the 32-bit "NT disk signature", and PP * is a zero-filled hex representation of the 1-based partition number. * 7) PARTUUID=<UUID>/PARTNROFF=<int> to select a partition in relation to * a partition with a known unique id. * * If name doesn't have fall into the categories above, we return (0,0). * block_class is used to check if something is a disk name. If the disk * name contains slashes, the device name has them replaced with * bangs. */ The last bit at the end says that if it cant understand the value, it returns |
|||
![](http://engine.adzerk.net/i.gif?e=eyJhdiI6NDE0LCJhdCI6NCwiYnQiOjAsImNtIjo5NTU2MCwiY2giOjE2NTMxLCJjayI6e30sImNyIjoyNjY1NjMsImRpIjoiNDlmZTFmYjY1ZWM0NDFjMjljNmVjMGFkZjA5ZDVhMmQiLCJkbSI6MSwiZmMiOjMzMDkyMCwiZmwiOjE3MTc0MSwiaXAiOiIxMjUuMzkuMTEyLjMiLCJrdyI6ImxpbnV4LGJvb3QsdXVpZCx4LWNvbW11bml0eSx4LWhvc3QtdW5peC5zdGFja2V4Y2hhbmdlLmNvbSIsIm53IjoyMiwicGMiOjAsImVjIjowLCJwciI6NTcyMjIsInJ0IjoxLCJyZiI6Imh0dHA6Ly9jbi5iaW5nLmNvbS9zZWFyY2g_cT1sZnMrc2QraTcrdmZzK2Nhbitub3QrbW91bnQrZmlsZStzeXN0ZW0rYmxvY2tbMDowXSZxcz1uJmZvcm09UUJSRSZwcT1sZnMrc2QraTcrdmZzK2Nhbitub3QrbW91bnQrZmlsZStzeXN0ZW0rYmxvY2tbMDowXSZzYz0wLTYmc3A9LTEmc2s9JmN2aWQ9MjcyNWJiZDYzNDk3NDBhZmIzM2M5Nzg1NjY2MzNiYjYiLCJzdCI6NTY3NTIsInVrIjoidWUxLWNkNzhlOGQzYzgwNDRjZTBhNWEzOWNmMDYzOWQyODhkIiwiem4iOjMwLCJ0cyI6MTQ0NTY5MDc0NjQ5OSwiYmYiOnRydWUsInBuIjoiYWR6ZXJrMTQ5NDM4MDQ4MSJ9&s=6U1Fuqxows7Ej5v7wBVovnYkG2A)
Just to clarify
as Don't forget to capitalize the hexadecimal number The more easy to use
only work with an So, if you use a non-empty |
|||||||||||||||||||||
|
PARTUUID=666c2eee-193d-42db-a490-4c444342bd4e
does not work. However, I was able to usePARTUUID=SSSSSSSS-02
(where SSSSSSSS is the NT disk signature shown just before the error message). – cjm Oct 6 '13 at 5:42root=UUID
, onlyroot=PARTUUID
. If you want to use a filesystem UUID, I guess you need an initramfs that can handle mounting filesystems by UUID. – cjm Oct 6 '13 at 5:48grub
boots quite happily withroot=UUID
. – terdon♦ Oct 6 '13 at 14:30