1

I have ordered a new laptop computer with Windows 10. It comes with a 1TB HDD. I would like to clone the drive and move it to a 256GB SSD before first boot. This way, I can maintain the sysprepped OOBE of the new Windows 10 installation on the factory HDD, but with the performance of the new SSD.

I have experience reducing, imaging, and restoring partition and disks in Windows 7, but I haven't done any such work since Windows 8 came out. What I used to do was:

  1. use GParted to reduce size of partitions to the size of the target disk.
  2. use PartImage to create an image of the disk.
  3. use PartImage again to restore the image to the (smaller) target disk.

My question is, has anyone tried this before with Windows 10? That is, cloning a new, sysprepped, OOBE, Windows 10 factory HDD to a smaller sized disk?

1

I don't think partimage can make full disk image. If you want some sort of "full solution" cloning then you probably want Clonezilla.

If you plan on creating the partition table yourself and restore partition images one by one, you can use ntfsclone of ntfs-3g (and partclone.vfat/partimage/dd for FAT partitions, if any). Unless it's GPT installation, you need to write necessary boot code on the MBR of the SSD (with bootsect: https://technet.microsoft.com/en-us/library/hh824948.aspx).

I don't think it matters whether the system is sysprep'd/OOBE'd.

  • I'll look into Clonezilla. It looks more versatile and powerful than PartImage. Thanks for the heads up about GPT. I'll have to check whether the installation is GPT or MBR before I start. – Baodad Mar 14 '16 at 16:57
0

You don't need to reduce the partition size, I cloned from 400GB (80GB only occupied) to my smaller SSD 120 GB (SanDisk one).

I used a guide explained it here Clone HDD to SSD (Smaller One) Windows 10 Guide Both Laptop And PC [Solved]

In the guide they are using same 256GB SSD, hope that guide will definitely will help you.

Do note, make sure the image is bootable, don't simply copy the disk. It won't boot. I did that mistake once.

  • 1
    Consider adding some quoted reference to this answer supporting what you state in case the link ever dies so the answer content is still available that is currently only available via that link per your suggestion. – Pimp Juice IT Oct 10 '17 at 13:39
0

DISCLAIMER: Why would you take a drive out of a never-been-booted, brand new computer and mess with it? You could totally mess up your drive and your Windows installation for your brand new computer! Proceed at your own risk! You should be fairly familiar and comfortable working with and setting up disk partitions.

Clonezilla: I could not find a boot image that would work from a USB flash drive. (Tried it on two different computers.) However, System Rescue CD (on CD or USB) has never failed me.

System Rescue CD contains GParted, which I found to be totally adequate for what I needed to do. The version of GParted I used had the ability to create GPT bootable volumes, as well as the older, traditional MBR type boot records. (I wanted to stick with GPT/UEFI booting.)

What didn't work: using dd to try to copy a partial disk or a partial partition, or the boot sector code. Wasted a lot of time here.

I rigged up a system that I booted from my USB SystemRescueCD flash drive (if you don't know how to do that, you shouldn't be trying this). I also connected the factory 1 TB HDD (still sysprepped, never-been-booted), and the new 256GB SSD I planned to migrate the installation to - both of these drives via SATA cables to the motherboard.

WARNING: if you accidentally boot from your sysprepped disk, it will proceed to install. I was careful not to do this!

Inside the SystemRescueCD window environment (which you can get to by typing startx) I ran GParted, which scanned all disks connected to the system. I set up the SSD to be a GPT volume, and then I recreated each partition from the HDD to the SSD, down to the exact size and sector.

There was one partition that GParted could not read; it said it was a 'Microsoft system partition' of type 'unknown.' I created an NTFS partition of the exact same size instead, and then later used dd to copy the 'unknown' partition from the HDD to the SDD.

The tough part comes when we try to copy the large main partition of the HDD, shrinking it down to be able to fit on the smaller SSD. My factory HDD had two recovery-type partitions at the end of the disk; I copied those partitions to the end of my SSD, and then checked what space I had left in the middle of the SSD that was available for the main data partition (just a little over 200GB).

Read the disclaimer at the top again. We're talking about shrinking the partition on the factory HDD which has never been booted. If we mess things up, then we messed up our factory HDD image, and there's no recovery from that (unless you have a way to make a backup). If I had had enough disk space on another disk, I would have backed up or made an image of the big data partition on the HDD. Even though it was over 800GB in size, there was less than 50GB of data on it. I tried using PartImage which supposedly only backs up the occupied sectors and not the blank ones, but it still wanted to back up to a roughly 425GB image file, which I didn't have. In any case, it would be best to back it up before proceeding, just in case.

I have successfully resized NTFS partitions in GParted before, so I knew I could shrink the 800GB+ down to 200GB without any data loss. So that is what I did. First I tried making it exactly the same size, but GParted would not copy the partition over unless the target space was slightly (7MB) larger than the source partition. Then I copied the shrunk partition from the HDD over to the SDD.

Next, still in GParted, I set all the flags and volume names and labels of partitions on the SSD to match exactly what was on the HDD - the only difference was the size of the main large partitions.

Then, I installed the SSD in our new computer, and fired it up. I was greeted by a blue screen stating:

Your PC needs to be repaired
An unexpected error has occurred
Error code: 0x0000225

So I followed these instructions and booted from a Windows 10 USB install media, and went into the advanced options to a command prompt, and executed DISKPART then list volume

Look at the output, and make a note of two things: 1) the drive letter assigned to your main Windows partition, and 2) a volume that is FAT32 but not assigned any drive letter (it may or may not have a label; mine was called SYSTEM). One of the volumes shown is your USB recovery media - be sure not to use that one for any of the following steps.

Still in DISKPART, select the volume that does not have a drive letter by typing select volume 3 (yours may not be 3, but mine was). Then type assign letter=z. Now we've assigned the drive letter of Z to that partition.

Next, EXIT diskpart and type:

BCDBoot c:\Windows /s z: /f UEFI

One caveat here: the above statement references c:\Windows as the location of the boot files, but if DISKPART showed that your main Windows partition was assigned to a different drive letter, then use that drive letter instead of c: in c:\Windows.

Hopefully it returns something like operation completed successfully. If it returns an error like Failure when attempting to copy boot files, make sure you're reference the correct location of \Windows on a drive letter mapped to your main Windows partition.

Then I rebooted, and was greeted with a Windows boot loader screen that asked my which volume I wanted to boot from - both volumes said 'Windows 10' but the default one said 'Windows 10 - volume 3.' When I booted from that volume, the system proceeded to do its first-time "Out of box experience" setup of Windows 10 - only from the SSD I purchased, not the factory HDD that came with the new computer.

Since there should be only one bootable operating system on this new drive, I plan on using msconfig or BCDedit to delete the other Windows 10 boot option so I don't have to select it every time on boot.

  • Tried this again today using an existing, used HDD (not a new, sysprepped one). I still needed to use a bootable Windows recovery USB drive to make the cloned SSD work, but it was much easier - the recovery tools automatically detected and fixed the problems. Great resource for putting together an bootable 32-bit Windows 7 recovery tools USB drive: digitalcitizen.life/… – Baodad Dec 18 '18 at 20:34

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.