- Use built in gnome-disks app to create the partition image.
- Note the size of actual contents. I.e., for the 500GB partition you just cloned, the actual contents might have been only 20 GB. We'll use this number to make sense of the 'truncate' command in step 3.
- Force partition size of actual contents:
sudo modprobe loop
sudo losetup -f # use the loop device returned. For this example, we'll use /dev/loop1
sudo losetup /dev/loop1 my-mintbox.img
sudo partprobe /dev/loop1
sudo gparted /dev/loop1 # while in gparted, unmount /dev/loop1 and re-size by moving slider all the way to size of actual contents. Apply!
sudo losetup -d /dev/loop1