Using overlayFS for read-only SD cards

Good point @riban,

For background on the issue, see the following post:
Avoiding zynthian power down failure

Unexpected power down can cause SD card corruption. This will result in a non-functioning Zythian

Assumptions:

  1. If an SD card is mounted read-only, there will be no SD card corruption on unexpected power-down.
  2. The user must be able to make changes to the system which cannot be achieved with the SD card in read-only mode.

Requirements:

  1. The user must be able to perform a sync operation to force any changes to be written to the SD card.
  2. The system must be able to perform an automatic sync operation on normal shutdown.
  3. The user should be able to select a read-only “live mode” from the UI, and specify this as the default at boot. Any automatic sync would be disabled in this mode.
  4. If the user selects MIDI or Audio recording, the filesystem will be remounted read-write avoid issues with running out of space.
  5. The user should be able to select a read-write “designer mode” from the UI, and specify this as the default at boot. In this mode, all write operations occur immediately.
  6. The status bar must contain some indication of the “read-only/read-write” state of the SD card, any pending writes that need to be synced.
1 Like