OpenWrt has a built-in failsafe mode which will attempt to bypass almost all configuration in favor of a few hard coded defaults, resulting in a router that boots up as 192.168.1.1/24 with only essential services running. From this state you can telnet in and fix certain problems.
Reading flash.layout, you should understand, that the OpenWrt failsafe can help you with any problems referring to the JFFS2 partition if you have a SquashFS image installed! In case you forgot your password or you firewall-ed yourself or you broke one of the startup scripts, you can get back in by using OpenWrt's failsafe mode.
You get a message like this “bla bla, you booted into failsafe mode”
NOTE: The root file system in failsafe mode is the only the SquashFS partition. The JFFS2 is not present. To mount JFFS2 in read-write mode run mount_root:
mount_root
and then repair your system:
passwd
uci get network.lan.ipaddr
mtd -r erase rootfs_data
If you are done with failsafe mode use
reboot -f
to reboot. (Normal /sbin/reboot will not work, because init is not running.) Or power cycle the router.
failsafe “kicks in” once activated