Friday, August 22, 2008

Re-installing GRUB in Ubuntu

Imagine a scenario, wherein you have installed a brand new distro on a system that already has some other distro installed. You have properly configured the GRUB to enable you to multi-boot. Now for some reason, you do not like the GRUB of the distro that was last to be installed, you want to revert back to the previous one. So what do we do now?
The solution is to boot into the required distro from the GRUB menu and then follow these steps -
1. Login as root from the command prompt and enter the following command
# sudo grub
grub > find /boot/grub/stage1

Let us say, the command returns (hdx,y).
2. Then enter the following commands -
grub > root(hdx,y)
grub > setup (hdx)
grub > quit

That's it! When you reboot, you'll be presented with the previous GRUB screen.

No comments: