Migrate to Windows 7 from an XP dual-boot 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 bootWindows 7 as your primary OS. In this edition of the Windows Vista & 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.

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 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, 7’s 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 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 root of drive C to 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 login 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.

Migrating DHCP from Windows 2000 Server to Windows Server 2008

Getting your infrastructure running like a finely tuned engine is no easy feat; it takes blood, sweat, and tears, not to mention hundred, if not thousands, of hours of configuring, tweaking, and adjusting. So, if your organization decides to move to a Windows Server 2008-based infrastructure, how will you make the change as easy as possible?
Starting all over again just to move to a new server operating system is something to avoid if you can. Microsoft understands this concern and realizes that the easier it is to migrate to a newer version of Windows, the more likely organizations are to make the move.
While there are many things that merit consideration when moving from a Windows 2000 Server- or Windows Server 2003-based network to a Windows Server 2008-based network, there is one important service that will make or break your migration: DHCP. If you blow it, everyone will know it!
DHCP is one of two foundational network services that govern how your network operates; the other is DNS. Migrating a Windows 2000 Server/Windows Server 2003 DNS database to Windows Server 2008 is a simple process, sometimes requiring nothing more than a configuration change to DNS; at its most complex, it requires the completion of a zone transfer between the old and new servers to migrate DNS information. DHCP, on the other hand, has no built-in mechanism to easily transfer its database information from one server to another. But with a little bit of work, it doesn’t require too much effort to migrate your DHCP services from your Windows 2000 Server/Windows Server 2003 to Windows Server 2008.
There are different steps depending on whether you’re moving DHCP from Windows 2000 Server or Windows Server 2003. Here are descriptions of both processes.

Migrating DHCP from Windows 2000 Server to Windows Server 2008

The process to migrate your Windows 2000 Server DHCP database to Windows Server 2008 requires a two-step strategy. First, you’ll export the DHCP settings from your old Windows server. Then, you’ll import those settings into the server that’s running Windows Server 2008. You should be prepared to spend about 15-20 minutes performing the procedure, assuming that you already have Windows Server 2008 installed and configured ahead of time. It’s also assumed that you’ve installed the DHCP role on the Windows Server 2008 computer.
On the old server: Moving the settings out
Migrating the DHCP database settings off of your old Windows server is a fairly simple task. You’ll need to disable the DHCP service on the old Windows server so that it cannot be started again. To do this, you’ll use the Services console in the Administrative Tools folder. Double-click the DHCP Server item and select Disabled, as shown in Figure A.

Figure A

Disable the DHCP service on the Windows 2000 Server.
After disabling the service, stop the currently running DHCP service; either click the Stop button shown in Figure A or issue the net stop dhcpserver command from the command line. After disabling and stopping the running DHCP service, all that remains to be done on the legacy Windows server is to export the DHCP database information so that it can be transferred to the Windows Server 2008 computer.
You can do this using the Registry Editor (regedt32). Save the appropriate key to another location, such as a networked drive that is accessible to both the Windows 2000 Server and the server running Windows Server 2003. Open the Registry Editor and navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ DhcpServer\Configuration key.
Once there, click the Registry menu and select Save Key, as shown in Figure B. Save the key with a name that you will recognize, such as config.key.

Figure B


You can save the key here.
You’ll need to copy the entire contents of the %SystemRoot%\System32\Dhcp folder (Figure C) to another location, preferably the same network drive where you placed the configuration key previously. Now it’s time to move to the server that’s running Windows Server 2008.

Figure C

Export the Configuration key to migrate the Windows 2000 DHCP server settings.
On the new server: Moving the settings in
To migrate your DHCP configuration to Windows Server 2008, you’ll need to have already installed the DHCP Server service on the computer. If you have not done so, you can do this from the Server Manager available on the Start menu.
Once the DHCP service is installed, you’ll need to stop it so you can import the DHCP configuration. To do so, from a command prompt, issue the command net stop dhcpserver. Now you’re ready to import the DHCP configuration into Windows Server 2008.
First, import the registry key that you previously exported. On the server that’s running Windows Server 2008, double-click the registry file that you exported earlier. When asked to verify the operation, choose Yes.
The next step you’ll need to complete is the transfer of the %SystemRoot%\System32\Dhcp folder contents. Navigate to this location and delete all contents in the folder, including all subfolders and their contents. Copy the information into this folder that was previously taken from the Windows 2000 Server’s DHCP folder.
After you complete this step, you can begin putting your new Windows Server 2003 DHCP server in operation. You’ll need to start the DHCP Server service by issuing net start dhcpserver from a command prompt. You should receive the confirmation dialog box shown in Figure D.

Figure D

Start DHCP after you copy the old files.

Migrating DHCP from Windows Server 2003 to Windows Server 2008

Migrating DHCP from Windows Server 2003 to Windows Server 2008 is easier than migrating from earlier versions of Windows. This procedure assumes that the existing DHCP server is running on Windows Server 2003 and that you’ve already installed the DHCP server role on your Windows Server 2008 server. (Note: IPv6 DHCP capability is not discussed in this column.)
Follow these steps:
  1. Start a command prompt on the Windows Server 2003 DHCP server.
  2. At the prompt, type netsh dhcp server export C:\w2k3-dhcp.txt all.
  3. Copy w2k3-dhcp.txt to the root of the C: volume on your new server.
  4. On the new Windows Server 2008 DHCP server, start a command prompt.
  5. At the prompt, type netsh dhcp server import c:\dhcpdatabase.txt all.
  6. Start the DHCP administrative console and verify that your scopes and configurations made their way to your new server.

Post migration

Once the migration is complete, you’ll need to do some tidying up within the DHCP console. Open the DHCP console from the Administrative Tools folder and reconcile all scopes by clicking Action | Reconcile All Scopes. If any leases are found that need to be reconciled, click Reconcile to synchronize the DHCP Registry and Active Directory settings.
Verify that your DHCP server is operating properly by opening the DHCP console and checking your configuration, as shown in Figure E.

Figure E

Once the scope shows the Status is Active, all is well.
Note: Editing the registry is risky, so be sure you have a verified backup before saving any changes