PINE64
Make SD Card to read-only mode - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98)
+--- Forum: RockPro64 Hardware and Accessories (https://forum.pine64.org/forumdisplay.php?fid=102)
+--- Thread: Make SD Card to read-only mode (/showthread.php?tid=8132)



Make SD Card to read-only mode - rahulsharma - 10-25-2019

Hi all experts,
According to my project that needs to be run 24x7 on my rockpro64, there was issue with OS corruption as due to power shutdown the devices was on unexpected power cycle. So i was trying to make the OS to read-only mode.

I followed this link-
https://medium.com/@andreas.schallwig/how-to-make-your-raspberry-pi-file-system-read-only-raspbian-stretch-80c0f7be7353

I successfully done that but some system services and my docker service stoped working now.

OS -
Armbian ver5.98

Requirement-
1) I have made one app that needs to be run 24x7 and that is a docker process. So i need to access docker in RO mode.
2) I have also made a system-service(in /etc/systemd/system/my-service) that keeps on monitoring that docker app.
3) There are some file write operation need to be done in "/opt" or any other folder.

Please suggest me way to make the OS to read-only by keeping above 3 requirements.

Thanks.


RE: Make SD Card to read-only mode - Nikolay_Po - 11-04-2019

The third requirement is in contradiction to your first requirement. Any remainder of write operations keeps a chances for corruption. I think you need exclude the writing to system volume totally. Move anything needing the write to a RAM-disk. And write persistent data only to different media, say, USB flash drive.