Endpreise in CHF – Versand inklusive Schweizer Unternehmen · 076 792 63 50 (WhatsApp/SMS)
Kurse › Raspberry Pi › Stufe 32
Raspberry Pi · Advanced · Stufe 32 / 40

Robust Systems: Read-Only Root and Power-Loss Survival

Build a device that keeps working through power cuts, crashes and years of unattended use.

Advanced freischalten · CHF 29.90 Stufen 27–40, einmalig, kein Abo

10 Lektionen in dieser Stufe

  1. Failure Modes of Unattended Devices
    List what breaks in the field and rank it by likelihood and impact. · Lab: Build a failure-mode table for your appliance with a mitigation for each row.
  2. A Read-Only Root Filesystem with overlayfs
    Run the system so power loss cannot corrupt it. · Lab: Enable the overlay filesystem, prove changes vanish on reboot and document how to make updates.
  3. Separating System, Config and Data Partitions
    Lay out storage so each part has the right protection. · Lab: Create a small writable config partition and a data partition with safe mount options.
  4. Atomic File Writes and fsync
    Update files so they are always either old or new, never half-written. · Lab: Implement write-to-temp, fsync and rename, and test it by cutting power mid-write.
  5. SQLite Durability: WAL, Synchronous Modes and Corruption Tests
    Configure a database for the right balance of safety and wear. · Lab: Compare journal modes under repeated power cuts and run integrity checks.
  6. The Hardware Watchdog and systemd Integration
    Reboot automatically when the system or your application hangs. · Lab: Enable the watchdog, add application-level keep-alives and freeze the program to test it.
  7. Detecting Power Loss and Shutting Down on Stored Energy
    Use a power-fail signal and backup energy for an orderly stop. · Lab: Wire a backup module's power-fail output to a GPIO and measure the hold-up time under load.
  8. Flash Endurance: Industrial Cards, eMMC and Write Budgets
    Estimate storage lifetime from measured write volume. · Lab: Measure daily writes, read device health data where available and calculate expected life.
  9. Self-Healing Boot: Fallback Partitions and Factory Reset
    Recover without a site visit when the main system will not start. · Lab: Add a recovery partition and a held-button factory reset that restores defaults.
  10. Building a Power-Cut Torture Rig
    Automate hundreds of randomised power cycles and verify each boot. · Lab: Use a second board and a relay to cut power at random times and log every recovery.

Abschlussprojekt

An appliance with a read-only system, a protected data partition and a watchdog that survives 500 random power cuts on your own test rig without corruption or manual intervention.

Teile für diese Stufe

  • 1 × Raspberry Pi 5, Pi 4 or Compute Module set from earlier levels
  • 1 × Second Raspberry Pi or Pico as a test controller
  • 1 × Relay module opto-isolated
  • 1 × UPS HAT or supercapacitor backup module with power-fail signal
  • 1 × Industrial-grade microSD card
  • 1 × USB power meter
  • 1 × Breadboard and jumper wire set

In jeder Lektion legst du die passenden Teile direkt in den Warenkorb. Raspberry Pi →

Voraussetzung: Levels 15, 17, 20 and 31: services, SQLite, partitions and Compute Modules.

🔒 Sichere Zahlung · 3D Secure 🔐 SSL-verschlüsselt 🚚 Versand in die ganze Schweiz 🇨🇭 Schweizer Unternehmen