I an fairly new to using overlay and have it working on a ZeroW-1.
However using raspi-conf to disable overlayfs, results in a system that is still activating overlayfs
After disabling, mount shows
overlayroot on / type overlay (rw,relatime,lowerdir=/media/root-ro,upperdir=/media/root-rw/overlay,workdir=/media/root-rw/overlay-workdir/_)
An activated overlayfs shows exactly the mount result.
This seems to indicate that you cant deactivate overlayfs completely, using raspi-config.
So how can you configure the base system with partitions according to fstab, without overlayfs. The my original root system before overlaying has fstab defined as
Further experimentation shows that modifying the /etc/overlayroot.conf will work at disabling overlay completely by adding the following line at the end
overlayroot=disabled
then booting will use your /etc/fstab , as above. Activating overlayfs does not change the on disk fstab (older versions modified fstab, and some web postings used this to (de)activate overlays).
Comment the same line out to re-enable the original overlayroot specified, BUT importantly, make sure that the fstab file has the overlay partition set as noauto, else the overlay boot will fail.
I will write a script to automatically dis/enable this line in /etc/overlayroot.conf as a disable_overlayfs. I assumed that this would be what raspi-config would do on disable_overlayfs.
However using raspi-conf to disable overlayfs, results in a system that is still activating overlayfs
After disabling, mount shows
overlayroot on / type overlay (rw,relatime,lowerdir=/media/root-ro,upperdir=/media/root-rw/overlay,workdir=/media/root-rw/overlay-workdir/_)
An activated overlayfs shows exactly the mount result.
This seems to indicate that you cant deactivate overlayfs completely, using raspi-config.
So how can you configure the base system with partitions according to fstab, without overlayfs. The my original root system before overlaying has fstab defined as
Code:
proc /proc proc defaults 0 0 # overlayroot:fs-virtualPARTUUID=afe42e73-01 /boot/firmware vfat defaults 0 2PARTUUID=afe42e73-02 / ext4 rw,defaults,noatime,noauto 0 1PARTUUID=afe42e73-03 /media/datafs ext4 rw,defaults,noatime,noauto,user 0 1
overlayroot=disabled
then booting will use your /etc/fstab , as above. Activating overlayfs does not change the on disk fstab (older versions modified fstab, and some web postings used this to (de)activate overlays).
Comment the same line out to re-enable the original overlayroot specified, BUT importantly, make sure that the fstab file has the overlay partition set as noauto, else the overlay boot will fail.
I will write a script to automatically dis/enable this line in /etc/overlayroot.conf as a disable_overlayfs. I assumed that this would be what raspi-config would do on disable_overlayfs.
Statistics: Posted by JohnF57 — Sat Jun 15, 2024 7:43 am