3 ms·
Transmission of updates can be quite small: For the info-beamer hosted (https://info-beamer.com/hosted https://info-beamer.com/hosted) OS, we also do A/B bootin
by dividuum 9y ago
Transmission of updates can be quite small: For the info-beamer hosted (https://info-beamer.com/hosted https://info-beamer.com/hosted) OS, we also do A/B booting. Updates are implemented using zsync.
The initial installation of the OS is simply done by unzipping a carefully crafted [1] install.zip file to the Raspberry Pi SD card. By exploiting zsync features, it's quite efficient to reconstruct the original install.zip from the unpacked files. Once that's done, all future updates also use zsync and only fetch changes to the locally stored 'install.zip' file. After updating this file we then unpacked everything again to the next A/B partition, so the exact state of the system is always known. Updates are quite small that way. It also helps that the complete OS is only ~37MB compressed at the moment.
[1] The root file system is squashfs and is stored uncompressed in the zip file to avoid double compression and allows zsync to use the squashfs blocksize to find a minimal set of changes. Similarly the initramfs.gz is compressed --rsyncable and also also stored uncompressed in the zip file.