OpenWrt - Important Knowledge

2011-02-19
by Gernot WALZL

OpenWrt (http://openwrt.org/) is a custom GNU/Linux based firmware for network routers.

Enable boot_wait

After flashing a custom linux firmware, it is HIGHLY RECOMMENDED to enable boot_wait.

root@OpenWrt:~# nvram set boot_wait=on
root@OpenWrt:~# nvram get boot_wait     # just to confirm, should respond "on"
root@OpenWrt:~# nvram commit            # takes a few seconds to complete

In case of an emergency, you should be able to easily recover a broken device via it's bootloader using TFTP to flash another firmware image.

Recover a broken device

The bootloader always sets 192.168.1.1 as the devices IP Address.

  1. Remove power cord of the WRT device.
  2. Run TFTP on a computer inside the LAN.
    The network device of this computer has to be configured to reach 192.168.1.1. The WRT device will accept correct binary (*.bin) images only.
    $ tftp 192.168.1.1
    tftp> binary
    tftp> rexmt 1
    tftp> timeout 60
    tftp> trace
    tftp> put openwrt-wrt54g-squashfs.bin
    
  3. Plug in power cord. It will take approximately 5 minutes until the new firmware is flashed.