Sunday Project: Upgrade Hard Drive for Windows 10
“It’s been a long time…”
– Jimmy Page [Led Zeppelin]
It’s been too long since my last post.
Well, my wife’s laptop started getting the popup to reserve her copy of Windows 10 so I thought I’d spend a Sunday doing the upgrade. The problem was that the hard drive in her laptop was just about full. The laptop was a few years old and the drive (120GB) which might have been enough when it was new just wasn’t making the cut lately.
To be honest with her birthday coming up next month it’s about time to get her a new laptop.
Anyway, I needed to replace the original hard drive with a larger one so I could 1) complete the Windows 10 upgrade and 2) giver her some breathing room for a while.
The upgrade from Windows 7 to Windows 10 is pretty straight forward and well documented so I’m not going to focus on that. Instead I’m focused on the process of cloning her hard drive to the bigger drive.
I wanted to do this as simply as possible and free. I’m not a cheapskate but I don’t want to spend money on something that I’m only going to use once. DISM from the Windows ADK fit the bill.
Now, I’m going to say this up front. This is NOT a quick project. This took about 6 hours to complete. Most of the time is spent waiting for the backup and the restoration to complete, but just know that it is going to take quite some time.
What you will need.
- 1 USB Flash Drive (512MB is more than enough)
- 1 USB Hard Drive (I used an empty 250GB drive)
- A machine with the Windows ADK installed (I used ADK 8.1)
- Replacement Hard Drive (I used a spare 250GB SATA drive)
- Time, lots of time
What you will do.
- Create a USB Windows PE flash drive
- Back up the original drive
- Replace the original drive
- Prep the new drive
- Restore to the new drive
(Then of course, upgrade to Windows 10.)
Create a USB Windows PE Flash Drive
First things first, you need to create a bootable flash drive with Windows PE using the Windows ADK. This will give you a WinPE flash drive which will include DISM. From the “Technician Computer” (as Microsoft calls it) open the “Deployment and Imaging Tools Environment” from the ADK.
Next, enter the command:
CopyPE <architecture> <path to working folder>
CopyPE x86 C:\WinPE_x86
This creates a 32bit Windows PE setup in the folder C:\WinPE_x86. Make sure that this folder does not exist already otherwise the CopyPE command will complain.
Now, DISM is all I’m interested in and that’s already included with WinPE by default. So, the next step will be to create the bootable flash drive. Insert your flash drive and note the drive letter.
[Important! This will erase EVERYTHING on the flash drive so make sure it’s already blank or you have already copied off anything you would want to keep.]
Next, run the following command:
MakeWinPEMedia /UFD C:\WinPE_x86 F:
In my case my Windows PE working folder was C:\WinPE_x86 and my flash drive was drive F:.
Now you’re read to get to work. Next step…
Backing Up the Original Drive
Now comes the start of the real work. It goes without saying, but I’ll say it anyway, take precautions like having a backup, keep track of drive letters, etc. In general be careful. Don’t wipe the original drive until you’re sure that everything is good with the new drive. That sort of thing.
First step is to take note of the original partitioning scheme. Do you have only 1 partition? Is there a seperate System partition? Is there a data partion? Make sure you know what partitions you will need to migrate.
Boot the system using your USB flash drive and plug in the USB hard drive you will be using to hold the backup WIM.
Use the following command to back up the OS partition.
DISM /Capture-Image /ImageFile:<path to your backup WIM> /CaptureDir:<drive of OS partition> /Name:<descriptive name>
DISM /Capture-Image /ImageFile:E:\Backups\Windows.wim /CaptureDir:C:\ /Name:”Windows Partition”
This will take a long time.
Replacing the Original Drive
Once you have a backup of the original drive, you can physically replace it with a larger drive.
I’m not going to go over how to do this. For every make and model out there there is going to be a way to replace the hard drive.
Preparing the New Drive
We must then create the partitions on the newly installed drive.
- Boot the system using the WinPE bootable flash drive.
- Start Diskpart
- Create the partitions to match the original scheme
From Diskpart you will first need to create the System partition (if the original drive used it).
Sel Disk 0
Create Partition Primary Size=100
Format Quick FS=NTFS Label=”System”
The above will create a 100MB bootable partition.
Next, you will create the OS partition, in my case using the remainder of the hard drive.
Create Partition Primary
Format Quick FS=NTFS Label=”Windows”
Adjust your partitioning based on what you need.
Now you have your partitions created you next need to….
Restoring to the New Drive
The final steps are to restore the backup image to the new drive and to re-generate the boot record in the System partition.
- Restore the Windows OS partition
- Use BCDBOOT to re-initialize the System partition
Use the following DISM command to apply your backup image to the new Windows partition.
DISM /Apply-Image /ImageFile:<path to your Windows.wim> /Index:1 /ApplyDir:W:\
DISM /Apply-Image /ImageFile:E:\Backup\Windows.wim /Index:1 /ApplyDir:W:\
This will take a while.
After DISM has completed applying the WIM you now need to re-initialize the System partition using BCDBOOT. Use the following command to prep the System partition:
BCDBOOT W:\Windows /S S:
Reboot your system and Windows should boot up just like it has before but now on a larger hard drive.
Now I just need to run the Windows 10 upgrade….
For more information see these TechNet pages.