This adds a pre-init script that is ran before systemd. This scripts prepares the system so that the rootfs will be left unaltered, but combines it with a writable ext4 filesystem, where data can be stored. Both rootfs use the same overlay, which makes it possible to preserve data while overriding one of the rootfs during an upgrade.
Looks good! Though I'm going to send you a test script to work around my pivot_root hack here since I was reading the wrong documentation.
Another issue is that people can't easily 'reset' changes to the rootfs (you had an issue with this earlier)- maybe we should expose the upper/lower overlay directories instead of hiding them? We could mount them as read-only which should protect them against rm -rf ?
This adds a pre-init script that is ran before systemd. This scripts prepares the system so that the rootfs will be left unaltered, but combines it with a writable ext4 filesystem, where data can be stored. Both rootfs use the same overlay, which makes it possible to preserve data while overriding one of the rootfs during an upgrade.
Looks good! Though I'm going to send you a test script to work around my pivot_root hack here since I was reading the wrong documentation.
Another issue is that people can't easily 'reset' changes to the rootfs (you had an issue with this earlier)- maybe we should expose the upper/lower overlay directories instead of hiding them? We could mount them as read-only which should protect them against rm -rf ?
Could you update this to use the latest script? Then I'll merge
board/MynaPlayer odyssey: add pre-init script to setup overlay filesystem.
8ec52a2
intounstable
fromWIP_preinit
on 19 Sep 2020