Bill Detwiler: In the last episode of TR Dojo, I went over the steps to create a dual-boot system with Windows 7 and Windows XP. The benefit of this set-up was to allow a risk-free transition to the new OS, particularly for those who skipped Vista.
But once you're committed to Windows 7 and want to get rid of XP altogether, how do you migrate away from the dual-boot configuration? I'm Bill Detwiler, and in this episode of TR Dojo, I'll tell you how.
If you're ready to undo the XP partition on your XP/Windows 7 dual-booted system, the first step is clearly label your partitions. To do this, open My Computer from either Windows XP or Windows 7 and label or rename each logical drive with the name of the operating system that exists on that drive.
This will help you to keep the partitions straight in the event that the assigned drive letters get swapped depending on which partition you are looking at.
Next, you need to protect all your hard work by creating a System Image from within Windows 7's Backup and Restore. This will give you a complete image of your hard disk that includes both the Windows XP and Windows 7 partitions in the dual-boot configuration. This way, if anything out of the ordinary were to occur as you follow the steps in this procedure, you will be able to return to your current configuration.
To create the image, you'll need a CD-RW/DVD-RW drive, an external hard disk, or access to a network drive. Click the Start button, type Backup in the Search box, and press [Enter] when you see Backup and Restore.
Select Create a System Image, select your backup location, and then launch the operation to create an image of both drives.
You might want to make additional backups of your data files -- whatever gives you peace of mind.
Now, when you create a dual-boot system and install Windows 7 on a second partition, Setup installs all the Windows Boot Manager files on the first partition, which in this case is the XP partition. So, the next step is to copy the Windows Boot Manager files onto the Windows 7 partition.
First, boot into Windows XP, launch Windows Explorer, pull down the Tools menu, select Folder Options, and on the View tab, make sure that the Show Hidden Files and Folders option is selected and that Hide Extensions for Known File Types and Hide Protected Operating System Files are cleared.
Now locate the Boot folder and the bootmgr file.
Open a second instance of Windows Explorer, access the root of the Windows 7 partition, and copy the Boot folder and the bootmgr file from the XP partition.
With your backups in place and the Windows Boot Manager now on the Windows 7 partition, you're ready to delete the XP partition and configure Windows as the main partition.
First, insert your Windows 7 DVD, restart your system, and, when prompted, select the option to Boot from the DVD. When the first Install Windows screen appears, select the appropriate language preferences and click Next. On the second Install Windows screen, select the Repair Your Computer option.
When you see the System Recovery Options dialog box, the Windows 7 partition should appear in the list and the Use Recovery Tools option should be selected. To continue, click Next.
When the second System Recovery Options dialog box appears and prompts you to choose a Recovery Tool, select the Command Prompt option.
Once the Command Prompt window opens, you'll enter the DiskPart environment and issue a series of commands to select the Windows XP partition, delete it, select the Windows 7 partition, and then make it the active (primary) partition.
First, type the command: Diskpart
Once the Diskpart environment is ready, select first hard disk by typing: Select disk 0
Once the first hard disk has the focus, select the first partition (Windows XP) by typing: Select partition 1
You can double-check that you have the Windows XP partition selected by using the : Detail partition command
Now, delete the Windows XP partition by typing: Delete partition
The select the Windows 7 partition by typing the command: Select partition 2
Make the Windows 7 partition the active primary partition by typing the command: Active
You can now Exit the DiskPart environment by typing: Exit
At this point you must enable the Windows Boot Manager on the Windows 7 partition using the BootRec command.
So first, write the master boot record to the Windows 7 partition by typing: Bootrec /fixmbr
Then write a new boot sector to the Windows 7 partition with: Bootrec /fixboot
Now, close the Command Prompt window and click the Restart button in the System Recovery Options dialog box. Be sure to remove the Windows 7 DVD.
When your system restarts, you should see the Windows Boot Manager menu with Windows 7 selected. Keep in mind that even though Windows XP is gone, the menu will still contain an item for it at this point. Allow the system to boot into Windows 7 and log in as you normally would.
To remove the Windows XP item from the Windows Boot Manager menu, you'll use the BCDEdit command. So, open a Command Prompt window with Administrator privileges and type:
BCDEdit /delete {ntldr} /f
Now, restart the system and you should boot straight into Windows 7.
After removing Windows XP, you'll still have an empty partition which you can configure as a simple volume or reallocate the space. For further instructions on how to reallocate the disk space, check out Greg Shultz's original post, "Capture unallocated disk space from an XP to Windows 7 dual-boot migration."
And as always, for more teachings on your path to becoming an IT Ninja, visit trdojo.techrepublic.com, or you can follow me on Twitter at twitter.com/billdetwiler.
Thanks for visiting the TR Dojo.