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.