Recovering Grub
There is nothing worse than starting up your computer and the boot operation will not complete. You can re-install the complete operating system, but that involves a lot of time and data lose, when all that is really needed is to re-install grub, presuming grub is your boot loader. Here is a recipe for re-installing just grub:
- Boot up to any linux system (for example, your operating system installation disk or USB-drive).
- Open the disk file browser and find the hard drive that contains your operating system. This hard drive should be automatically listed (mounted) in the file browser's places list. If it isn't automatically mounted, then jump through the hoops necessary to get it mounted. Once mounted, open it and copy its address from the file browser's address bar. Say it is /media/blah, where blah is a bunch of numbers and letters.
- Find the computer name for the hard drive containing the operating system (for example, use gparted or put df -h in the terminal). It will be of the form /dev/sd? or /dev/hd?, where ?=a letter or a letter+number. If the name ends with a number, then that number indicates the partition on the hard drive and can be ignored. Say it is sda2, so that all we need in the next step is sda.
- Be sure you are connected to the internet and run in the terminal: sudo grub-install --root-directory=/media/blah /dev/sda . Shutdown the installation disk system and remove the disk if possible.
- You should be able to now boot to an operating system on the hard drive. Once booted into your hard drive system, run sudo update-grub , which will find all the operating systems on the hard drive so that on the next boot you will be offered the choice to boot to any one of them.