I need to setup my system this way in order to protect it from un safe power loss which is common while traveling with this system, The guide explains how to write a script to easily switch between read/write and read only mode which will allow for one to make changes or to apply updates as the users see fit…
I’ll be applying this to a Pi4 8GB running DietPi 64Bit this time around, Should I change anything specifically during setup for this to work well with the DietPi Distro, I’m already aware logs goto ram by default which is good since it makes this procedure much easier…
I just tested UnionFS, absolutely broke my system, I tried to back track the installation but I was locked into Read Only mode and couldn’t switch via the Script from that article… Let’s just say it doesn’t work as well as it did on my Pi 1 with Raspbian
Thus I reinstalled DietPi quickly and I’m back to where I left off prior to messing with UnionFS…
I’ll be trying your suggestion as that definitely looks like the best option at the moment…
Honestly thanks for guiding me into the right direction I truly appreciate it!
Hi I’m back after some testing and I’m currently stuck with an unexpected issue, I followed the instructions from that Forum Post you linked to install OverlayFS it seems to be half working on my end I’m probably missing something, After a reboot I’m definitely in read only as any files created are temporary and removed every reboot although the “rootwork” command isn’t being found even though I edited the bash file…
I’ve also noticed that Samba is no longer accessible even though it’s reporting zero errors and successfully running same goes with Minidlna simply not showing up on the lan even though it’s running…
Update: A Friend with a little more in depth Linux knowledge helped me solve the issue with “rootwork” below you’ll find step by step instructions for those struggling with the same issue… although I would also like to mention that the other issues I was having related with Samba and MiniDLNA was definitely unrelated and caused by router issue…
Fix for “rootwork” Command
First off change directory to the location where you unzipped overlayroot most likely in dietpi users home folder.
cd "overlayroot directory"
Now simply execute the rootwork script so we can write some changes to the system…
./rootwork
Copy the rootwork script to “/usr/local/bin” this is where custom user scripts are stored…
The fix is pretty much self explanatory, simply copy the rootwork script to the local bin directory which is used for custom user scripts… after a reboot the rootwork command works perfectly!
Now that root is protected thanks to the overlay should I consider setting the boot partition as readonly via “dietpi-drive_manager” or would that break more things then help?