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:-
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.