How to: restore the Windows XP bootloader after dual booting with Windows Vista

Assume that you have a dual boot system with Windows XP and Windows Vista and you have gotten sick and tired of Windows Vista (like myself) and you want to restore the Windows XP bootloader. Now there is an easy way to accomplish this, well actually there are several ways to do this but I will focus on the utility bootsect.exe that you can find on the Windows Vista installation DVD in the folder Boot.

About bootsect

Bootsect.exe is a Boot Sector Restoration Tool. It updates the master boot code for hard disk partitions in order to switch between BOOTMGR and NTLDR.  You can use this tool to restore the boot sector on your computer.

Parameters 

bootsect {/help|/nt60|/nt52} {SYS|ALL|:} [/force]

/help   Displays these usage instructions.

/nt52   Applies the master boot code that is compatible with NTLDR to SYS,
        ALL, or .  The operating system installed on SYS, ALL, or
        must be older than Windows Vista.

/nt60   Applies the master boot code that is compatible with BOOTMGR to SYS,
        ALL, or .  The operating system installed on SYS, ALL, or
        must be Windows Vista or WindowsServer "Longhorn".

SYS     Updates the master boot code on the system partition used to boot
        Windows.

ALL     Updates the master boot code on all partitions.  ALL does not
        necessarily update the boot code for each volume.  Instead, this
        option updates the boot code on volumes that could be used as Windows
        boot volumes, which excludes any dynamic volumes that are not
        connected with an underlying disk partition.  This restriction is
        present because boot code must be located at the beginning of a disk
        partition.

Updates the master boot code on the volume associated with this
        drive letter.  Boot code will not be updated if either 1)
        is not associated with a volume or 2) is
        associated with a volume not connected to an underlying disk
        partition.

/force  Forcibly dismounts the volume(s) during the boot code update.  You
        should use this option with caution.

        If Bootsect.exe cannot gain exclusive volume access then the file
        system may overwrite the boot code before the next reboot.
        Bootsect.exe always attempts to lock and dismount the volume before
        each update.  When /force is specified, a forced dismount is attempted
        if the initial lock attempt fails.  A lock can fail, for example, if
        files on the target volume are currently opened by other programs.

        When successful, a forced dismount allows exclusive volume access and
        a reliable boot code update even though the initial lock failed.  At
        the same time, a forced dismount invalidates all open handles to files
        on the target volume.  This could result in unexpected behavior from
        the programs that opened these files.  Therefore, you should use this
        option with caution.

Example:

To apply the master boot code that is compatible with NTLDR to the volume
labeled E:, use the following command:

bootsect /nt52 E:

Restoring the Windows XP bootloader on my machine 

These are the steps I took to restore the Windows XP bootloader:

  1. Booted in Windows XP
  2. Formatted the Vista partition
  3. Inserted the Windows Vista installation DVD
  4. Executed bootsect.exe as follows:
    X:\Boot\bootsect.exe /nt52 C: /force
  5. Reboot the machine

Cross-posted from The .NET Aficionado