Matt was raving about how great the latest release of Ubuntu Linux is, and I thought it might be good to try it out before spending a bunch of money to switch to MacOS, so I decided to install it on my main Windows XP desktop in a dual-boot setup. Should be easy, right?
Yeah, right.
First of all, even though Ubuntu comes nicely packaged up, if you do a quick search for “dual boot Ubuntu Windows XP” you get a ton of very technical explanations of how to accomplish what should be a built-in option in the installer.
As it turns out, I managed to blow away the Windows Master Boot Record (MBR). Not only that, but since I had failed to install the Linux boot manager (GRUB) correctly, neither OS would boot. Luckily, I could still boot from the Linux CD that I had created, and I also had two other PC’s in the house (although neither of them have a CD-R drive). Looking at this page, I saw that perhaps if I could get to the pre-boot GRUB command line, I could tell GRUB to “chainload” and get through to Windows, even without the “Master Boot Record”…
As is typical, the instructions weren’t quite right, but I deciphered them and managed to make it work. The page says do this:
rootnoverify(0,0)
chainloader +1
boot
And what I had to do was this:
rootnoverify (hd0,1)
chainloader +1
boot
Which is close, but how is the average Joe supposed to figure that out? Anyhow, that got me back into Windows. Now I just had to figure out how to restore the MBR. Googling that led here, which essentially says that you have to run the Windows Recovery Console, which of course is only available is you have an original Windows XP SP2 CD, which of course I don’t have.
Or do I? I do have an SP2 disk that Dell sent me a while back… But the computer won’t boot off that CD… I search windows help for “Recovery Console” and it tells me that I can install Recovery Console to be run off the hard drive by doing this:
E:\I386\WINNT32.EXE /cmdcons
That appears to work, when I run it from the copy of XP2 on the Dell CD. Now I just have to get to the right boot menu… to do that I have to go through the GRUB chainloader thing again, but then there it is… and now it wants the “Administrator” password. Ha. So I suppose have to go back into Windows itself, reset the Administrator password, and then go back into the Recovery Console. Each of these reboots takes 3-5 minutes, of course.
And I’m finally in the magical Recovery Console. Wow. And fixmbr exists, and produces the expected terrifying warning message, accompanied by a promising “The new master boot record has been successfully written.” I started to run fixboot also, but the warning message scared me off, and as it turned out, I didn’t need to.
So, I reboot again, and it appears that the Windows MBR was in fact restored, and I can boot Windows again.
Great, now how to get back to the copy of Linux that I installed 4 hours ago? Useless. Better to trash that install (delete those partitions), and try again fresh.
…that didn’t work… The Linux installer doesn’t seem to know where to put GRUB to make it work. By now I gather that (it appears that) GRUB is supposed to install itself on the MBR and take over from the Windows boot loader, it’s not doing that. So now I have a broken MBR and a broken GRUB as well, again. Now I find something called “Super Grub Disk” that is bootable and is supposed to repair all this mess. It doesn’t, at least not automatically… But now it’s clear that you can muck with all this, and fix it. I now appear to have GRUB on the MBR, and then again in my Linux partition, the first pointing to the other, and neither work. So I boot into Windows Recovery Console again, and restore the Windows MBR, again.
And around and around… Finally I pick up a clue from the error messages that GRUB is giving me trying to boot either OS, and I reboot into Linux via the Live CD and manage to figure out with the help of these instructions how to find and edit the menu.lst that controls what how GRUB does its thing. Basically GRUB was looking at the wrong disk (hd1,7 instead of hd0,7), and once I changed that around in the config file it was able to do its thing. Now I have GRUB as the primary boot loader – if I select Linux it boots Linux and if I select Windows it boots Windows (now of course with the added sub-menu of Windows’ own boot loader showing the option of Windows Recovery Console…)
Who knows how all this crap works, but at least I have them both running now.
On a final note, let me just say that these three pages, while apparently popular with the general public, are entirely useless in terms of figuring out anything meaningful about setting up an XP/Ubuntu dual-boot situation.