How to copy a Windows installation
This page provides assistance in seemlessly copying a working Windows installation to a new partition/harddrive, so that afterwards it seems like nothing has happened. |
Filesystem based copy of Windows 2000 or XP
A similar process, however, involving a temporary second Windows installation has proven to be reliable. Also, since no modification to your old harddisk is done, data loss is unlikely. However, it is possible.
If you want to transfer a working Windows 2000 or XP installation to a new harddrive, the following method has proven reliable. After the process your system will boot into the new system as if nothing would have happened.
The Process
The outline of the process is as follows:
- We use Windows to partition your new harddrive and format the new Windows partition.
- We copy the whole content of your old Windows partition to the destination partition.
- We tweak the registry on the destination partition.
- We boot the destination partition.
The Advantages
- After the process your new Windows will be exactly the same as the old one (see notes below).
- Since we use Windows to partition the new drive we make sure the partition table is compatible.
- Since the copy is filesystem based, your new installation will automatically be defragmented.
- Your destination can be bigger (or even smaller) than the source one, without the need of using tools like ntfsresize afterwards.
- We only use builtin tools, except for scopy, which is part of the Windows NT Server Resource Kit.
Prerequsites
- This guide assumes that you can connect a second harddrive to your ThinkPad, be it via USB, PCMCIA or a UltraBay harddrive adapter.
- Get scopy from here and place it on your old partition.
Preparation
- Attach the new harddrive to your ThinkPad.
- Boot up your Windows installation.
- Open the Disk Management Interface and partition your new harddrive. Set the partition that your system should be copied to as active. Also assign a drive letter, we will assume it is T: .
- Format this partition as NTFS in long format. This is important, because else the boot sector will not be installed to that partition.
Copying
Open the command line interface (cmd.exe) and use scopy to copy all files from your old partition to the new one. Lets assume, your old system is on C:, then the command would be:
- <path_to_scopy>\scopy.exe C:\*.* T:\ /a /o /s
We do this with scopy, because scopy preserves NTFS file attributes and access rights while copying.
Wait patiently till the copy is finished. You can now open T: in your Windows explorer to check if things went well.
Adjusting drive letters
- After the copy finished, open regedit.
- Mark HKEY_USERS and select "Load Hive..." from the "File" menu. Open T:\WINDOWS\system32\config\SYSTEM.
- You will be promptet for a name for the new hive, you may use i.e. "TEMP". The new hive will be attached to HKEY_USERS.
- Expand HKEY_LOCAL_MACHINE\SYSTEM and select the MountedDevices key there.
- DoubleClick "\DosDevices\T:" and mark the whole binary value. Press CtrlC to copy the value.
- Expand HKEY_USERS\TEMP and select the MountedDevices key there.
- DoubleClick "\DosDevices\C:" and mark the whole binary value. Press CtrlV to replace it with the copied value.
- Mark HKEY_USERS\TEMP and select "Unload Hive..." from the "File" menu. Confirm the request.
- Close regedit.
- Shutdown Windows.
Booting the new System
Now, replace your old internal harddrive with the new one and power up your system again. The new system should boot as if nothing happened.
External Sources
- This article is based on information found on http://gamma.nic.fi/~point/win2copy.htm.