I try to clone my RPi SD cad to another one under Linux. Of course I created
img file using
dd command. SD card consist two partitions. First - bootable FAT formatted (small one) and second EXT4 formatted, approx. 4,5 GB size. I use 8 GB SD card and whole Raspian installation occupies less than 5 GB. The rest of card is empty.
I have 4 SD cards labelled as 8 GB from different vendors (Sandisk, Toshiba, Samsung and Kingston). But 8 GB from one vendor is not equal 8 GB from another. There are small differences in card size. I can restore 8 GB image file (using
dd of course) to 16 GB card and it works properly. But it is practically impossible to restore 8GB card image from one vendor to 8 GB card from another because of small size differences.
My question is. Can I limit image file to - lets say - 7 GB and restore it to any vendor 8GB card? Or any other solution?