Cloning a Windows 10 installation across disk technologies
Author: Joe
Date: 12/17/2016 09:52:00
A while back, I decided it was time to upgrade by desktop system, and bought one of the new Intel NUC's (Skull Canyon.) To cut back on the initial cost, I've been running off the mSATA drive from my old desktop system via a mSATA->USB 3.0 adapter (with surprisingly good performance.) I decided it was time to get proper storage, and picked up a Toshiba/OCZ RD400 256 GB NVME m.2 drive (try saying that 5 times fast!)
Since my existing Windows installation was sat up exactly how I liked it, I wanted to clone it to my new drives. This proved a bit difficult...especially with switching from USB to m.2...and using GPT partitions with UEFI...so I'm going to outline the steps I used in case it helps someone else:
Items you'll need:
- Original storage device
- New storage device
- 2 USB Flash Drives (at least 8 GB each)
Before swapping the drives, perform the following steps:
Step 1 - Download drivers!
- If your new drive is on a completely different bus from your original drive (i.e. upgrading from SATA to m.2), you MUST download and extract the drivers for the new bus to a folder on your hard drive...otherwise your machine WILL NOT BOOT at the end of this process. In my case, I downloaded the Toshiba/OCZ NVME drivers and extracted the "x64" folder to C:\nvme
Step 2 - Creating the Clonezilla USB boot drive:
- Download Clonezilla Alternate Stable ISO for amd64
- While the ISO is downloading, format one of your flash drives for FAT32.
- Mount the ISO in Windows by double clicking it, and copy all files directly into the root of the flash drive.
- Remove the flash drive.
Step 3 - Creating the Windows 10 USB Installer boot drive:
- Plug in your second flash drive.
- Download the Windows 10 Media Creation Tool and run it.
- Click Create Installation Media for another computer.
- Check "Use the recommended options for this PC" and click next.
- Click "USB flash drive" and click next.
- Select the flash drive from the list, and click Next.
- Once the process is complete, shut down the computer.
Step 4 - Clone the drive
- Install the new drive in your computer, insert the Clonezilla flash drive, and start your computer. You may need to change your BIOS options to allow booting from the flash drive.
- The Clonezilla boot menu will pop up. For most systems, just press enter. In my case, the only option that would successfully boot was "(Default settings, KMS)"
- You can press Enter to the language and keyboard prompts.
- Select Start Clonezilla and press Enter.
- Select Device-Device and press Enter.
- When asked what mode you want to run in, select Expert and press Enter.
- Select disk_to_Local_disk and press Enter.
- The next few screens will have you select the source disk, the target disk, and prompt you with a large list of steps you can choose to do to the drive. When the large list pops up, uncheck the option to install grub (for a Windows partiton, you don't need it.)
- All of the other steps in the wizard, leave it set to the defaults and press Enter, except for the step that asks what you want to do after the clone. On this step, select "Power Off" and press Enter.
- Once everything is configured, Clonezilla will ask you twice if you're sure you want to clone the drive. Confirm away, and the clone process will start. Once the system powers off, proceed to Step 4
Step 5 - Make Windows bootable again
- With the machine powered off, remove the original storage device. THIS IS A MUST! With GPT-based drives, there is a GUID that identifies which partition Windows should boot from. Since you cloned the drive, there's now two drives with identical GUID's.
- Insert the Windows 10 Installer flash drive and power on the computer.
- Once booted into the Installer, select your language and click Next.
- Down in the lower left corner, select "Repair my computer."
- Click Troubleshoot -> Advanced options -> Command Prompt
- Type "diskpart" and press enter.
- Type "list disk", press enter, find the number of your new storage device, and type "select disk x" (replacing x with the number of the drive) and press enter.
- Type "select partition 1" and press enter (partition 1 is your EFI boot partition.)
- Type "assign" and press enter.
- Type "exit" and press enter.
- If your new storage device is the only drive on your system, type "D:" and press enter. Then type "dir" and press enter, and you should see an EFI folder. If not, continue to try other drives above "D:", like "E:", "F:" etc. until you find one with an EFI folder. Don't use "X:", as that's the flash drive.
- Once you find the EFI folder, type "cd EFI\Microsoft\Boot" and press enter.
- Now, type "bcdedit /store bcd" and press enter. Most systems will have 2 sections listed, one for {bootmgr} and one for {default}. In most cases, you want to modify the {default} section. We're going to tell the Windows bootloader how to find the correct boot partition.
- Type "bcdedit /store bcd /set {default} device partition=C:" and press enter.
- Type "bcdedit /store bcd /set {default} osdevice partition=C:" and press enter.
- Now that the BCD has been fixed, install the drivers you downloaded in step 1 by typing "dism /image:C:\ /add-driver /driver:C:\nvme" and press enter. The reason you have to do this is your original hard drive was on a completely different bus, and the driver needed to read from the new drive (and continue the boot process) is missing. This installs the driver so the boot process can find it.
- Type "exit", restart the system, and pull out the flash drive.
If everything goes as planned, you'll be looking at the Windows 10 login screen from your new storage device. :-)
If you wish to use the old drive for storage, I would recommend either creating a new partition table/formatting the drive from a different PC. The GUID's are still identical, and may cause your system to either boot from the wrong drive, or cause your new drive to not boot at all.