I am trying to make a backup of my raspian image, so I can distribute it to more Raspberrys in the future. I used dd for that, but as my sd card is larger then the image, I ended up with a 16 Gb file instead of 4.5.
I found several instructions on how to shrink this, like http://www.instructables.com/id/How-to-BackUp-and-Shrink-Your-Raspberry-Pi-Image/ or the pishrink.sh script. But these instructions all produce images which are substantially larger than needed (~6.5 Gb). This seems to be the case because resize2fs is miscalculating the minimum size.
How can I produce an image which has the optimal size?
rsyncto copy the relevant parts of the working image. – Milliways Sep 23 '17 at 10:21ddis a lousy backup tool. That's not its intended purpose. – goldilocks Sep 23 '17 at 12:42