I’m building a custom image for the Raspberry Pi platform. My image contains a gadget snap, standard kernel and six required snaps. It also contains a custom splash screen which I’ve adapted from here.
As @ogra mentioned in his blog Building an Ubuntu Core appliance image, device initialization can take quite some time on ARM because snaps are checksummed and installed on first boot. The image is intended for home users to download, flash to an SD card and then run on their Pi-based smart mirror setup; so an automated “factory boot” is not possible since we’re not shipping the actual device.
Now here’s the problem: Even though we’re providing users with the info “the first boot takes quite some time”, I’m getting feedback from quite a few people who think that the boot failed and shut down the device before initialization has completed.
Is it possible to shorten the device initialization process significantly? I’m assuming no since the root cause seems to be snapd SHA384-hashing each snap before installation, but I’d like to be wrong on that
If not: I could boot the image myself, let it initialize the seeds and then grab an image via
ddor similar. But that is a) cumbersome and error-prone (I need to shrink the file system & volume size manually because Core expands the FS to the full size of the SD card), and b) results in a significantly larger image size (~530 MB for gzipped
ubuntu-imageoutput, > 2GB for manual image copy or else I risk cutting of existing files). BUT my knowledge in that area is sketchy at best, so any hints and tips are welcome
If 1. and 2. are a clear no-no, is there some way to provide user feedback during initialization? My first thought was to switch out the splash screen logo after the device has been initialized, so that the first screen would show something along “grab a coffee, this will take some time”; then replace it with the regular file for subsequent boots. The custom splash screen is implemented via
psplash, i.e. a binary file created during the gadget snap’s
snapcraftrun, so I’d like to exhaust all other options before diving into that.