How to image and shrink a windows file system for storage

0

0

I'm looking to back up a series of hard drive images ranging from Windows XP Embedded up to Windows 10. The original plan was to clone each drive 1 for 1, but it would be much more efficient for us if we simply make an image, then shrink it down and store multiple images on one hard drive.

So far I've tried using dd to make the image, losetup to create a loopback device of the image, using ntfs tools via gparted to shrink the partitions, then using 'truncate' to shrink the image to a smaller size. When I want to restore the image I use dd to write the image to disk and gparted to expand it again.

This has yet to produce a working, bootable disk.

Am I doing something wrong, or is there a better way to do this? i tried using clonezilla but wasn't sure how to use the image files properly.

Also, if I could manage to do this without having to read all of the blank space at the end o a disk image, that would save more time than anything.

SuperMechaCow

Posted 2016-10-03T16:37:15.903

Reputation: 33

If you just create the dd image, then restore that image, does it work? I suspect the reason your image is resulting in an image that cannot be booted is your getting rid (or excluding) something important by accident from your original image. – Ramhound – 2016-10-03T17:11:29.330

Yes. If I create the dd image then put it on another drive from that image it works fine. – SuperMechaCow – 2016-10-04T11:05:04.490

No answers