Skip to content

Factory reset

A factory reset returns a box to its just-flashed, pre-first-boot state without re-flashing the media. It is the clean-slate button: hand a unit to a new operator, recover from a botched configuration. Alternatively, repurpose a box for a different mission. All without touching the OS or reinstalling packages.

This is not a secure wipe

Factory reset restores config and clears identity. It does not securely erase anything from the media. To sanitize a box for decommission or before It leaves your control, use Zeroize instead.

What it does - and does not

  • Site config - restores /etc/aryaos/aryaos-config.txt and /etc/cotbridge.ini from the packaged defaults in /usr/share/aryaos/defaults. It resets issue, issue.net, and motd.
  • Per-gateway /etc/default/<svc> - reinstalled to package defaults when online (via apt-get --reinstall). Offline, these are left as-is
  • reset again online to restore them. If the best-effort reinstall fails after unpacking a package, reset completes pending package configuration before reboot so the package database remains consistent.
  • Operator-uploaded TAK certificates - deletes the files under /etc/aryaos/tls, /etc/cotbridge/tls, and the per-gateway tls directories (the directories themselves are kept).
  • Device identity - removes the machine-id and firstboot markers so aryaos-firstboot re-runs: the box gets a new DEVICE_SUFFIX, hostname, and per-device web TLS certificate on the next boot, and the login password is re-expired.
  • Sensor role state - stops and disables the old sensor pipelines, clears the hardware-autodetection marker, and lets first boot protocol-probe attached hardware again before enabling its capabilities.
  • Crash-guard state - clears any sticky safe-mode latch and short-boot counter, then restores USB power. The intentional reset reboot therefore cannot be mistaken for a brownout crash loop.
  • Local state - drops update, support-bundle, and config-backup state JSON that referenced the old identity.
  • The OS and all installed packages - nothing is uninstalled or re-flashed.
  • The network connection, by default - saved Wi-Fi/NetworkManager connections and the onboarding hotspot password are preserved unless You pass --wipe-network, so a remote box is not stranded off the network after a reset. (The AntSDR point-to-point link is always kept.)

After the reset the box reboots into first-boot setup, exactly like a freshly flashed image - first boot re-derives identity and regenerates the web TLS certificate. Attached sensors are rediscovered and their protocol-specific transports are applied before their services start.

When to use it

  • Re-issuing a unit to a new operator or a new mission.
  • Recovering from a configuration you cannot unwind by hand.
  • Clearing a lab/test box back to a known baseline.

Back up first

A factory reset overwrites your site config and deletes uploaded TAK certs. If there's any chance you will want the current setup again - or want to move it to a replacement box - make a backup first.

How to run it

  1. Open Cockpit > AryaOS Site > Factory reset.
  2. Read the confirmation, which lists what will be cleared, and confirm.
  3. The card runs the reset (--service) and the box reboots into first-boot setup.
sudo aryaos-factory-reset                  # keep network; prompt to confirm
sudo aryaos-factory-reset --wipe-network   # ALSO remove saved Wi-Fi + hotspot password
sudo aryaos-factory-reset --no-reboot      # do the reset but stay up (testing)

Interactively, the command lists what it will clear and requires you to type the hostname to proceed:

Type the hostname (aryaos-1a2b) to proceed:
Flag Effect
(none) Reset config + identity, keep the network, prompt, then reboot.
--wipe-network Also remove saved Wi-Fi/NetworkManager connections and the hotspot password (box reverts to open onboarding).
--service Non-interactive (used by the Cockpit card, which already confirmed).
--no-reboot Do the reset but do not reboot - for testing.

Factory reset vs. Zeroize

Both return the box to a clean first-boot state, but they answer different questions:

Factory reset Zeroize
Goal Clean slate for re-use Secure sanitize for decommission/capture
Config & identity Restored to defaults / cleared Destroyed
Certs & keys Uploaded TAK certs deleted All key material shredded + overwritten
Logs / tracks / history Not specifically wiped Shredded. free space overwritten + TRIMmed
Network Kept by default Wiped by default (--keep-network to keep)
Secure erase? No Best-effort (see the flash-media caveat)

If the box is going somewhere you do not control, use Zeroize, not factory reset.