<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
<title>OpenWrt - Important Knowledge</title>
</head>
<body>

<h1>OpenWrt - Important Knowledge</h1>

<p>
2011-02-19<br />
by Gernot WALZL
</p>

<p>
OpenWrt (<a href="http://openwrt.org/">http://openwrt.org/</a>)
is a custom GNU/Linux based firmware for network routers.
</p>


<h2>Enable boot_wait</h2>

<p>
After flashing a custom linux firmware, it is <b>HIGHLY RECOMMENDED</b>
to enable boot_wait.
</p>
<pre>
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
</pre>

<p>
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.
</p>


<h2>Recover a broken device</h2>

<p>
The bootloader always sets 192.168.1.1 as the devices IP Address.
</p>

<ol>
<li>Remove power cord of the WRT device.</li>
<li>Run TFTP on a computer inside the LAN.<br />
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.
<pre>
$ tftp 192.168.1.1
tftp> binary
tftp> rexmt 1
tftp> timeout 60
tftp> trace
tftp> put openwrt-wrt54g-squashfs.bin
</pre>
</li>
<li>Plug in power cord. It will take approximately 5 minutes until
the new firmware is flashed.</li>
</ol>

</body>
</html>