I looking for a tutorial (or something similar) which could help me to install a OverlayFS on a DietPi with LXDE.
Do you have any suggestions? For Raspbian I found someone, but no DietPi-specific.
I try to get a ReadOnly-DietPi (on Raspberry Pi 3B+) with a Desktop. Until now, I try it with a separate RW-Partition, but this don‘t fit for the job.
Unfortunaly, this solution isn‘t working for me. The Bash-Prompt changed to „(ro)“, but my changes taking place and I don‘t see the Overlay mounted.
The “install.sh” run trough without any error or warning. But No overlay-fs was mounted. Is there anything other to d then you write in the linked answer?
the init-bottom-overlay throw a error (hides by default) in line 16 (. /scripts/functions) because this folder isn’t existing.
Through this, no /overlay tree is created.
So, I’m stuck here. Do you have any idea where the /scripts/functions folder should be created?
Regarding to your question, the /root/.bashrc PS1-Setting is only alternating the “name” displayed in the bash, so this has in the end no effect to the system.
Ok, very much thanks so far.
I change the Line to this specific tree.
Now the scirpt tries to mount the overlay-folders (they where created), but the mount-command throws a warning, that the overlay-folders are not specified in the /etc/fstab (thats the point where the partitions hook to some tree).
Do you know where the fstab should be written or could post me the containing of your file here?
are you sure your install.sh was executed correctly? because you are missing all the steps done on the script like copy new hooks-overlay and init-bottom-overlay in place
I’m not sure about this, but like I write above, I don’t get any error massage.
But, I can see, there is only deleting changes to my fstab-file… So I don’t think that the install.sh-script was executed correctly.
Last Message is that busybody was installed…
When I execute init-bottom-overlay directly (and adjust the path), I got the error-message before on the mount-commands. The fstab is rewritten (oder better: the line should be added) afterwards.
I tried the overlayroot project @ https://github.com/chesty/overlayroot.
I found it’s method of writing to the lower level via chroot too much of a PITA.
I ended up using instructions from https://www.domoticz.com/wiki/Setting_up_overlayFS_on_Raspberry_Pi.
It has overlayfs for /home and /var with everything else mounted readonly. A job at shutdown syncs /home and /var back to the lower filesystem. Some of the locations from the author’s git repo have moved. I did a git clone, and then used find to locate the missing files.
Next, I need to setup a periodic timer to sync; the system won’t be getting many orderly shutdowns once deployed.
well it depends on your needs. The overlayroot project will put the entire system into r/o mode. But if you still need some file system being permanent, indeed you might need to use a different way.
Most importantly the variable/volatile and temporary files are on an overlayfs or tmpfs, so /var /home /root should be fine to ha e zero disk I/O. Just keep in mind, when doing package upgrades, that /var needs to write through to disk at least for storing APT/dpkg status info.