The following procedure can be used to boot with a read-only file system. All modifications to the file system are done in RAM, and therefore, discarded between boots.
This can be useful to reduce wear on the SD card or eMMC and also ensure a more reliable system, as file system corruption is less likely when it is read-only.
First, upgrade your packages:
sudo apt update sudo apt full-upgrade sudo reboot
You can then configure a read-only file system by going to Preferences–>Raspberry Pi Configuration–>Performance–>Overlay File System–Configure…
You may also need to disable the swap file service with
sudo systemctl disable dphys-swapfile.service.
If you are using a Raspberry Pi Buster OS, and you need a static IP address, you may need to enable predictable network interface names in the