Open dspinellis opened 4 years ago
In order to help with restoring the device to a pristine state, one could use a special initramfs that checks the root partition and either loads linux from an image or a different partition, or repairs the root partition using an included rootfs image (for example as a tar.gz file on the boot partition). For example: https://unix.stackexchange.com/questions/460219/how-to-run-a-script-before-switch-root-in-initramfs
A different approach could be a second stage bootloader (for example u-boot) but that could complicate things.
/var/lib/epidose/restore
exists, and if so, perform a clean installation/var/lib/epidose/restore
to indicate that a full restore is needed/var/lib/epidose/restore
The procedure for running these commands is described here.