Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:troubleshooting:failsafe_and_factory_reset [2023/07/29 15:12] – [Hard factory reset] vgaeteradocs:guide-user:troubleshooting:failsafe_and_factory_reset [2024/06/23 11:45] – Tweak failsafe to remind about setting static IP for the PC richb-hanover
Line 1: Line 1:
 ====== Failsafe mode, factory reset, and recovery mode ====== ====== Failsafe mode, factory reset, and recovery mode ======
 OpenWrt offers several ways to "start over" with your router: OpenWrt offers several ways to "start over" with your router:
-  * **[[#failsafe_mode|Failsafe mode]]** is useful if you have lost control of your device, and it has become inaccessible, perhaps through a configuration error. It allows you to reboot the router into a basic operating state, retaining all your packages and (most) settings. +  * **[[docs:guide-user:troubleshooting:failsafe_and_factory_reset#failsafe_mode|Failsafe mode]]** is useful if you have lost control of your device, and it has become inaccessible, perhaps through a configuration error. It allows you to reboot the router into a basic operating state, retaining all your packages and (most) settings. 
-  * **[[#factory_reset|Factory reset]]** erases all your packages and settings, returning the router to its initial state after installing OpenWrt. +  * **[[docs:guide-user:troubleshooting:failsafe_and_factory_reset#factory_reset|Factory reset]]** erases all your packages and settings, returning the router to its initial state after installing OpenWrt. 
-  * **[[#recovery_mode|Recovery mode]]** allows you to install new firmware on a router that has become corrupted.+  * **[[docs:guide-user:troubleshooting:vendor_specific_rescue|Recovery mode]]** allows you to install new firmware on a router that has become corrupted.
  
 ===== Failsafe mode ===== ===== Failsafe mode =====
Line 9: Line 9:
 If your device becomes inaccessible, e.g. after a configuration error, then failsafe mode is there to help you out. 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. 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.
 +
 +Failsafe mode can be triggered by pressing (almost any) button on the device shortly after powering it on.
 +Each router is unique, but OpenWrt watches for a WPS, Reset, or other button press.
  
 Failsafe mode **cannot**, however, fix more deeply rooted problems like faulty hardware or a broken kernel. Failsafe mode **cannot**, however, fix more deeply rooted problems like faulty hardware or a broken kernel.
Line 25: Line 28:
 /dev/root /rom squashfs ro,relatime 0 0 /dev/root /rom squashfs ro,relatime 0 0
 </code> </code>
 +
  
 ==== Entering failsafe mode ==== ==== Entering failsafe mode ====
-Make sure you use a wired connection, since the failsafe will disable your wireless connectivity. +Failsafe mode starts the router with the IP address 192.168.1.1, and disables 
-Sometimes you need to connect to a specific network port of your router to get connectivity. +DHCP and wireless connectivity
-**Try the LAN 1 port first.** +You will need to set your PC to a static address on the same subnet 
-For DSA devices it will enable [[https://forum.openwrt.org/t/adding-openwrt-support-for-xiaomi-ax3600/55049/9760|LAN1 only]].+(e.g., 192.168.1.10) and connect via Ethernet
 +Sometimes you need to connect to a specific network port of your router 
 +to get connectivity. 
 +**Try the LAN1 port first.** 
 +DSA devices frequently enable [[https://forum.openwrt.org/t/adding-openwrt-support-for-xiaomi-ax3600/55049/9760|LAN1 only]].
  
-On most routers, OpenWrt will blink an LED (usually "Power") during the boot process after it gets control from the initial bootloader (like u-boot)+On most routers, OpenWrt will blink an LED (usually "Power") during the boot process. 
-OpenWrt will rather early in the boot cycle check if the user wants to enter the failsafe mode instead of a normal boot. +Early in the boot cycle, OpenWrt watches for a button press (any button) 
-It listens for a button press inside a specific two second window, which is indicated with LEDs and by transmitting a UDP packet.+inside a specific two second window to indicate that it should enter failsafe mode.
  
 **To enter failsafe mode, follow one of the procedures listed below:** **To enter failsafe mode, follow one of the procedures listed below:**
  
-**Recommended for most usersWait for a flashing LED and press a button.** This is usually the easiest method once you figure out the correct moment. +**Simplest - recommended for most peoplePower on the device, wait for a flashing LED and press a button.** 
- +This can be the WPS, Resetor other button on the device.
-For most users and most devices, the LEDs now (2018) provide sufficient clues as to timing to be able to avoid older recommendations to "press the XXX button as fast as you can until ..." for entering failsafe mode.+
  
-There are three different (power) LED blinking speeds during boot for most of the routers:+The LEDs provide clues for timing the button press. 
 +Watch the LED blinking speeds immediately after powering up the router. 
 +Most routers show three different (power) LED blinking speeds during boot:
  
   * A power-on sequence of lights that is specific to the device's bootloader   * A power-on sequence of lights that is specific to the device's bootloader
-  * Then a fast 5-per-second blinking rhythm during two seconds, while router waits for user to trigger the failsafe mode, typically by a button press +  * Then a fast 5-per-second blinking rhythm during two seconds, while router waits for a button press 
-  * Then either +  * Then either: 
-       * A faster, 10-per-second blink if the user pressed a button and failsafe mode was triggered +       * A faster, 10-per-second blink if failsafe mode was triggered. The device is listening on 192.168.1.1 
-       * A slower, 2.5-per-second blink continuing to the end of boot, if the failsafe was not triggered and the normal boot continues +       * A slower, 2.5-per-second blink continuing to the end of normal boot, if the failsafe was not triggered 
 +  * If you missed the timing and see the slower blink rate, just power off the device, wait a couple seconds, and try again. 
 +  
 **Alternate for expert users: Wait (with a packet sniffer) for a special broadcast packet and press a button.** The packet will be sent to destination address 192.168.1.255 port UDP 4919. **Alternate for expert users: Wait (with a packet sniffer) for a special broadcast packet and press a button.** The packet will be sent to destination address 192.168.1.255 port UDP 4919.
 The packet contains the text "//Please press button now to enter failsafe//". The packet contains the text "//Please press button now to enter failsafe//".
Line 61: Line 71:
 Whichever trigger you use, the device will enter failsafe mode and you can access the command line with SSH (always possible) or a serial keyboard. Whichever trigger you use, the device will enter failsafe mode and you can access the command line with SSH (always possible) or a serial keyboard.
  
-Note that modern OpenWrt always uses SSH, but early OpenWrt releases (15.05 and before) offered a telnet connection in this state but no SSH.+Note that modern OpenWrt always uses SSH for terminal connections. 
 + 
 + 
 +=================
  
 ==== Fixing your settings ==== ==== Fixing your settings ====
Line 127: Line 140:
  
 <code bash> <code bash>
-firstboot && reboot now+firstboot && reboot
 </code> </code>
  
Line 137: Line 150:
  
 <code bash> <code bash>
-firstboot -y && reboot now+firstboot -y && reboot
 </code> </code>
  
Line 176: Line 189:
 ======================================================= =======================================================
  
-admin@(none):/# firstboot && reboot now+admin@(none):/# firstboot && reboot
 [  102.942293] jffs2reset: This will erase all settings and remove any installed packages. Are you sure? [N/y] [  102.942293] jffs2reset: This will erase all settings and remove any installed packages. Are you sure? [N/y]
 y y
Line 191: Line 204:
 ==== Hard factory reset ==== ==== Hard factory reset ====
 === Re-flashing the firmware === === Re-flashing the firmware ===
-Re-flash/upgrade the firmware discarding the settings.+Re-flash or upgrade the firmware discarding the settings.
  
 <code bash> <code bash>
Line 203: Line 216:
  
 <code bash> <code bash>
-umount /overlay && jffs2reset && reboot now+umount /overlay && jffs2reset && reboot
 </code> </code>
  
Line 214: Line 227:
 dd if=/dev/zero of=/dev/loop0 bs=1M; reboot dd if=/dev/zero of=/dev/loop0 bs=1M; reboot
 </code> </code>
- 
-===== Recovery mode ===== 
-If neither failsafe mode nor factory reset returns control of your router, you can often replace the firmware of your device using one of the procedures described on the [[docs:guide-user:troubleshooting:vendor_specific_rescue|Recovery mode]] page. 
  
  • Last modified: 2024/12/07 10:49
  • by hnyman