Posted by: Peter | September 1, 2010

How to Install Open OpenWRT on a Linksys WRT54GL Router

If you want to extend your Linux skills beyond old PCs and servers then try running Linux on your Linksys WRT router as your next weekend project. This post outlines what you need to do.

Upgrading a router running its original Linksys code

The stepsare relatively simple.

  • First read the installation instructions on the OpenWRT website.
  • Visit the most recent sub-directory on the downloads.openwrt.org website.
  • In this directory there should be further sub-directories ordered by the firmware’s version number
  • Finally, there should be a brcm-2.4 folder in which the openwrt-wrt54g-squashfs.bin can be found. Note: If you are using a different router you may have to download the code from a directory other than brcm-2.4 so read the instructions on the site carefully.
  • Download the openwrt-wrt54g-squashfs.bin to your PC.
  • Upload the openwrt-wrt54g-squashfs.bin firmware to the router by following this menu path : http://192.168.1.1 -> Administration -> Firmware Upgrade
  • If you PC doesn’t have a telnet client, you can download one from the PuTTY website. This will be necessary later.
  • Connect your PC to the router with an Ethernet cable. Configure your PC with a static IP address between 192.168.1.2 and 192.168.1.254.  eg. 192.168.1.2 (gateway and DNS is not required).
  • When the router reboots, telnet to its IP address of 192.168.1.1 and issue the following commands.

root@OpenWrt:/# nvram set boot_wait=on
root@OpenWrt:/# nvram set boot_time=10
root@OpenWrt:/# nvram commit && reboot

  • Configuring the router from the command line can be tricky so, you should also install a web GUI. The Luci package can be quickly installed from the telnet router command line like this.

root@OpenWrt:/# opkg update
root@OpenWrt:/# opkg install luci-light
root@OpenWrt:/# opkg install luci

  • Point your browser to http://192.168.1.1 and you should now be able to configure your router much more easily. Your encryption methodology is easily configured using the web GUI.

Enjoy using your new OpenWRT router. Congratulations!

Upgrading a router already running OpenWRT

The steps are very similar to those mentioned before, except you don’t have to run the nvram commands and the firmware filename is different – openwrt-brcm-2.4-squashfs.trx

  • First read the installation instructions on the OpenWRT website.
  • Visit the most recent sub-directory on the downloads.openwrt.org website.
  • In this directory there should be further sub-directories ordered by the firmware’s version number.
  • Finally, there should be a brcm-2.4 folder in which the openwrt-brcm-2.4-squashfs.trx can be found. Note: If you are using a different router you may have to download the code from a directory other than brcm-2.4 so read the instructions on the site carefully.
  • Telnet to your router and then issue the following commands. The first changes your directory to /tmp which is actually a RAM drive located in memory. The second downloads the .trx file using the wget command. The third installs the .trx file using the mtd -r command.

root@OpenWrt:/# cd /tmp
root@OpenWrt:/tmp# wget http://downloads.openwrt.org/backfire/10.03/brcm-2.4/openwrt-brcm-2.4-squashfs.trx
root@OpenWrt:/tmp# mtd -r write openwrt-brcm-2.4-squashfs.trx linux

  • Your router should reboot to the new version of firmware.

Enjoy using your upgraded OpenWRT router. Congratulations!

Conclusion

My home has been running OpenWRT for some months with no noticeable issues. I hope this note was informative.

Advertisement

Leave a Reply

Please log in using one of these methods to post your comment:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

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

Categories

Follow

Get every new post delivered to your Inbox.