How to restore GRUB

Status
Not open for further replies.

firewall

In the zone
It's happened to almost every GNU/Linux and Windows dual boot user at some point: You have a nice installation GNU/Linux cross-booted with Windows. So far so good. But then, at some point, you reinstall Windows, perhaps because you upgraded to a new version, or perhaps you just did it to "clean up" Windows, reinstalling the original system files to make it a little more stable. When you reboot, however, you'll find that if you had LILO running from your hard disk's MBR, it has been killed, and Windows has claimed the MBR as its own. How will you reinstall your boot manager so you can get into GNU/Linux?

here is small tutorial on how to reinstall your gnu boot loader in that case. I chose GRUB here as now a days it's very popular and powerful too.
----

Boot into the rescue mode using install CD1 by typing "linux rescue" at the boot prompt. When it asks you if you want it to find your installation and mount it, let it by selecting "Continue". Once you get to the sh prompt chroot into you installation with:

# chroot /mnt/sysimage

If the disk you boot from is /dev/hda then you should be able to reinstall grub with:

# grub-install /dev/hda

Just remember to exit the chroot'ed shell before you reboot. If you reboot by "Ctrl-Alt-Del" the installer will unmount your partitions. Although it probably wouldn't hurt to try to unmount as many as you can yourself with something like:

# umount /dev/hd?[1-9]*


----- :)
 

tuxfan

Technomancer
Cool!! Some newbie has a thread here on the same problem. Why not post it there too!! :) Or shall I quote you there?
 

thouchin

Right off the assembly line
very cool!! I had the same problem once and because of the problem i did reinstall whole linux...
hope that won't happen again... :)
 

hard_rock

Salieri Family
I think Tuxfan, ur talkin abt me...........I have similar problem with grub loader..........Thanx 4 ur solution yaar.......
 
Status
Not open for further replies.
Top Bottom