Moving a Windows install to a smaller drive for free

From Baranoski.ca
Revision as of 11:59, 9 November 2023 by Casey (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Let's say you need to swap out an SSD with a smaller one. Maybe you realized the 500GB Samsung NVMe drive in your home office PC would be better used in a gaming machine that currently has a cheap generic 250GB NVMe. I haven't had luck finding a good free program that will image one drive to the other while also shrinking the partitions. It took a couple attempts, but I managed to figure out a method that works.

Just to point out the obvious, the source drive must have less data on it than there is space available on the destination drive.

I'm going to use 500GB and 250GB as example sizes for the source and destination drives, respectfully.

Prepare the source drive

  • Install MiniTool Partition Wizard from here
  • Run Partition Wizard
  • Shrink the C: partition. Leave it some space, so you have room to work. Just make sure the total of the partitions is under 250GB
  • The rightmost partition is the recovery partition. Move it to the left, so it is touching the C: partition
  • Apply changes
  • Reboot
  • Make sure everything is good
  • Shut down

Clone the drive

  • Connect your destination drive. It could be through an additional NVMe or SATA connector on your motherboard or via a USB enclosure.
  • Boot up a Linux live distro
  • List disks with this command:
lsblk
  • Copy drive with this command. Don't include partition numbers (ie. /dev/nvme0n1p1), just the physical drives (/dev/nvme0n1)
dd if=/dev/sourcedisk of=/dev/destinationdisk status=progress bs=4096
  • The dd command will eventually fail, saying it ran out of disk space. That's normal and works fine.
  • Power off after completion
  • Pull out the source drive and replace it with the destination drive

Clean up the destination drive

  • Boot into Windows
  • Open an admin command prompt
  • Run this command:
chkdsk C: /f /r
  • It will want a reboot in order to run
  • Reboot
  • After it runs, reboot again
  • Run Partition Wizard
  • If Partition Wizard is still showing the free space that was on the larger drive (ie. 500GB of total space):
    • Close Partition Wizard
    • Go into Windows Disk Manager
    • Create a new partition in the extra space
    • Delete the new partition
    • Reopen Partition Wizard
  • Move the rightmost partition to the right end of the drive and apply
  • Extend the C: partition to fill the available space and apply
  • Reboot
  • Run chkdsk again