Can xcopy make a bootable copy (clone) of Windows?

Following on from my discussion with @JustinD in the comments here, is it technically possible to simply xcopy the contents of a Windows partition to a partition freshly created and formatted on a new drive, and have the copied OS boot up normally as before?

My understanding is that the MBR is located at the first sector of the drive preceding the first partition, and thus is inaccessible to xcopy. Thus even if all the files are transferred, the lack of a proper boot record on the target disk should prevent it from booting unless a Startup Repair is performed. Looking at all the programs that offer disk/partition cloning, if all that was required was a simple file copy then surely nothing more than a LiveCD/USB would be required for a successful OS transfer? Or one could just connect the new drive, xcopy the OS and then swap drives if it was that simple.

So, can one simply xcopy Windows (and the System Reserved partition, if it exists) and expect it to boot?


Solution 1:

Short answer: no.

You can, however, image (also commonly called "ghost") the drive to another. Norton Ghost, Acronis and other tools exist to accomplish this.

What does work however with Windows XP (not applicable to Vista and up) is starting the installation, letting the file copy finish. Then, delete everything the new installation created except the files in the root of the drive (boot.ini, ntldr, etc). At this point you can copy over all the files (once again, except the root) from the old installation and it will boot back up.

There are very few reasons to do this, but it works!

Solution 2:

For W7 and W8 (should work same) - You can definitely use xcopy in WinPE to do this - you can't do it in Windows while it is running because of file locking.

  1. Boot to WinPE and xcopy the root of C:\ to another disk.
  2. After copied, delete C:\Boot\BCD (file).
  3. Then run bcdboot C:\windows /s D: