Damn that MBR!

Posted: 18th December 2009 by Jacky Yong in Computers
Tags: , , , , ,

Stupid beast this MBR (master boot record) is from Windows. Even in its 7th reincarnation, MBR still bugs me. I am not a big fan of Windows, but I still find myself going back to Windows. And Windows 7 looks more attractive and sexier than XP by a mile!

Anyway why do I bother about MBR? That’s because my harddisk has always been loading Ubuntu mainly, Windows secondary. Being the primary OS, Ubuntu assigned GRUB as the boot loader. Things get ugly when I switch back to Windows, as you shall see why.

In order to reformat my dual-booting machine, I first have to install the secondary OS, in this case Windows. Then only can I install Ubuntu, so that Ubuntu can manage the booting itself. Besides, the Windows installation is too stupid, it cannot detect other existing OS’es to co-exist peacefully with others. Typical Microsoft.

So my MBR is destroyed. No matter how many times I install Windows, it just will not load from the hard disk. Took me a lot of googling before I found out this MBR thingy. And how it differs from previous Windows XP! Previous XP still uses fixmbr.exe to solve this. Not since Vista. Vista and Windows 7 uses bootrec.exe instead. (There is another similar command, called bootsect.exe, but that does not work. Google it!)

The first step is to load your machine with the Windows 7 installer disk. Select the language, keyboard language and country and click next. Select “Repair Your Computer”. It will scan your machine for any existing operating system. Select the Windows installation located in your local hard disk (in my case Windows 7) and click Next. In the System Recovery Option Dialog box, select Command Prompt.

Here you will be prompted with a command prompt, old school style. Type “bootrec /?” and press enter. If you followed the steps correctly, you should be able to see a set of possible options. At first, I chose “bootrec /FixMbr“, restarted the machine, but it does not work. So I loaded the installer again, go through the same steps again, this time choosing “bootrec /FixBoot“. Then after restarting the machine, VIOLA! It worked!

Lucky I have another machine that can go online while I do this. Otherwise, I’d be dead!