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”
and then repair your system:
uci get network.lan.ipaddr
mtd -r erase rootfs_data
If you are done with failsafe mode use
to reboot. (Normal
/sbin/reboot will not work, because
init is not running.) Or power cycle the router.
failsafe“kicks in” once activated