update-grub sets wrong root argument
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Binary package hint: grub2
I've made a backup of my system with dd and then changed the UUID and label of the drive. I would like to be able to boot from either the main system or the backup, ideally regardless of whether the backup is in a USB enclosure or mounted internally.
When I run update-grub, even though it correctly finds the backup and uses its UUID as a parameter for the search command, it still sets the root= argument of the linux command to the main system. This makes the backup unusable.
So in my setup, the original drive is 7f0e857e-
### BEGIN /etc/grub.
menuentry "Ubuntu, Linux 2.6.31-17-generic" {
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 7f0e857e-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
...
### BEGIN /etc/grub.
menuentry "Ubuntu, Linux 2.6.31-17-generic (on /dev/sdb1)" {
insmod ext2
set root=(hd1,1)
search --no-floppy --fs-uuid --set 9de2fc84-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
I tried uncommenting the GRUB_DISABLE_
ProblemType: Bug
Architecture: i386
Date: Sun Jan 17 21:07:18 2010
DistroRelease: Ubuntu 9.10
Package: grub2 1.97~beta4-
ProcEnviron:
LANGUAGE=
PATH=(custom, user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: grub2
Uname: Linux 2.6.31-17-generic i686
I agree, grub2 is a complete mess here and this problem looks closely related to what I reported in bug 510824. I talked to the devs in #grub about it, but unfortunately they don't seem to care about shipping a quality product.