I'm in the process of experimenting with backing up a Raspberry Pi (Raspbian) sd card. I'm using Win32DiskImager to read the image (from SD card reader) onto my HDD, successfully - but now the size issue. The image is just bigger than the original SD card and can only be written back to a bigger SD card, which, if you back that up has the same problem.
After creating an .img file, how can I remove all the unused space again? (is this because I used raspi-config to allocate all available space to the root?)
I tried to get an idea of what the partition(s) look like with Cygwin, but can't manage to get fdisk working (-bash: fdisk: command not found) - (after reading Image of a 16Gb card containing unpartitioned space at the end: Truncating possible?)
512 * lastSector
is the same. Sou would I use4096/(4k*1M) = 4096 * 1/250
? Where does the 4096 come from? – Andi Giga Sep 10 '19 at 15:494096
is4 * 1024
, which is4 * 1K
. Using a larger block size would mean that you adjust the number that you divide by to get your count.count * bs
needs to be larger than the total number of bytes. Just make sure that you know the number of bytes that are meant byk
,M
, etc. – Mike Roberts Sep 17 '19 at 11:46