Some context: I’m hacking my DIY embassy to enable kiosk mode on a Raspberry Pi that is connected to a 7" LCD touchscreen. Instead of using the provided kiosk.sh script (which opens Firefox to the embassy web UI), I’ve written my own startup script that runs a custom Tkinter GUI (Python) using the same window manager (matchbox). The application is a simple dashboard, right now only for Bitcoin Core, but it can also switch between the dashboard, Firefox, and xterm.
I’ve got a lot of the above already figured out, but my real question has to do with making sure my custom changes persist across OS updates. I’ve been testing in a VM and here’s what I’ve learned:
- For the files I add and change in
/home/start9/to persist through a reboot, I need to copy these changes to
/media/embassy/embassyfs/current/home/start9/. I have a backup function in my .bash_aliases that takes care of this with some rsyncs.
- For apt installations to persist through a reboot (for example, for my dashboard: python3-tk, python3-pil, etc.), I need to
/media/embassy/embassyfs/current/and then perform my
sudo apt install _____commands there. I was doing this manually, which required moving and restoring the
/etc/resolv.conffile in order for the chroot to have internet access. But I have since discovered the
/usr/lib/embassy/scripts/chroot-and-upgradescript which is much simpler. This script also keeps files that have been added to the embassyfs/current directory.
I have not yet figured out how to get the above changes (files and installs) to persist through an OS update. After an update, the
/media/embassy/embassyfs/current/home/start9/ (and thus also
/home/start9/) directory is reset to how it was on a fresh install. Right now, I have to rsync the home directory from embassyfs/next to both embassyfs/current and $HOME and redo the chroot to perform all installs. I suppose I could put all of the above in my own script (restore-after-update) and run it myself after I update, but I was just wondering if there is something I’m missing that could make it so that all these changes persist automatically. I’d also just like to know more about this method of managing the filesystem. I’d appreciate any info or resources, if any exist. I’ve perused the Github repo but haven’t seen anything like a guide or basic explanation on this.
(Yes, I know DIY hacks are not supported and there’s no guarantee I won’t break something. That’s why I’ve been doing it all in a VM for now.)