gparted will automatically recognize the unused space with some margin and give you option to shrink it to that much space.
You can do this from the gparted UI itself by right clicking on the partition and selecting unmount. After the device is unmounted(all its partitions) you can select a partition and see the options of deleting the partition shrinking/resizing it. You need to unmount the partitions if it is auto mounted.
#Sd card cloning software free install#
sudo apt-get install gparted If you do not have this. Start Gparted and select your device from top.
Insert the SD-card on Linux machine and get the device name e.g.This is very simple I will explain it first then we will walk through a sample use case with all the commands. You shouldn’t have started with a big card? Anyway cloning the whole card look very ugly to me (time factor is also there). You can just clone your card and zip it that will make the footprint small because anyway most of the 64 Gb part was empty to zip has done it’s trick but what if your friend has a 8 Gb card. You have done something really cool and you want this to be in production or just share this with your friend so they will not spend 4-5 hours following your script to recreate the same image. The problem arise when you are working on a bigger sd-card say 64 Gb.
You will find many ways to clone an SD-card there are softwares like win32diskimager (A great tool for all practical purposes related to flashing cloning).