Reset LEDE/OpenWRT using Failsafe boot mode

I had just installed OpenWRT and was making changes (of course without reading the documentation) when I had changed the networking settings losing access to the router’s interface.

Fortunately OpenWRT provides a way to recover according to OpenWRT’s website: “LEDE allows you to boot into a failsafe mode that overrides its current configuration. If your device becomes inaccessible, e.g. after a configuration error, then failsafe mode is there to help you out. When you reboot in failsafe mode, the device starts up in a basic operating state, with a few hard coded defaults, and you can begin to fix the problem manually.”

First, thing is to set your computer’s IP address to something like 192.168.1.2. The router will use 192.168.1.1 when booted in Failsafe mode.

Then connect the computer to the router’s WAN port.

Now the hard part. According to the documentation the router’s LEDs will display a moderate 0.1 second blinking rhythm during those two seconds, when router waits for user to trigger the failsafe mode. After plugging in the router I just guessed at when the 2-second window arrived and pressed the QSS/WPS button. After which the SYS LED started blinking rapidly.

Back on the computer I SSH’d to the router using root@192.168.1.1 for the username and address. There is no password for root.

joey@HAVEN-E6520 ~ $ ssh root@192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
RSA key fingerprint is SHA256:PAkYhCNr1sBDT/ADAn/iPh3ztT1yvlgR+RTHYVM0/fA.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.

BusyBox v1.25.1 () built-in shell (ash)
     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01.4, r3560-79f57e422d)
    \________\/    -----------------------------------------------------------

================= FAILSAFE MODE active ================
special commands:
* firstboot	     reset settings to factory defaults
* mount_root	 mount root-partition with config files

after mount_root:
* passwd			 change root's password
* /etc/config		    directory with config files

for more help see:
http://wiki.openwrt.org/doc/howto/generic.failsafe
=======================================================

=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@(none):~# 
root@(none):~#

Because I had just installed OpenWRT I decided to just reset the router and start over. To do this I just entered the command firstboot and hit enter.

TP-LINK 300M Wireless N Gigabit Router
Model No. TL-WR1043ND
https://wiki.openwrt.org/doc/howto/generic.failsafe
https://openwrt.org/docs/guide-user/troubleshooting/failsafe_and_factory_reset
https://openwrt.org/toh/tp-link/tl-wr1043nd#installation

Categories: Linux

Tagged as: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: