Hello,
On high level, I want to create upgradeable custom OS build.
My first thought about how that can be implemented was I need to boot OS from some image file and later to be able to update that file from booted OS. I've read some docs, searched how can it be done, found some keywords like squashfs, unionfs, overlayfs, NOOBS, but still not sure.
Now I think about something like this: I have mmcblk0p1 FAT32 partition mounted as boot, large enought for two OS images (like 4-5Gb or so), with some, let's say, alarm-15.squashfs file on it. Device boots from "/boot/alarm-15.squashfs" readonly root (which is OK for me) and continues with mounting mmcblk0p2 /var/ read-write, so I have working system. Boot partition is R/W too, so I create (download) new file alarm-16.squashfs on it and somehow switch (by editing cmdline.txt for instance) to new file, restart RPi and I'm done with upgrade.
While this seems like a good idea, there are a lot of details I did not figure out yet.
So if somebody done that before, please can you share links to some useful docs, blog posts or any other thing which can help me.