Depending on your devops pipeline (that is, how often do you reimage with DD, as opposed to updating in place, and what changes you make AFTER imaging), you might consider a few timesaving options:
small root partition, rest as a data partition. This lets you image only the root with dd. It’s probably FASTER to image a 4GB partition of a 32GB SDCARD than to image a 4GB card directly.
Go smaller than 4GB (by partition, you probably don’t want to buy smaller cards). RPiOsLite should install in under 1GB, and a very usable commandline system with space for updates in 2GB. If you only have 300MB free in a 4GB storage, something is wrong. It may not be worth fiddling with, though. For multiple copies of a master, it’s common to have a large/fast setup that you install, update, tune, and prepare on, then prepare the image for distribution. There are lots of options for that, the simplest is to clean and shrink the filesystem, and use that shrunken filesystem as the image to distribute.
use a USB “real” SSD, not an SDCARD. Rpi4 and above can boot from it, earlier models need to boot from SDCARD, but can have root and all data on usb. this can be MASSIVELY faster and somewhat more reliable than sdcard.
Probably not worth the effort, but PiLFS or Yocto make it possible to build a “custom application distribution” for your pi. It will contain only the packages you need, and needs no update mechanism on the devices—to do an update, you rebuild and re-distribute. It can be TINY and still quite functional.
Depending on your devops pipeline (that is, how often do you reimage with DD, as opposed to updating in place, and what changes you make AFTER imaging), you might consider a few timesaving options:
small root partition, rest as a data partition. This lets you image only the root with dd. It’s probably FASTER to image a 4GB partition of a 32GB SDCARD than to image a 4GB card directly.
Go smaller than 4GB (by partition, you probably don’t want to buy smaller cards). RPiOsLite should install in under 1GB, and a very usable commandline system with space for updates in 2GB. If you only have 300MB free in a 4GB storage, something is wrong. It may not be worth fiddling with, though.
For multiple copies of a master, it’s common to have a large/fast setup that you install, update, tune, and prepare on, then prepare the image for distribution. There are lots of options for that, the simplest is to clean and shrink the filesystem, and use that shrunken filesystem as the image to distribute.
use a USB “real” SSD, not an SDCARD. Rpi4 and above can boot from it, earlier models need to boot from SDCARD, but can have root and all data on usb. this can be MASSIVELY faster and somewhat more reliable than sdcard.
Probably not worth the effort, but PiLFS or Yocto make it possible to build a “custom application distribution” for your pi. It will contain only the packages you need, and needs no update mechanism on the devices—to do an update, you rebuild and re-distribute. It can be TINY and still quite functional.