Now a days when we are moving towards open source its common to find the two operating system on the pc or laptop. The one is linux which come with own loader GRUB. Sometimes it may happen due to ignorance or experimental purpose grub is mishandled and the result is a grub prompt at restart ...........
Many of us just get afraid and stuck to old but bad formula of formatting all drives and installing all the stuff again STRANGE!!!!
In this post you will find precise steps to recover your Grub.
First step is to find whether grub can open and read any files on any partition
This will return partition in the form of (hdX,Y). For example (hd0,5)
Next step is to intall the grub.
Next step is to tell grub about the kernel and initrd img. Assuming its in sda2
Make sure you select the same version in both kernel and initrd.
Last step is to boot in to machine
This will return you to command prompt interface. Just do a normal login and type startx to start GUI.
Bingo You are done.
Next step is to restore the menu.lst or make new one. Search for the menu.lst in /boot/grub/.
If its empty you need to add few lines for showing grub menu in while booting. We need to know the various UUID (Universally Unique Identifier) and details of the partition. Run the command
menu.lst normally looks like
title : shows as in Grub Menu option
UUID : For disks
kernel : for loading os
Make your ones with the appropriate enttries and UUID and done. Save file and reboot the system.