7.5. Uninstalling the Linux Boot Loader

There are two ways to uninstall the Linux boot loader:

[Warning]Warning

A boot sector backup is no longer valid if the partition in question has a new file system. The partition table of an MBR backup becomes invalid if the hard disk has been repartitioned since the backup was created. Obsolete backups are time bombs. It is best to delete them from /boot/backup.mbr promptly.

7.5.1. Restoring the MBR (DOS, Win9x, or ME)

It is very simple to restore a DOS or Windows MBR. Just enter the MS-DOS command (available since DOS version 5.0) fdisk /MBR. These commands only write the first 446 bytes (the boot code) into the MBR and leave the partition table untouched, unless the MBR as a whole (see Section 7.1.1. “Master Boot Record”) is treated as invalid due to an incorrect magic number. In this case, the partition table is set to zero. After restoring the MBR, mark the desired start partition as bootable (using fdisk again). This is required for the MBR routines of DOS and Windows.

7.5.2. Restoring the MBR of Windows XP

Boot from the Windows XP CD and press R during the setup to start the recovery console. Select your Windows XP installation from the list and enter the administrator password. At the input prompt, enter the command FIXMBR and confirm with y when asked to do so. Then reboot the computer with exit.

7.5.3. Restoring the MBR of Windows 2000

Boot from the Windows 2000 CD and press R then C in the next menu to start the recovery console. Select your Windows 2000 installation from the list and enter the administrator password. At the input prompt, enter the command FIXMBR and confirm with y when asked to do so. Then reboot the computer with exit.