ubuntu:grub:grub_not_using_uuid_for_the_root_device_instead_it_uses_dev_sda1_or_other_device_name
Ubuntu - Grub - Grub not using UUID for the root device instead it uses /dev/sda1 or other device name
How does Grub determine the root device name?
By default, grub will WANT or TRY to use the UUID as the root device, UNLESS in /etc/default/grub you enable the feature of GRUB_DISABLE_LINUX_UUID=true.
- Usually this is not there at all or it is just commented out.
Grub uses scripts in is /etc/grub.d which are called when you run update grub.
- The one we really care about is the 10_linux file.
NOTE: It does not matter if your fstab is updated to use UUID, this script does not care about fstab or the current root filesystem.
- What it does is look for entries in /dev/disk/by-uuid and if it finds a UUID for the root device it will assign it like normal.
- Example: root=UUID=theUUIDhere
NOTE: /dev/disk/by-uuid is really just a series of UUIDs in that directory that are symlinked to their actual device name.
- This is how the grub 10_linux script associates the UUID to the root device and sets up the root=UUID.
- However, if it does not find a UUID entry in /dev/disk/by-uuid then it falls back to using the actual raw device name whether it be /dev/md2 or /dev/sda1 or /dev/vda1 etc…
NOTE: Do not modify grub.cfg manually, as the next kernel update will cause grub to revert back to the device name.
ubuntu/grub/grub_not_using_uuid_for_the_root_device_instead_it_uses_dev_sda1_or_other_device_name.txt · Last modified: 2023/06/06 10:28 by peter