PDA

View Full Version : [SOLVED] Which Grub installation?



gseward
January 16th, 2010, 08:44 AM
I have two Ubuntu installations on my computer, the first was Ubuntu 9.10, on sda6, which I have used since it was released, and I recently added 10.04 beta2 on sda8. It is now using the Grub from the later 10.04 installation and I would like to be using the older 9.10 grub on sda6. [I may uninstall the 10.04 beta]. How can I switch back to the sda6 Grub.
p.s. They are both Grub2 [version 1.9x].

kansasnoob
January 16th, 2010, 09:18 AM
I have two Ubuntu installations on my computer, the first was Ubuntu 9.10, on sda6, which I have used since it was released, and I recently added 10.04 beta2 on sda8. It is now using the Grub from the later 10.04 installation and I would like to be using the older 9.10 grub on sda6. [I may uninstall the 10.04 beta]. How can I switch back to the sda6 Grub.
p.s. They are both Grub2 [version 1.9x].

If you can boot into 9.10 you should just be able to go to Terminal and run:


sudo grub-install /dev/sda

If that returns any errors:


sudo grub-install --recheck /dev/sda

Then:


sudo update-grub

Wait for it to say "done", it should find 10.04.

If for some reason you can't boot into 9.10 then you could mount and chroot 9.10 on sda6:


sudo mount /dev/sda6 /mnt && sudo mount --bind /dev /mnt/dev &&sudo mount --bind /proc /mnt/proc && sudo chroot /mnt

Just to be sure you mounted the correct OS:


lsb_release -a

Now install Karmic's grub2 to the mbr:


grub-install /dev/sda

If that returns any errors:


grub-install --recheck /dev/sda

Then just exit chroot and unmount:


exit


sudo umount /mnt/dev && sudo umount /mnt/proc && sudo umount /mnt

Then when you boot into Karmic the first time run:


sudo update-grub

That should find Lucid.

gseward
January 17th, 2010, 10:45 AM
Thank you very much kansasnoob, that did the trick. If I understand correctly, whichever version I was running when I issued the "sudo grub-install /dev/sda" command would be the one whose grub menu would then be used?