alpine
Alpine installs on pi differently than any other pi distro. Most (starting with raspian) have you write a partial filesystem and boot image you then "expand", and are huge compressed raw image downloads. Alpine, you create a fat32 boot partition and optional root, and untar a 87meg tarball directly to it. That's it.Remastering can be done from the desktop, get the old pi sd, tar the partition(s), stick a new sd in, create new partitions, mount them, untar to that, adjust things like hostname and such as needed, and your done; eject, stick in your new pi, and boot. I could see it as two scripts if ran from the desktop; one to capture alpine sd's into an archive of master images, and another to write out a new sd from one of them. An ingestion script could of course optionally filter out things like data directories making the tarball that should be cleanly initialized on a new install. A config file could list things like that. There are probably a few other details, too...