Failsafe mode and sysupgrade: OpenWrt’s built-in ways back
In one sentence
Section titled “In one sentence”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.
Failsafe mode
Section titled “Failsafe mode”- How to enter: during boot there is a 2–4 second window. Press almost any button on the device then, or press
fand Enter on a serial console. - What you get: the router comes up on
192.168.1.1/24with 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_rootto mount the overlay and repair files, or reset all settings withfirstboot && reboot. - Failsafe needs a SquashFS image.
sysupgrade
Section titled “sysupgrade”- It keeps the configuration by default.
-nflashes without keeping it. sysupgrade -b <file>writes a.tar.gzbackup of the files listed insysupgrade.conf.-r <file>restores one, and-llists what would be saved.
See it on your router
Section titled “See it on your router”This command only reads:
sysupgrade -l | headWatch out
Section titled “Watch out”- 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.
Related guides
Section titled “Related guides”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