Backtrack:  
 
by lunarg on February 13th 2010, at 15:25

If you come across a problem where you can't do anything but install a Windows XP alongside a Vista or Windows 7, don't despair, as it is quite easily done.

  1. First you have to repartition your HD. If you have a second HD you're not using, you can ignore this step. If not, you probably have to resize one of the present partitions. But in order to get the maximum out of the resizing, make sure the partition you're about to resize, is defragmented properly. Note that you cannot resize FAT32 partitions (but who uses that nowadays, anyway).
    The resizing can be done through Disk Management. Select the system or another partition, right-click and select Shrink volume. Windows will calculate the shrinkable space and allow you to adjust its proposal. Set the numbers to your liking. When done, you should see a new unpartitioned space. This is enough for now.
  2. Fire up your Windows XP installation disk and do your installation.
  3. When completed, re-insert your Windows Vista or Windows 7 cd, and perform a startup repair to restore the MBR and boot partition. Then, reboot into Windows Vista or 7.
  4. Add the Windows XP bootloader to the Windows Vista or 7 bootloader (see below).
  5. When rebooting, you should now see two entries in the bootloader. If you want, you can change or enable/disable the timeout, and/or change the default selected OS.
Windows 7 only: correcting the location of ntldr

If you're running Windows 7, there's an additional system partition which is by default not accessible from within Windows 7. It is a standard NTFS partition, though. This means that Windows XP will treat it as one, and see it as drive C:. As ntldr (the XP bootloader) by default gets placed on the first writable partition it finds, it gets placed in there. However, the Windows 7 bootloader does not have access to it, meaning that once you restore Windows 7's boot settings, you can no longer boot into Windows XP until you relocate ntldr.

To do this from within Windows 7, follow these instructions:

  1. First, because the partition is not accessible by default, go to Disk Management and map the system drive to a letter. In my sample, I chose B:
  2. Next, open an elevated command prompt and copy ntldr and boot.ini to a location outside the system partition. I chose to put them on my Windows 7 partition, but it does not really matter which partition you choose, just as long as you put it in the root of that partition.
    To be able to copy the files, you need to remove their hidden and system attributes.
  3. b:
    attrib -s -h ntldr
    attrib -s -h boot.ini
    move ntldr C:\
    move boot.ini C:\
  4. When copy (or move) is done, restore the system and hidden attributes.
  5. c:
    attrib +s +h ntldr
    attrib +s +h boot.ini
  6. Now, set up the Windows 7 bootloader. See instructions below, and adjust your device letter accordingly.

If you're still inside Windows XP, it's a bit easier but similar: copy ntldr and boot.ini from the system partition (usually drive C:) to another one.

Adding Windows XP to the Vista/7 bootloader

To add Windows XP bootloader, you need administrative rights. Log in as an administrator, or open an elevated command prompt.

  1. In the command prompt, add a new entry to the bootloader menu:
  2. bcdedit /create {ntldr} /d "Windows XP"
  3. Next up, set the device to the partition where ntldr is located. This is not necessarily the same as where you've installed Windows XP. If you're running Vista on the first partition, I will likely have ended up there. In that case, it has to be drive C:.
    If you're running Windows 7, you will first have to relocate ntldr, and adjust the drive letter accordingly.
  4. bcdedit /set {ntldr} device partition=C:
  5. Next, point the menu to the NT loader (the Windows XP bootloader) on that partition.
  6. bcdedit /set {ntldr} path \ntldr
  7. Now, although the boot item exists, it is not yet inserted into the boot menu for selection. To add it, use the command below. Note that you can replace /addlast with /addfirst to add it above Windows Vista / 7.
  8. bcdedit /displayorder {ntldr} /addlast
  9. And that's it. Reboot the computer, and you will be greeted with the Windows boot menu, where you can select to boot either Vista / 7 or XP.