Clone a Windows boot disk to a smaller disk using Linux

I while ago I foolishly borrowed a 4Tb SSHD from an ongoing project and now I need the disk back whilst preserving the data that’s on it. All I have is a 2Tb disk, which is enough for me to fit all the data on, but the disk duplicator can’t deal with it as the source drive is bigger than the target drive.

1/ In Windows – I used disk management to shrink the partition on the 4Tb disk down to the smallest possible size – approx 1.5Tb.

2/ In Linux I examined /proc/partitions and worked out my source disk is /dev/sdd and my target disk is /dev/sde.

3/ I used DD to copy the entire disk –

dd if=/dev/sdd of=/dev/sde bs=128K conv=noerror,sync

This eventually errored saying the disk was full. Another glance at /proc/partitions suggested the operation had failed, as I could only see /dev/sde (and not also /dev/sde1, /dev/sde2, etc). This was the case even after a reboot.

4/ However, I fired the disk up in Windows where it was immediately recognised as the originally 4Tb drive that’s now a 1.5Tb partition, along with an additional 0.5Tb of free space.

5/ I used computer management to resize the partition to maximum size (2Tb) and now I’m running chkdsk /f (or… from the properties of the target hard drive… tools / error-checking / check now)… because you should always do this after manipulating partitions before you re-use the source disk! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *