Commit 871c23

2026-07-24 21:48:24 admin: tmpfs overlay
raspberry pi.md ..
@@ 51,3 51,21 @@
WARNING: Erase the above disk(s) and continue? (y/n) [n] y
```
+
+## Read-only root filesystem with tmpfs overlay
+Makes root filesystem read-only reducing wear on SD card. Simply add `overlaytmpfs=yes` to `/boot/cmdline.txt`:
+```
+sed -i 's/$/ overlaytmpfs=yes/' /boot/cmdline.txt
+reboot
+```
+
+Make root writable again:
+```
+sed -i 's/ overlaytmpfs=yes//' /boot/cmdline.txt
+reboot
+```
+
+# References
+- https://wiki.alpinelinux.org/wiki/Raspberry_Pi
+- https://wiki.alpinelinux.org/wiki/Installation_on_a_headless_host
+- https://wiki.alpinelinux.org/wiki/OverlayFS#Immutable_root_with_tmpfs_overlay
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9