Advanced: making changes that persist

Stratux's main filesystem is read-only by default, so anything you change over SSH is lost at reboot. To make a change stick, run overlayctl unlock, edit, then overlayctl lock. Your normal settings are not affected by any of this, because stratux.conf lives on a separate writable partition.

This guide is for tinkerers. If you only want to update your unit, see Update the Stratux software.

Warning: Reflashing the card is always the safe way to recover. Editing system files can leave a unit that won't start or won't show its WiFi network. Don't experiment on a unit you rely on for a flight.

The read-only overlay

Stratux 2.0 runs its root filesystem through an overlay held in RAM (about 250 MB). Reads come from the SD card, but writes go to RAM and disappear on reboot. This protects the card from corruption when power is cut.

Two consequences:

  • Changes to system files are lost at reboot. Editing something like a udev rule without unlocking does nothing lasting.
  • The RAM layer can fill up. Installing packages or development tools gives "No space left on device". Running raspi-config to expand storage does not help.

Where stratux.conf lives

Your settings are saved to /boot/firmware/stratux.conf. That is the writable boot partition, so settings survive reboots even with the overlay on. The overlay is not what makes them persist.

Two ways to make changes persist

Option 1: Persistent Logging

In the web UI settings, the Persistent logging switch ("Write logs to micro SD instead of RAM") turns the overlay off and asks you to reboot. It is the easiest option for development work.

  • If the switch is missing, you may be seeing a stale cached page. Clear your browser cache.
  • Running overlayctl disable then rebooting has the same effect, but the switch in the web UI will not reflect it.
  • Persistent logging writes to the SD card more, which adds wear. Use it for troubleshooting or development, not permanently.

Option 2: Unlock, edit, lock

  1. Connect to the Stratux WiFi network and log in over SSH.
  2. Run overlayctl unlock.
  3. Make your edit.
  4. Run overlayctl lock.

This keeps the overlay protection for everything else.

Updating: .deb or reflash?

Situation What to do
Major jump (1.x to 2.x) Reflash
Normal user Reflash
Tinkerer, same major version Optional: install the .deb
An update fails Reflash and restore stratux.conf

2.0 releases include a .deb as well as the image. You can upload it in the web UI settings ("System Update file"), or copy it into a StratuxUpdates folder on the boot partition. The unit then reboots a couple of times: it stages the package, temporarily disables the overlay, installs it, re-enables the overlay and reboots.

Things to know:

  • The .deb contains only the Stratux software, not the rest of the image setup.
  • The old .sh update scripts are no longer produced.
  • Whether the .deb path works from every earlier release is unsettled. Treat it as an advanced option.

Keeping settings across a reflash

Back up stratux.conf (from the web UI backup or the boot partition). After flashing, and before the first boot, copy it onto the boot partition. Your WiFi settings are then applied too. Otherwise the web UI and the real WiFi configuration can disagree.

When flashing, unzip the release first. Raspberry Pi Imager, dd and Etcher all work. If Etcher complains about the source, extract the zip or switch tools. The card looks unreadable on Windows and Mac afterwards, which is normal. Don't reformat it.

Need help?

Ask the community on Discord.