Im trying to develop an img using a current version of my Le Potato board so i can distribute it. I was wondering if there was a way to do so similar to using snapcraft with ubuntu-image --classic. And if there is not would my only course of action be to use dd on my sd card?
Image reduction is a complicated process. What we do is btrfs resize down incrementally until we have just a bit of space and then calculate the offsets to repartition the MBR partition tables.
A proof of concept is here:
There are additional concerns such as removing unique system id’s, generate new passwords, wiping files that have persistent data, regenerating that persistent data, and swap creation.
We are still working to improve our tooling in this regard. The alternative is to use buildroot for clean, task specific images. You can also use mmbootstrap to build images from scratch.
If you provide more information on what you’re doing, we may be able to assist.