Skip to content

Failsafe mode and sysupgrade: OpenWrt’s built-in ways back

A boot-time way back on 192.168.1.1; upgrades keep config.

Failsafe mode boots OpenWrt with a minimal, known configuration on 192.168.1.1, so you can fix a broken setup. sysupgrade replaces the firmware and keeps your configuration unless you tell it not to.

  • How to enter: during boot there is a 2–4 second window. Press almost any button on the device then, or press f and Enter on a serial console.
  • What you get: the router comes up on 192.168.1.1/24 with DHCP and wireless off and only essential services running. Give your computer a static address on that subnet, then connect over SSH.
  • What you can do: run mount_root to mount the overlay and repair files, or reset all settings with firstboot && reboot.
  • Failsafe needs a SquashFS image.
  • It keeps the configuration by default. -n flashes without keeping it.
  • sysupgrade -b <file> writes a .tar.gz backup of the files listed in sysupgrade.conf. -r <file> restores one, and -l lists what would be saved.

This command only reads:

Terminal window
sysupgrade -l | head
  • A factory reset erases every setting, so make a backup first.
  • Failsafe gives no DHCP. Without a static IP on your computer it looks as if the router is dead.

Sources

Router.Homes

Independent OpenWrt notes. Every page states the firmware, device, package manager and way back.

Icons: Solar by 480 Design, CC BY 4.0