Overlay filesystem

This tutorial presents how to use the OverlayFS script for Raspbian. The last Raspbian image (2020-02-13) has the OverlayFS script integrated with raspi-config. When the overlay filesystem is enabled any data generated after startup is only saved in RAM and will be lost upon reboot.

Enable the overlay filesystem

To enable the overlay filesystem run command raspi-config

then select "Advanced Options" → "Overlay FS"

"Would you like the overlay file system to be enabled?" → Yes

"Would you like the boot partition to be write-protected?" → Yes

Disable the overlay filesystem

To disable the overlay filesystem run command raspi-config

then select "Advanced Options" → "Overlay FS"

"Would you like the overlay file system to be enabled?" → No

You will see "The boot partition is currently read-only. This cannot‚ be changed while an overlay file system is enabled."

You need to reboot and then select the same option.

"Would you like the boot partition to be write-protected?" → No

Links

1) OverlayFS based reliable filesystem