TechRepublic : A ZDNet Tech Community

Microsoft Windows

Host: Mark Kaelin
Contact

Migrate to Windows 7 from an XP dual-boot configuration

In last week’s edition of the Windows Vista and Windows 7 Report, “Create a Windows XP and 7 Dual-Boot System Staged for an Easy Migration,” I showed you how to resize your existing Windows XP partition and then install Windows 7 in a dual-boot configuration on the same hard disk. As you’ll remember, the goal was to make the task of migrating your settings, documents, and applications from XP to Win 7 a much more relaxed experience since you can boot into Windows XP to check out how something is set up and then boot into Windows 7 to re-create the same configuration.

Once you complete your migration and are comfortable working in Windows 7, you’ll want to remove the dual-boot configuration, remove Windows XP, and just boot Windows 7 as your primary OS. In this edition of the Windows Vista and Windows 7 Report, I’ll show you how to safely undo Windows XP and 7 dual-boot system so that you can complete your migration from Windows XP to Windows 7.

This blog post is also available in PDF format in a free TechRepublic download.

Label the drives

In order to make it easy to identify which partition is which throughout this operation, you need to make sure that each partition or drive is labeled. In either Windows XP or Windows 7, open My Computer and label or rename each drive with the name of the operating system, as shown in Figure A.

Figure A

Labeling each drive, which is a simple rename operation, will make it easy to identify which partition is which throughout this operation.

As you can see here, this screen shot was taken in Windows XP, which in this case assigned the Windows 7 partition to drive E and its partition to drive C. On the other hand, Windows 7 assigns the Windows XP partition to drive D and its partition to drive C. For the purposes of this operation, it really doesn’t matter what drive letter is assigned to a partition, because we know that Windows XP is on the first partition and Windows 7 is on the second partition. However, labeling each drive will help you to keep them straight in the event that the drive letter swapping catches you off guard.

Creating a System Image

The first thing that you’ll want to do is protect all your hard work by creating a System Image from within Windows7’s Backup and Restore. When you do, you’ll end up with a complete image of your hard disk that includes both the Windows XP and Windows 7 partitions in a dual-boot configuration. That 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 a system image, you’ll need to have a CD-RW/DVD-RW drive, an external hard disk, or access to a network drive. For my system, I used an external hard disk. To access Backup and Restore, click the Start button, type Backup in the Search box, and press [Enter] when Backup and Restore appears in the result pane.

Once you have Backup and Restore up, select Create a System Image, select your backup location, and then launch the operation to create an image of both drives. The procedure is shown in Figure B.

Figure B

Create a system image that contains both drives in the dual-boot configuration as a safety precaution.

Make a data backup

Even though the system image is a backup, you’ll want a separate backup of all your data — at least one and maybe two, just in case. Maybe just make copies of all your data files on CD/DVD or on an external hard disk. While it may sound like overkill, having an extra backup will give you peace of mind.

Copying boot files

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 Windows XP partition. As such, if the goal is to remove the Windows XP partition and boot from the Windows 7 partition, the next step involves copying the Windows Boot Manager files from the Windows XP partition to the Windows 7 partition.

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. Then, access the root of drive C and locate the Boot folder and the bootmgr file, as shown in Figure C.

Figure C

You’ll need to make sure that these settings are configured in the Folder Option dialog box in order to be able to see the Windows Boot Manager folder and file.

Now, open a second instance of Windows Explorer, access the root of the Windows 7 partition, which in the case of my example is drive E, and then copy the Boot folder and the bootmgr file from the root of drive C to the root of drive E, as shown in Figure D.

Figure D

You’ll need to copy Windows Boot Manager’s folder and file from the Windows XP partition to the Windows 7 partition.

Manipulating the partitions

With your system image backup in place and Windows Boot Manager now on the Windows 7 partition, you’re ready to delete the Windows XP partition and configure the Windows 7 partition as the main partition. To do so, you’ll boot your system from the Windows 7 DVD, access the System Recovery Options toolbox, use the DiskPart command to manipulate the partitions, and then use the BootRec command to enable Windows Boot Manager on the Windows 7 partition.

To begin, 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, as shown in Figure E, select the Command Prompt option. (As you can see, when booting off the CD, the Windows 7 partition is assigned to drive letter D. However, since we labeled the drive, we can tell for sure that it is the correct drive.)

Figure E

You’ll select the Command Prompt option from the second System Recovery Options dialog box.

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.

  1. Type the command:

Diskpart

  1. Once the Diskpart environment is ready, select first hard disk by typing the command:

Select disk 0

  1. Once the first hard disk has the focus, select the first partition (Windows XP) by typing the command:

Select partition 1

  1. Just for peace of mind, you may want to double-check that you have the Windows XP partition selected by typing the command

Detail partition

  1. Delete the Windows XP partition by typing the command:

Delete partition

  1. Now select the Windows 7 partition by typing the command:

Select partition 2

  1. Make the Windows 7 partition the active primary partition by typing the command:

Active

  1. Exit the DiskPart environment by typing the command:

Exit

At this point, you are ready to enable the Windows Boot Manager on the Windows 7 partition using the BootRec command.

  1. Write the master boot record to the Windows 7 partition by using the command:

Bootrec /fixmbr

  1. Write a new boot sector to the Windows 7 partition by using the command:

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.

Booting Windows 7

When your system restarts, you’ll see the Windows Boot Manager menu and Windows 7 should be 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. To do so, open a Command Prompt window with Administrator privileges. (Right-click and select Run as Administrator.) Then, type the command:

BCDEdit /delete {ntldr} /f

Now, restart the system and you should boot right into Windows 7.

Further cleanup

If you look at your hard disk with Disk Management, you’ll discover that the partition that used to hold Windows XP is still there at the beginning of the disk but that it is marked as unallocated, as shown in Figure F.

Figure F

Unfortunately, Windows 7’s Disk Management tool is unable to extend drive C into unallocated space at the beginning of the disk.

If you wish, you can configure the unallocated space as a simple volume and it will become drive D. (Right-click on the unallocated block and select the New Simple Volume command.)

On the other hand you can just leave it be for now, and in a upcoming article, I’ll show you how to redistribute that unallocated space to drive C. Unfortunately, since the unallocated space is at the beginning of the disk, Windows 7’s Disk Management tool is unable to extend drive C into that space. In order for that to be possible, Disk Management requires that the unallocated space be at the end of the disk.

What’s your take?

Using this technique, you can essentially undo a dual-boot configuration and complete your migration from Windows XP to Windows 7. Will you use this procedure? If you have any questions or comments concerning this technique, please take a moment to drop by the TechRepublic Community Forums and let us hear from you.

TechRepublic’s Windows Vista and Windows 7 Report newsletter, delivered every Friday, offers tips, news, and scuttlebutt on Vista and Windows 7, including a look at new features in the latest version of the Windows OS. Automatically sign up today!

Read the third article in this series, Capture unallocated disk space from an XP to Windows 7 dual-boot migration, and learn how to redistribute the unallocated space at the beginning of the hard disk back to drive C, thus making Windows 7 the first and only partition on the hard disk.

Greg ShultzGreg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry. Read his full bio and profile.

Print/View all Posts Comments on this blog

No more dual boot Mark W. KaelinTechrepublic Moderator | 10/28/09
Yes, but....... steve@... | 10/29/09
No installation DVD...no problem isrcourt | 10/29/09
Thanks, I'll try that steve@... | 10/29/09
XP-W 7 Dual boot joseph.r.piazza@... | 10/29/09
Yes, you can... Greg Shultz | 10/29/09
Yes you can__Done with XP joseph.r.piazza@... | 10/30/09
Ok, then this is... Greg Shultz | 10/30/09
Sorry for the confusion... Greg Shultz | 11/02/09
That just sounds odd... Greg Shultz | 10/29/09
Win7 Upgrade Path steve@... | 10/29/09
So I see... Greg Shultz | 10/29/09
Student offers Gis Bun | 11/02/09
Never have, never will mmaux@... | 10/29/09
try Virtual pc svl@... | 10/29/09
Only works in certain cases mmaux@... | 10/29/09
No Way am I Switching! gothicgeek77 | 10/30/09
Not only that... gvtooker@... | 10/30/09
How Right You Are... gothicgeek77 | 11/02/09
member since Oct 2009 :) hmmmm. convenient Another Canadian | 01/18/10
Migration Problem romeojg30 | 11/04/09
A Verifying DMI Pool Data error... Greg Shultz | 11/04/09
RE romeojg30 | 11/05/09
No, the error definitely... Greg Shultz | 11/05/09
Commands were followed correctly... romeojg30 | 11/21/09
Going back to XP max@... | 11/08/09
To go back to Windows XP... Greg Shultz | 11/09/09
RE: Having the same problem (mwchub) roger.denat@... | 12/02/09
RE: Having the same problem mwchub | 12/03/09
Windows 7 ISO rromanowski@... | 12/08/09
2 tries, 2 machines, 2 failures maysonjar | 12/10/09
Ah, 3rd time's the charm maysonjar | 12/10/09
how to remove window xp from dual xp/window 7 techno_mark | 12/18/09
What about RAID drives? marcpen@... | 10/29/09
When you say... Greg Shultz | 10/29/09
That makes sense marcpen@... | 10/29/09
Why? reisen55@... | 10/29/09
Not insane, makes it more fun..... madcowbrewing | 10/29/09
Dual boot XP migrate to Win 7 PoppaTab | 10/29/09
Big Difference: Home and Client computers reisen55@... | 10/30/09
SID : Vicious gdunger | 10/29/09
RE: Migrate to Windows 7 from an XP dual-boot configuration claes.huittinen@... | 10/30/09
RE: Migrate to Windows 7 from an XP dual-boot configuration Peter.K.L.Milnes@... | 10/30/09
RE: Migrate to Windows 7 from an XP dual-boot configuration mikeshanahan@... | 11/02/09
Another way to handle old bootloader father.nature@... | 11/02/09
Extend Drive C into Unallocated Space jahsoldier | 11/02/09
Stay tuned... Greg Shultz | 11/02/09
RE: Migrate to Windows 7 from an XP dual-boot configuration alan.bancroft@... | 11/07/09
Not sure about RAID Greg Shultz | 11/07/09
RE: Migrate to Windows 7 from an XP dual-boot configuration sam_tech | 11/08/09
Your guess is correct... Greg Shultz | 11/09/09
RE: Migrate to Windows 7 from an XP dual-boot configuration Daren253 | 11/10/09
Portlock Leap Frog sounds... Greg Shultz | 11/11/09
RE: Migrate to Windows 7 from an XP dual-boot configuration roger.denat@... | 11/14/09
RE: Migrate to Windows 7 from an XP dual-boot configuration PoppaTab | 11/15/09
RE: Migrate to Windows 7 from an XP dual-boot configuration roger.denat@... | 11/15/09
Diskpart commands Greg Shultz | 11/16/09
RE: Diskpart commands roger.denat@... | 11/16/09
Not sure... Greg Shultz | 11/16/09
When you say... Greg Shultz | 11/16/09
RE: When you say... roger.denat@... | 11/16/09
RE: When you say.. PoppaTab | 11/16/09
Yes, Type 7... Greg Shultz | 11/16/09
RE: Yes. Type 7... roger.denat@... | 11/16/09
Tried again, same result roger.denat@... | 11/17/09
Error in previous post roger.denat@... | 11/17/09
Having the same problem! mwchub | 12/01/09
RE: Migrate to Windows 7 from an XP dual-boot configuration finmat | 11/15/09
RE: Migrate to Windows 7 from an XP dual-boot configuration PoppaTab | 11/15/09
This is insane - try Zinstall or at least XP mode MackG | 11/15/09
This is not insane, but thanks for... Greg Shultz | 11/16/09
This is not insane, but thanks for... PoppaTab | 11/16/09
Migrate to Windows from a Vista dual-boot configuration finmat | 11/17/09
Yes... Greg Shultz | 11/18/09
vista to Win 7 finmat | 11/19/09
RE: Migrate to Windows 7 from an XP dual-boot configuration jamescherrill | 11/20/09
How about... Greg Shultz | 11/20/09
Yes, was booted into W7 jamescherrill | 11/20/09
Same wherever booted jamescherrill | 11/21/09
What about on... Greg Shultz | 11/23/09
Found another way... jamescherrill | 11/24/09
Glad to hear that... Greg Shultz | 11/24/09
RE: Migrate to Windows 7 from an XP dual-boot configuration am224@... | 11/22/09
Similar problem! wrgriffjr@... | 11/22/09
Just to be sure... Greg Shultz | 11/23/09
Worked round problem am224@... | 11/23/09
Glad to hear... Greg Shultz | 11/23/09
Maybe problem with Win 7 disc am224@... | 11/24/09
Still struggling wrgriffjr@... | 11/25/09
I need to see the... Greg Shultz | 11/27/09
Results wrgriffjr@... | 11/28/09
Using the BCDEdit command Greg Shultz | 11/30/09
Tablet PC MPG187 | 12/01/09
Chances are... Greg Shultz | 12/01/09
RE: Migrate to Windows 7 from an XP dual-boot configuration winkpain | 12/09/09
Not exactly sure why... Greg Shultz | 12/09/09
No typo winkpain | 12/09/09
Can you see... Greg Shultz | 12/10/09
gave up winkpain | 12/11/09
RE: Migrate to Windows 7 from an XP dual-boot configuration Will-V-King | 12/17/09
Essentially... Greg Shultz | 12/18/09
RE: Migrate to Windows 7 from an XP dual-boot configuration estephen4@... | 12/22/09
Directions resulted in an XP only boot tjrobinson | 01/17/10
Restore worked fine. Now retrying tjrobinson | 01/18/10
RE: Migrate to Windows 7 from an XP dual-boot configuration NEW ga.shepard@... | 02/09/10

What do you think?

White Papers, Webcasts, and Downloads

Recent Entries

TR on Twitter

Archives

TechRepublic Blogs



Quick Reference: Linux Commands
Reduce stress and speed up resolutions with the easiest command references right at your fingertips. You'll receive a PDF file covering Linux, packed with the most common commands you'll need and use daily.
Buy Now
500 Things Every Technology Professional Needs to Know
Did you know Microsoft's RegClean does not work with XP but you can use shareware to clean your registry? Did you know most wireless access points don't have encryption enabled by default? Did you know there are 500 tidbits of information contained in TechRepublic's 500 Things Every Technology Professional Needs to Know that will help you become a successful IT professional.
Buy Now

SmartPlanet

Click Here