OpenWRT Failsafe Mode

Aus Laub-Home Wiki

Text was copied from: http://wiki.openwrt.org/inbox/wrt160nl?do=show#failsafe.mode

Failsafe mode

DOES NOT WORK AT LEAST AS OF TRUNK 17290.

If you forgot your password, broken one of the startup scripts, firewalled yourself or corrupted the JFFS2 partition, you can get back in by using OpenWrt's failsafe mode.

Boot into failsafe mode

  • Unplug the router's power cord.
  • Connect the router's LAN1 port directly to your PC.
  • Configure your PC with a static IP address between 192.168.1.2 and 192.168.1.254. E. g. 192.168.1.2(gateway and DNS is not required).
  • Plug the power on and wait for the DMZ LED to light up.
  • While the DMZ LED is on immediately press any button (Reset and Secure Easy Setup will work) a few times.
  • If done right the DMZ LED will quickly flash 3 times every second.
  • You should be able to telnet to the router at 192.168.1.1 now (no username and password)

What to do in failsafe mode?

NOTE: The root file system in failsafe mode is the SquashFS partition mounted in readonly mode. To switch to the normal writable root file system run mount_root and make any changes. Run mount_root now.

1. Forgot/lost your password and you like to set a new one

| passwd |

2. Forgot the routers IP address

| uci get network.lan.ipaddr |

3. You accidentally run 'ipkg upgrade' or filled up the flash by installing to big packages (clean the JFFS2 partition and start over)

| mtd -r erase rootfs_data |

If you are done with failsafe mode power cycle the router and boot in normal mode.