I want to generate a grub.conf that will search for my /dev/sda1 based on the filesystem label, not the UUID.
I did change /etc/default/grub to so that GRUB_DISABLE_LINUX_UUID="true" and I regenerated grub.cfg.
But I want to go one step further and change the search statements. I notice they still reference the old UUID. I also know grub2 can search by label. Can anyone tell me how to do this? Thanks.
EDIT:
I could use some help understanding this page:
http://www.gnu.org/software/grub/man...ub.html#search
I'd like my grub.cfg to contain statements similar to this:12.3.28 search
— Command: search [--file|--label|--fs-uuid] [--set var] [--no-floppy] name
Search devices by file (-f, --file), filesystem label (-l, --label), or filesystem UUID (-u, --fs-uuid).
If the --set option is used, the first device found is set as the value of environment variable var. The default variable is ‘root’.
The --no-floppy option prevents searching floppy devices, which can be slow.
The ‘search.file’, ‘search.fs_label’, and ‘search.fs_uuid’ commands are aliases for ‘search --file’, ‘search --label’, and ‘search --fs-uuid’ respectively.
Assuming that's the right syntax, how do I make grub2 generate label-based menu entries like that?Code:search --no-floppy --label MyLabel --set linux /boot/vmlinuz-2.6.3x-xx-generic root=label=MyLabel ro quiet splash initrd /boot/initrd.img-2.6.3x-xx-generic
Bookmarks