Restoring the Windows XP master boot record after removing Linux

This content is 18 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

A few weeks back, I blogged about my problems installing Linux on an IBM ThinkPad. Because I’d like to get the Access IBM predesktop area back (and then install Linux so the system will dual-boot with Windows XP), I used the recovery CDs that IBM sent me (free of charge as the system is under warranty).

Initially, recovery failed due to a lack of free space, so I deleted the existing partition (using an MS-DOS boot disk and fdisk) before attempting recovery once more. This time the files were copied to the hard disk but after rebooting, I was greeted with a GRUB error:

GRUB Loading stage1.5…

GRUB loading, please wait…
Error 22

GRUB error 22 means “no such partition” – basically I needed to restore the Windows XP master boot record.

To access this, I booted the system from a Windows XP CD, waited for files to be loaded into memory, then selected R for recovery console, selected my Windows XP installation and entered the administrator password.

Once inside the Windows XP recovery console, I tried the fixboot command. This didn’t seem to make any difference on reboot, so I tried again with fixmbr. After another reboot, Windows XP was up and running (some Internet sites suggest fdisk /mbr but that’s not a recovery console command under Windows XP).

Unfortunately I still haven’t managed to restore the Access IBM predesktop area (all IBM say is “it should have been restored by the restore CDs”) – if I ever manage to resolve that one, I’ll post the results here.

6 thoughts on “Restoring the Windows XP master boot record after removing Linux

  1. Thanks for the tip Rob but although that utility on seems to let me rewrite the MBR, it doesn’t seem to be any help if the recovery partition is missing or corrupted.

  2. I’ve found that by installing IBM Rescue and Recovery I can use the Access IBM functionality again but that there is still no pre-desktop area visible on the disk.

    Interestingly, a restoration (back to factory contents) from Access IBM seems to work at first but then fails, displaying the following messages:

    PKUNZIP (W13) Warning! Inconsistent local header for file: filename
    PKUNZIP (W14) Warning! Incorrect password for file: filename
    PKUNZIP (W10) Warning! Can’t create: filename

    I imagine that the utility is accessing the disk sectors where the pre-desktop partition used to be, but then failing where the sectors have been re-used and the data is no longer present.

  3. I was just to follow your first step, unfortunately I miss the time when I should hit the R for recovery, and the setup continue with a list of my HDs, I just hit C: for installation, but it didn’t notify me if there is another xp already installed, and then I realized that I’m overwriting my C:, and the “copying” files begin, I can’t think another way to stop it but hit the restart button, so I hit it and I already imagine this will be along night installing programs one by one( this is my wifes pc ), restarted, get the cd out, and suddenly windows logo appear and boot like normal. Before I loose mbr, I tried to install gOS into a thumbdrive, but I forgot to manage the grub to the thumbdrive, it went to HD0 which C:. now it works.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.