Friday, August 12, 2005

How to reinstall GRUB?

If you have Windows and Linux with dual boot option, then you will most probably have GRUB boot loader. If Windows is repaired or reinstalled, it overwrites the Master Boot Record, which had GRUB, with its own loader. This makes booting into Linux impossible.

In this case, only GRUB can be installed instead or reinstalling entire Linux operating system. This can be done by following these steps:-
1] Change the first boot device in BIOS to CDROM drive.

2] Insert Linux CD into the drive, and choose Rescue mode option.

3] When the command prompt appears, type these commands, each followed by ENTER key:-
chroot /mnt/sysimage
grub-install /dev/hda

This would reinstall GRUB to Master Boot Record. Here, hda means hard disk is Primary master. If hard disk is Secondary master, then device name will be hdc. Similarly, hdb and hdd will be for Primary slave and Secondary slave respectively.


Anonymous Anonymous said...

Man u rock!!!!!!!*me bows to u*
Not only because of this GRUB thingy (pretty common aint it?)
but for all those wonderful blogs here.
Is it due to this researching for ur blog that u spend less time at the forums?
BTW i am a fellow member there.

12:21 AM  
Blogger swatkat said...

Thank you :D I am happy to find a fellow Digitian here.

2:42 AM  

Post a Comment

<< Home