Change the Active Partition in Windows XP

This shows how to change the active partition (or sometimes called "boot" partition) in Windows XP. This can be useful in numerous scenarios, for example:

  • If you have installed Windows XP two or more times on the same hard drive in different partitions and you want to switch between these installations without using a boot loader.
  • If, for some reason, you want to delete the active partition while Windows is running. Windows won't let you do that, so you'll have to set another partition as the active partition first before you can delete the old active partition.

Steps

  1. Click Start, press "Run" and type "diskmgmt.msc". It will look like this (image to the right). Look for the Hard Disk on which your system is installed on and remember the disk number (disk 0, disk 1 and so on). Then, look at the disk's partitions which are listed from left to right, and remember the partition number which you want to be the active partition (the left most partition is number 1, and so on).
  2. Important precaution: In the following steps, you're going to change the active partition of your hard drive, sometimes called the "boot partition". Before you do that, make sure that you have installed Windows XP on the partition to be activated. If you set a new active partition and there is no Windows XP installed on that partition, the Windows XP boot loader will look for an operating system on the new active partition, but will fail to do so and your computer will not boot at all. In this example, I had already installed Windows XP on the partition to be activated. It's also possible to just copy your Windows XP installation from the old active partition to the new active partition, but not while that Windows XP installation is running.
  3. Download HxD, a Hex Editor. I cannot link to it here because wikiHow doesn't allow the download link for whatever reason, so just do a Google search for "hxd". You can download the portable edition which does not need to be installed. You can use any other hex editor you like, but it needs to be capable of opening system drives.
  4. Start HxD, click "Extras -> Open Disk", uncheck "open as read-only" and open your hard drive where Windows is installed on. You should have remembered the correct disk number from step 1 (note that HxD starts counting disks at 1 not 0 like the diskmgmt.msc).
  5. Do not be afraid of what you see, it's easier than you may think. Let's go! What you see here is the first sector (sector 0) of your hard drive which contains the boot loader code, the master boot record and the partition table. Look for the last 5 lines of the first sector (sector 0). The sector ends with "55 AA". This is where the partition table is stored. It starts at offset 1BE and ends at 1FD. We need to change the "bootable" flag of our partitions. It can only have two states: "80" means bootable, and "00" means non-bootable. The bootable flags of the four primary partitions are located at offset 1BE, 1CE, 1DE and 1EE. Look at the image to the right where I highlighted the bootable flag of the four primary partitions. In my example, the first partition is bootable because the bootable flag says "80", while the second, third and fourth partitions are not bootable because their bootable flag says "00". So you may have already guessed what to do now, overwrite the old bootable flag with "00" and change the new partition's bootable flag to "80". Do not set two partitions as bootable, this is not allowed and may lead to a non-booting system. Only one of the four partitions may have the bootable flag set. DO NOT reboot your computer yet, you have to finish the next step first!
  6. You have now set your new partition as the active partition (or "boot" partition as it's called sometimes). Now there's one important thing left. When your computer boots and runs the Windows XP boot loader, it will look for the Windows XP startup bootstrap files. If these files are missing on your new active partition, your system won't boot. If you have installed Windows XP on different partitions on the same hard drive, the startup bootstrap files might only be present on the current active partition. So you'll have to copy these files from your old active partition to the new active partition. Have a look at the image to the right, where the needed files are highlighted (8 files). Do not include pagefile.sys, this is NOT needed. Copy these 8 files to your new active partition. In my example, I copied the 8 files from C: to D:. Again, important note: Windows XP has to be installed on your new active partition in order for this to work. If it's not, your system will not boot.
  7. Reboot your computer, and it should boot from your new active partition.