Fixing Master Boot Record (MBR) in Windows XP without the recovery console

My laptop was set up to dual boot Windows and openSuse linux, but as I wasn’t really using openSuse at the moment and I needed the disk space I decided to delete the openSuse installation to free up the disk space. Should be easy, just format the linux partition using a file system that windows can handle, right?

So I used gParted to delete the linux partition and its swap partition and created a NTFS partition instead. But when I rebooted I was disappointed to see the GRUB (boot loader) prompt. Apparently the linux partition had held the configuration for the boot loader, which obviously I hadn’t thought of.

Booting into windows was not a problem, the following GRUB commands did the trick: (my windows partition is the second partition on the first and only hard drive)

rootnoverify (hd0,1)
chainloader +1
boot

Naturally, I didn’t want to type these commands every time I rebooted my computer though. The first thing I tried was fixing GRUB, but after a while of trial and error I decided that it was better to just use the default windows loader since windows was now the only OS installed. Again, a quick internet search told me that I should use a tool called “fixmbr” which is only available from the Windows Recovery Console. Unfortunately the Recovery Console is only available if you have the windows installation cd or have a directory named “I386″ on your hard drive. I didn’t have my windows cd available (it’s buried somewhere in a storage room) and no I386 directory on my disk, so I “borrowed” that directory from my girlfriends computer. No go – “wrong version” or something. Tried applying Windows XP Service Pack 2 to the borrowed I386 directory and got one step further, but also a couple of new error messages (“error reading netmap.inf”) and still couldn’t install the recovery console.

Time for a new approach and I remembered reading about the fdisk utility and that it should be able to fix the MBR, however it turned out that it was only included in earlier versions of Windows, so I couldn’t use that either. At this point I was getting pretty frustrated, how hard could this possibly be??

One last internet search to try to find an fdisk alternative for Windows XP returned a site mentioning a tool called MBRFix, and I decided to give it a try. It turned out that it could also do a backup of the MBR, so I did that before doing the “fixmbr”-thing, just in case. After running “MbrFix /drive 0 fixmbr” I rebooted in anticipation, and was very pleased to see the windows load screen again.

Bookmark and Share

2 Responses to “Fixing Master Boot Record (MBR) in Windows XP without the recovery console”

  1. Incredibly late response here but you can backup your MBR in linux with the dd command.

    dd if=/dev/sda of=/some/output/file bs=512 count=1

    this assumes your disk drive is sda, replace with the proper disk drive as necessary, and a proper output file location.

    Nice blog by the way, are you planning to ever get the data manager up and running?

  2. Eivind says:

    Thanks, and sorry for my incredibly late reply to your “incredibly late response”. ;-)

    The Data Manager project is currently on hold, I’m afraid. I’m busy either working or enjoying the summer. It’s still nowhere near useful and it requires a lot of work, which I unfortunately am not prioritizing at the moment. I hope to continue working on it eventually, but it will definitely *not* be up and running anytime soon. With the current non-existing progress it may take years, and I almost feel a bit sorry for having wasted bandwith even mentioning it (never mind dedicating a web site for it!). I will finish it *some time*, but I have no idea at the moment when that will be except that it’s more like years than months. Sorry.

Leave a Reply

You must be logged in to post a comment.