I have configured by raspberry pi as a wifi access point using a 32GB SD card, and installed postgres. I would like to clone the SD card (from my mac) to smaller size SD cards (like 16GB, or potentially 8GB cards). Is this possible (knowing that I use mush less than 8GB space on the card)?
Is there something more to do than just usual dd commands?
I tried with an 8GB card, but it didn't work, although I got no error message.
resize2fs
, but only slightly, which is why I did not bother to go through it there. In either case you will need a linux system or the equivalent to do it.dd
on the first half of the card. However, if the total size is 10 GB, you could not fit that onto an 8 GB card without resizing the partitions and filesystems (they are two different things) first. You must do this even if a filesystem is mostly empty (if it is full, you cannot shrink it anyway).sudo sfdisk -l
(last character is lower cased 'ell') that particular incantation will not change anything about the partitioning but don't mess about with thesfdisk
command generally!