If you have a Windows/Ubuntu mulit-boot computer you know how much of a pain in the behind it is when you reinstall Windows. Every time you reinstall Windows you need to reinstall the Grub menu so you can boot back into Ubuntu.
With the recent release of Windows 7 RC1 I recently had to reinstall my Grub menu to get back in my Ubuntu partition. For those who haven’t checked out Windows 7 go check it out, its free for a year.
So I needed to repair my multi-boot Grub menu and I found a number of different resources but the easiest one I found was from the trusty Ubuntu Forums.
Here’s what I did to reinstall my Ubuntu Grub menu:
First thing you need to do is find the Ubuntu Live CD it doesn’t have to your most recent Ubuntu install but you need a Ubuntu CD to boot into. If you don’t have one than download another one from here http://www.ubuntu.com/getubuntu/download. I like to get the latest torrent link cause its super fast, I can download the latest Ubuntu distro in usually less than an 45 minutes.
1. Put the Ubuntu Live Cd and restart your computer to boot from the disc drive.
2. Get into the Ubuntu Live Cd desktop and open up the Terminal. (Applications -> Accessories).
3. So now we need to get into the Grub command line, enter the following code in the terminal.
sudo grub
4. Now we need to find the locations of our installation. If you already know your set-up you can skip this step but for those who don’t know enter the following code.
find /boot/grub/stage1
This is what my set-up is (hd0,5), I’m going use this for the next few steps.
5. We need to let Grub know where our installation is. Enter the following code:
root (hd?,?)
Put in the the location that was found from the find command. So this is what I would enter for my set-up:
root (hd0,5)
6. Let Grub know where to install.
setup (hd0)
You may need to replace the ‘0’ accordingly.
6. We are finished so we can get out of the Grub command line. Enter the following code:
quit
Reboot, and now if all went well your Grub menu should back.
More Info on how to reinstall Grub:
http://ubuntuforums.org/showthread.php?t=224351
https://help.ubuntu.com/community/WindowsDualBoot