Putting OpenWRT on a Linksys WRT54G

December 2009


So I got an old Linksys WRT54G. The SN starts with CDF7, so according to dslreports it must be a WRT54G v2.2 / BCM5325EKQM Chipset / CPU 200Mhz. This is consistent with what SpeedGuide says.

Then, according to the Wikipedia page on the Linksys WRT54G series, this version has 16MB of RAM and 4MB flash.

Procedure 51.  Steps to put OpenWRT on the Linksys WRT54G

  1. Connecting the device.

    I connect the Internet socket to my intranet switch, and one of the other four directly to a Linux PC.

  2. Getting to the Web interface

    On the Linux box, I do sudo dhclient eth0, and sure enough, the WRT54G answers from 192.168.1.1, giving the Linux box the IP number of 192.168.1.100.

    Now I fire up Firefox, and try to browse to http://192.168.1.1. The administrator username and password have been modified by the previous owner, but holding the reset button for ten seconds or so solves that.

    I log in with a blank username and 'admin' as the password.

  3. Connecting the WRT54G to the Internet.

    I put the MAC address that is on the box in the DHCP config on my DHCP server, and from the WRT54G's Web GUI issue a DHCP renew. Now I can ping from the Linux box to hosts on the Internet.

  4. 'Upgrading' the firmware to OpenWRT

    From the OpenWRT site, I fetch the Release Candidate version of Kamikaze for the WRT54G.

    I scp it to the Linux box behind the WRT54G, and from the Upgrade Firmware dialog on the GUI, select the file I just downloaded.

    After half a minute or so, the progress bar disappears, I get a "Succesful" message, and the WRT54G reboots. The original URL is gone, and the Linux box cannot ping through the WRT54G any more, but after a sudo dhclient eth0 on the Linux box and a new HTTP GET request to 192.168.1.1, I can ping again, and I'm looking at the OpenWRT web interface.

  5. Getting into the WRT54G

    I can now telnet 192.168.1.1 into the WRT54G and use passwd to set a new password. After that, ssh and the web interface work too, and telnet doesn't any more.