Windows 2000 SP4 Boot Loader Whacked

It’s inevitable. You’re happily dual booting and you do something that Windows doesn’t like. Microsoft Windows is heretofore owned by your actions and you need to recover, now! In this particular instance, the culprit was a Linux installation I nuked and recovered space from using Partition Magic. Unfortunately, I forgot to uninstall GRUB from the MBR and that’s where my problems began. Normally, you’d boot from your Windows installation media and issue fixmbr and possibly fixboot c:, but not this time…

Unfortunately, the above did work. What’s more, my laptop doesn’t have a floppy disk. What to do? Unsure if it could boot USB, I opted to create a GRUB boot CD. Of course, no one has a GRUB bootable CD image available online, anywhere. Strangely, it’s easy to find bootable DOS 6.22 and Windows 95B boot diskette images online. In any case, I happened upon some instructions for quickly mastering a bootable GRUB image for a CD which I burned to CDRW, to facilitate booting of my Windows 2000 SP4 installation.

With Windows again bootable with the assistance of the usual GRUB procedure:

rootnoverify hd(0,0)
chainloader +1
boot

I could search for a permanent solution: A repaired MBR. Research on the Windows support side turned up… nothing. If the original recovery console commands didn’t help, you’re pretty much screwed, although a potentially dangerous reinstallation could be attempted. Last time I tried that, I ended up having to reinstall everything as my register was clobbered. Maybe that’s not a problem with XP. Anyway, it was time for some GNU/Linux solution magic.

After playing with hexedit under Knoppix 3.9, it was clean that my MBR was still not what it was supposed to be, even after executing the recovery console commands. Finding this less than acceptable, it seemed the solution is to backup the first 448 bytes of my laptop’s hard disk, addressed as /dev/hdc on my particularly weird Dell Inspiron 1100 system. Once copied to another system, I booted my functional Windows 2000 SP4 system with Knoppix and using dd to copy the first 448 bytes of the first hard disk which contained the magic Windows bootloader. (You don’t want the whole 512 bytes of the first sector, as that includes the partition table too. I didn’t want to copy the primary partition table to my laptop from my desktop!)

Once back on the laptop, I copied my backup of the Windows 2000 SP4 bootloader, which I figure I’ll kindly mirror until I hear otherwise. A reboot later, Windows 2000 was able to boot. Previously the BIOS would simply hang once it ran out of bootable devices to try.

md5sum 12c67741fc976e56b7de653a8e236c4a  win2000sp4mbr.dd

You’d probably want to restore it using dd.

# dd if=/dev/hda of=/root/mbr.backup bs=448 count=1
# dd if=/tmp/win2000sp4mbr.dd of=/dev/hda

Post a Comment

Your email is never shared. Required fields are marked *

*
*