🛠 Appliance headless durable : root en lecture seule + suivi

Raspberry Pi Zero W (2017) — Board Sheet · avance · Schéma : IMG-zero-w-avance-3-appliance-headless-lecture-seule-suivi.svg — Zero W en boîtier dans une armoire réseau, microSD verrouillée en lecture seule (cadenas), sonde cron relevant température, RAM et uptime vers un tableau de bord.

Objectives

Make a Zero W "installable and forgettable": the microSD card corrupts upon power loss, and the Zero range does not detect any under-voltage — we lock the system to read-only and monitor it.

Hardware

Steps

  1. Root on read-only overlayfs: sudo raspi-config → Performance Options → OverlayFS (disable swap).
  2. Residual writes in RAM: log2ram or tmpfs on /var/log; the app only writes to its persistent path.
  3. Monitoring probe sent to a collector:
#!/bin/sh
# /usr/local/bin/health.sh — cron : */10 * * * *
{
  vcgencmd measure_temp
  free -m | awk 'NR==2{print $3" Mo"}'
  uptime
} | curl -fsS -T - http://collecteur/zero-w
  1. Auto-recovery: systemd-watchdog or @reboot cron that restarts the app — the board restarts cleanly.

Verification

Cut the power abruptly: the board restarts, the app runs, dmesg is clean.

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials