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.

  1. Create a USB Windows PE flash drive
  2. Back up the original drive
  3. Replace the original drive
  4. Prep the new drive
  5. 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.

Screen Shot 2015-08-16 at 7.24.54 PM

Next, enter the command:

CopyPE <architecture> <path to working folder>
For example:
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>
Example:
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.

  1. Boot the system using the WinPE bootable flash drive.
  2. Start Diskpart
  3. 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
Clean
Create Partition Primary Size=100
Format Quick FS=NTFS Label=”System”
Assign Letter=”S”
Active

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”
Assign Letter=”W”

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.

  1. Restore the Windows OS partition
  2. 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:\
Example:
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….

Reference Information:

For more information see these TechNet pages.

WinPE: Create USB Bootable Drive

Capture Images of Hard Disk Partitions Using DISM

Advertisements

Posted on August 17, 2015, in Handy to Have, Upgrade, Windows 10 and tagged , , , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: