Update-grub does not handle dual-disk dual-boot well
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub (Ubuntu) |
New
|
Wishlist
|
Unassigned |
Bug Description
I had a PC with other OS installed on it. Debian proper but that does not
really matter. What matters is that I had an existing grub install. I added
another hard drive and installed Ubuntu on it. After reboot I could not boot
into Ubuntu (or, strictly speaking, I can from grub command line but there is no
Ubuntu boot menu entry).
The reason is that Ubuntu creates new /boot/grub/menu.lst with correct entries,
including existing Debian install but since it being installed on a second hard
drive - /dev/hdb in my case - after rebooting grub finds menu.lst on /dev/hda
first and uses it instead. menu.lst on /dev/hda is not changed by install so I
only have my old grub menu.
Same thing when I upgrade kernel from Ubuntu - menu.lst is updated on hdb and
upon rebooting grub would not see new menu entries.
I am not exactly sure how this problem should be handled. My Very Ugly Hack was
to change update-grub so it mounts partition on /dev/hda and copies menu.lst
from /boot/grub from one drive to another. This works for me - hardcoded
partitions etc. but obviously it would not work for everyone.
Maybe creating /etc/fstab entry during install for old partition - noauto
option or something. Setup does find existing grub install so it should know
where to look. Then make update-grub and/or grub-install mount it and look for
grub installation there.
This may not even qualify as a bug - maybe a wishlist...
grub should load the menu.lst from whatever was the root device at the time
grub-install was run