====== Read-only File System with Overlay ====== The read-only file system overlay is not enabled by default, however, after configuring the operating system, enabling the read-only file system overlay is **highly recommended** as it can... - ...protect the //bootfs// and //rootfs// file systems from corruption - ...increase the longevity of the storage device's flash memory, and - ...provide the ability to withstand an abrupt loss of power without requiring shutdown. ====== Bookworm ====== **Important** Due to [[https://github.com/RPi-Distro/raspi-config/pull/225|this bug]], please do not use ''raspi-config'' or the //Raspberry Pi Configuration// program to enable or disable the read-only file system overlay. Use the following procedures instead: To enable the read-only file system overlay: - Run ''sudo cpi-enable-overlay'' - Reboot To disable the read-only file system overlay: - Run ''sudo cpi-disable-overlay'' - Reboot You can also use the //Readonly File System Overlay// application from the //ComfilePi// desktop menu to enable/disable the readonly file system overlay. ====== Bullseye ====== The following procedure can be used to boot the ComfilePi panel PC with a read-only file system. After booted, 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. Also, with the read-only file system, the system can withstand an abrupt loss of power without being shutdown. 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...// Prior to enabling the readonly file system overlay, it may be necessary 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 ''raspi-config'' utility. ===== Additional Information ===== * [[https://pip.raspberrypi.com/categories/685-whitepapers-app-notes/documents/RP-003610-WP/Making-a-more-resilient-file-system.pdf|Making a more resilient file system]] [[comfilepi:index|ComfilePi - Industrial Raspberry Pi Panel PC]]