Last weekend I finally decided to give the Windows 7 beta a try. I've got three hard drives in my computer. Drive 1 has Windows 2000 and Ubuntu 8.04 on it. The Grub boot loader is on the master boot record to select the OS at boot time. Drive 2 is set up as a storage drive. Drive 3 is set up with a large storage partition along with a 20 GB boot partition that had Fedora 10 on it. I purposely had this set up separately for testing. It requires changing the boot order in the BIOS in order to use it. This seemed like the perfect place to install Windows 7 to try it out.
As you can tell from the title of this post, things did not go as planned. I booted to the Windows 7 DVD to begin the install. When I got to the point where you choose the installation partition, Windows said it couldn't install on my 20 GB ext3 partition. It would only allow selection of ntfs partitions. If there was an option to reformat at that point, it wasn't obvious to me. So I rebooted back into Ubuntu to reformat the partition with GParted.
After that was done, I booted to the Windows 7 DVD again and proceeded with the installation. I selected the 20 GB partition on drive 3 and Windows went ahead with it's installation. After the requisite reboots, Windows didn't work. Why didn't it work? It didn't work because I had drive 3 set as the boot drive. I'd had the naive belief that if I told Windows to install on partition 1 of drive 3 that it would leave my other drives alone and set up the master boot record on drive 3. No such luck. The folks at Microsoft decided to do me a "favor". Windows 7 detected that Windows 2000 was installed on drive 1, so did me the "favor" of setting up a boot loader for me in the master boot record of drive 1. After resetting the boot order in my BIOS to boot to drive 1 I was able to boot into Windows 7. Interestingly the boot selector showed Windows 7 and "Other Windows". What happened to Ubuntu?
I figured I'd try searching the internet from the new Windows 7 installation. No luck there either. A lot of people try to say that Linux will never be popular because it's too hard to get everything working on a new installation. It is the goal of many Linux distributions to "just work" after installation. I can tell you most certainly that the latest version of the most popular operating system in the world does not "just work". My USB mouse didn't work. I had to connect it with a PS2 converter. I couldn't get on the internet either. No real surprise really. I had not installed the drivers from the CD that came with my motherboard. The point is that most of my hardware works right away in Ubuntu without extra configuration or special driver installation.
OK, back to the issue of restoring the master boot record (MBR) on my primary hard drive. A quick search of the internet yielded a solution on the Ubuntu Forums. I'm adding a few preliminary steps here to make the procedure more clear. The first is step is to boot an Ubuntu Live CD. Then open up the Nautilus file manager, find you Ubuntu drive partition, and navigate to /boot/grub. Open up the file called menu.lst and find the section that looks like
## default grub root device## e.g. groot=(hd0,0)# groot=(hd0,2)
The (hd0,2) part from the bottom line is what's important. This is the hard drive number and partition for your Grub installation. For the rest we'll need to open up a terminal window. You'll need to sudo to root with
Then enter the command
Next, enter
Make sure to use the hard drive number and partition you found in your menu.lst file. Next, enter
again, substituting your proper hard drive number. Finally, exit the grub configuration with
and reboot. You should see the familiar Grub boot loader when your machine starts.
If you want to install Windows 7 on a configuration like mine, I suggest you either disable your main hard drive in your BIOS (if possible), or better yet, disconnect it from the motherboard.