I recently ran into a workflow problem with building Raspberry Pi images which I solved, but could solve more nicely with a bit of support from Raspbian.
What I want to do was set up several RPis from the stock Raspbian images, WITHOUT having to boot them and fiddle around with a Pi on my desk. I just wanted to dump some setup scripts onto the SD card, and have it run. I was also using Windows at the time, so couldn't customise them via mounting the ext4 partition - I wanted to be able to deploy my startup scripts in /boot.
I ended up writing a "shim" init process to solve the problem, so now when I want to deploy a Raspberry Pi browser kiosk, I just unzip a 700KB folder into the /boot partition, take out the SD card and the Pi sets itself up on the first boot. I can edit a few text files to add wireless credentials, the startup URL and so on.
For me it's a much nicer way of sharing Raspberry Pi appliances, and is a bit like the way Docker describes Linux setups, i.e. very small. Unlike Docker & Linux, the RPi is much more centred on a single OS. The shim init binary is a hack, and would be unnecessary if Raspbian supported some convention for triggering code from /boot at an early stage.
I wrote it all up in a blog post https://blog.bytemark.co.uk/2016/01/04/ ... first-boot
and the code for the init process is up on https://github.com/BytemarkHosting/pi-init2
- any suggestions or improvements appreciated!