Can not update GRUB menu after upgrading with multiple drives
Binary package hint: grub
RELEASE: Jaunty, Hardy, Intrepid, Gutsy
CD/DVD VARIANT: 32bit and 64bit Xubuntu alternate cd, 32bit and 64bit Ubuntu alternate cd
ISO BUILD: any ISO image gives the same results
When installing using the alternate installation cd, after all software finishes installing, I receive the following:
"If all of your operating systems are listed above, then it should be
safe to install the boot loader to the master boot record of your
first hard drive. When your computer boots, you will be able to
choose one of these operating systems or your new system.
Install the GRUB boot loader to the master boot record?
<Go Back> <Yes> <No> "
Since I run multiple installations on multiple hard drives, I select "Yes". Unfortunately, any updates to GRUB boot loader on any partition except the current "last installed" partition leaves GRUB out of date.
There is no method to update the GRUB menu when kernels are updated other than manually editing it. To do it automatically requires a fresh install. Since every install places the GRUB boot loader in the master boot record of the first hard drive (hd0), there should be an easy method to at least upgrade it with any kernel upgrades.
CAUSE: Spoke to Steve Langasek on IRC in #ubuntu-release, this appears to be caused by the installations being on multiple hard drives. The current /boot/grub/menu.lst is installed to the last hard drive I installed on instead of the first hard drive on the system.
STEPS TO REPRODUCE:
Everything was done on a PIII 866MHz cpu with 640MB ram.
1. Install 3 hard drives in the computer
2. Partition the hard drives during the installation:
/dev/sda1 on / = 6GB (installed 7.10)
/dev/sda2 on /home = 5GB
/dev/sda5 on / = 6GB (installed 8.04)
/dev/sda6 on /home = 5GB
/dev/sda7 on /swap = 2GB
/dev/sda8 on / = 6GB (installed 8.10)
/dev/sda9 on /home = 5GB
/dev/sdb (used for guided install/use entire drive)
/dev/sdb1 on / = 9GB (installed 8.10 after /dev/sdc1)
/dev/sdb2 on /swap = 477MB
/dev/sdc1 on / = 9GB (installed 9.04)
/dev/sdc5 on /swap = 2GB
/dev/sdc6 on / = 9GB (installed 8.10 after /dev/sdb1)
3. After each installation, GRUB menu is correct. I did run updates after each installation.
4. Upgrade /dev/sda1 which is Ubuntu 7.10 to Ubuntu 8.04
5. Take note, upon restarting there has been no changes to the GRUB menu, since it is generated from the last fresh install.
6. Reboot the system to the last installation, attempt to update the GRUB menu.
1. Start in recovery mode.
2. Choose "root Drop to root shell prompt"
3. run "update-grub"; note the menu did not upgrade
7. Boot your computer up with Ubuntu Desktop/Live CD
1. Open a terminal window or switch to a tty.
2. Go SuperUser (that is, type "sudo -s"). Enter root passwords as necessary.
3. Type "grub"
4. Type "find /boot/grub/stage1". You'll get a response like "(hd0,1)". Use whatever your computer spits out for the following lines.
5. Type "root (hd1,0)", or whatever your hard disk + boot partition numbers are for Ubuntu.
6. Type "setup (hd0)", to install GRUB to MBR
7. Quit grub by typing "quit".
8. Reboot and remove the bootable CD.
9. Note the GRUB menu still has not updated
8. Place a Jaunty 9.04 Alternate cd in the drive
1. Select "Repair a broken system"
2. Proceed through until "select a file system for root"; selected sdb1
3. Select "Reinstall GRUB boot loader"
4. Device for boot loader installion: (hd0)
5. "Reboot the system" from the menu
6. Note the menu did not update