How to reinstall Grub from a live CD
From episode 21 I mentioned that my Grub bootloader got hosed when I installed Windows 7 on a second partition on my laptop. I wanted to take the time to write a quick how to in case this happens to you and you find that you cannot boot into Linux because your Grub menu doesn’t show up.
I got this info from the Ubuntu forums
First off you need to boot to your Linux Mint live CD. You can also use just about any live Linux disk but I used Linux Mint.
Once your live cd has booted open a terminal and type
This is going to enter the grub shell. You can only perform certain grub tasks while in this shell but it will make the re-install super easy.
Next you need to find what hard drive and partition your grub files are on. For that type in
This will let grub search your hard drives for your /boot folder along with the other necessary files grub needs to boot. This will show you what drive and partition the grub files are on. It will look something like hd0,1. That stands for hard drive 0, partition 1. (remember computers start counting with 0, not 1)
We are going to tell grub where the files are located with this command
Replace the ?’s with what the find command returned. eg. root (hd0,1)
Now you need to actually reinstall grub to the first hard drive’s master boot record. To do the install simply type in
That’s it! now just get out of the grub shell with
And you are all set. Reboot your computer and your grub menu should be exactly as you left it before installing the second operating system.