How to Flash Your WRT54GL Firmware from DD-WRT to Tomato

**DISCLAIMER**The following instructions are provided without warranty of any kind. Flashing firmware does not come without risk. I will not be held responsible for any resulting equipment failure or otherwise undesirable results. Proceed at your own risk.

This tutorial explains how I successfully re-flashed my Linksys WRT54GL version 1.1 to use the Tomato 1.22 firmware rather than DD-WRT version 23 SP2 VPN firmware (generic) I have been using for the past couple of years. I decided to write this tutorial because lots of sites have instructions on flashing from the default Linksys firmware to Tomato but far fewer sites offer lots of detail on how to flash from other firmware such as DD-WRT.

I have provided directions with enough detail for the non-technical user to feel comfortable with the procedure. To make things faster for the technical users, I have highlighted the major steps. At the bottom of the post, I’ve included links to related articles I’ve published if you’d like to learn more.

As a bit of background information, I’m used a fully patched (as of November, 2008) Windows Vista Ultimate 64-bit with Service Pack 1 (SP1) Operating System and up-to-date Firefox 3 during the firmware upgrade process. The OS and web browser shouldn’t matter that much, but I thought I share in case you were worried about such things.

Before you begin, download the latest version of the Tomato firmware that is suited for most routers. This tutorial walks through flashing to version 1.22. The files are zipped in the great, but uncommon, 7zip format so you’ll need 7zip or another program that supports the 7zip format to unzip the files. The zip package contains several files, you will only need the “WRT54G_WRT54GL.bin” file but it is a good idea to checkout the “readme.”

I recommend verifying the MD5SUM hash of the “WRT54G_WRT54GL.bin” file to ensure the download wasn’t corrupt or hasn’t been comprised. If you don’t already have a tool to calculate MD5SUMs, I recommend using HashCalc although you must manually compare the sums with this tool unlike some other tools. Unfortunately, Polarcloud does not provide the MD5SUM of the download on their site but luckily for you, I calculated the hash of my download. The signature of the file should be 866251021d42608c69bff558115f95f8.

I recommend printing (or at least saving, not bookmarking, to your hard drive) the following web pages for reference since you will not have Internet access during this process:

It is best to turn off your firewall and anti-virus during this process to ensure that nothing interrupts the firmware flash. An interruption could cause the flash to fail and brick your router. If something does go wrong you may be able to recover from a bad flash.

You should ONLY perform the flash through an Ethernet cable using standard http (not https). Do not do this wirelessly (its best to temporarily disable the wireless adapter on your computer). If your super paranoid or live in an area with unreliable electricity, you should plug your router an PC into an uninterruptible power supply because a power failure during a firmware flash could brick your router. Plug the blue Ethernet (Cat5/RJ45) cable that came with your router into the Network Interface Card (NIC) on the back of your computer and into one of the ports labeled 1, 2, 3, or 4. The “Internet” port on your router should be connected to your broadband source (e.g., cable or DSL modem). Please ignore the extra cable in the picture. It is not needed for the flash to work.

Linksys WRT54GL Cable Connections

I recommend reviewing all of your DD-WRT settings so you can quickly configure the Tomato firmware to offer similar functionality. I took screenshots of all of the pages where I had non-default settings. I also used the same security settings, including WPA2 password, after I loaded Tomato so that all of my wireless devices would not have to be updated. However, if you have poor wireless security, after flashing to Tomato is the perfect time to implement stronger security. You can reference my Securing Your Wireless Network article if you want to learn how to have a really secure wireless network.

In addition to the screenshots of your settings, it is also a good idea to perform a backup of your DD-WRT configuration. Please note you can only restore this backup on the same model router and firmware with which the backup was made. To perform a backup, go to the “Administration” tab and then the “Backup” sub-tab. Once there, just click the “Backup” button and save the file.


The last item that needs to be completed before uploading the new firmware is to reset your DD-WRT firmware to the default settings. A few ways to do this exist. I chose to use the standard web interface because it is easy and should always work. Nonetheless, pressing and holding the reset button on the back of your router for 30 seconds should also work (assuming you have not disabled that feature in your custom firmware).

To reset the router to firmware defaults, go to the internal IP address of your router (most likely and login with the user name and password you setup when you first installed the router (if you have trouble with the login use the reset button method). Once logged in, go to “Administration” tab and the “Factory Defaults” sub-tab. I forgot to write down the exact buttons and also forgot to take a screenshot of this step but I think you just select the “Yes” radio button next to “Restore Factory Defaults” then select “Save Settings.” If that’s not it exactly, you shouldn’t have any trouble determining what to select. Be patient and don’t touch anything because the reset could take a couple of minutes.

The Tomato FAQ recommends that you Telnet into your router before performing the flash and type the “nvram get http_passwd” command to obtain the password that will be used by Tomato after the flash. You cannot just use the DD-WRT password because of a change in the way DD-WRT uses the standard http_passwd variable. I must admit that I did this step but the password I obtained during the Telnet session did not allow me to login. However, as I was writing this tutorial, it occurred to me that I may have obtained the password via Telnet before I reset DD-WRT to the default settings which may explain why the password I obtained did not work.

In order to Telnet into your DD-WRT router, open up the run box by hitting the “Window” key and “R”. Next type “cmd” and hit “Ok.” In the command window, type “telnet″ where represents the IP address of your router. You will be prompted for a user name and password. The telnet user name is always root even if you login to the web interface with a different user name. The password should be the default DD-WRT password of “admin” since you just performed a reset. If not, try your old web login password.

Just so you know, Telnet is not enabled in Windows Vista by default but is in XP. To enable Telnet in Vista follow the instructions at Tech-Recipes site. Alternatively, you could use a tool like Putty.

telnet session

The screenshot above shows the password command being typed into a Telnet session; it does not show the output of the command (i.e., my password).

Write down the password provided because you will need it later.

The next few steps is where the magic starts to happen. Go back to the DD-WRT web interface. You may have to renew the DHCP lease and login again. Since you have reset the firmware to default settings, the user name and password is now “root” and “admin”, respectively. Once logged in, navigate to the “Administration” tab and the “Firmware Upgrade” sub-tab.

Next, select the “Browse” button and select the “WRT54G_WRT54GL.bin” file you downloaded early. Once located, select the “Open” button and then the “Upgrade” button. Wait patiently for the upload to complete. Whatever you do, DO NOT interrupt it.

Firmware Upgrade

After a couple of minutes, you should see a screen that says “Upgrade successful. Unit is rebooting now. Please wait a moment…”

Upgrade successful

Once the reboot completes, you will be prompted to login to the Tomato firmware. This is where you use the “root” user name and the password you obtained via Telnet. Don’t worry if you can’t login…the same thing happened to me. The next paragraph has a solution for you.

Login Box

Since the Tomato interface did not accept the password I obtained through the Telnet session before the flash, I had to perform a hard reset. To do this you need to hold the reset button on the back of the router while unplugging the router. Continue to hold the reset button as you re-plug in the router. Once the router is plugged in you should continue holding the reset button for 30 seconds to complete the hard reset.

After the hard reset is complete, go back to Firefox and navigate to At the prompt enter in “root” for the user name and “admin” as the password. The Tomato web interface should come up.

Once you’ve logged in, you should see the new Tomato firmware. Since you are upgrading from DD-WRT, the Tomato FAQ recommends performing a full reset by navigating to the “Administration” section and then the “Configuration” sub-section. From there, select “Erase all data in NVRAM memory (thorough)” from under the “Restore Default Configuration” menu and then hit “OK.” If you had to do a hard reset in order to get your login to work, you’re probably could skip this step but it won’t hurt to do an additional reset just to be safe.

Restore Default Configuration

After restoring the default configuration, you need to log back in using with the user name of “root” and password of “admin”. Once logged in, hit the “Renew” button that is on the “Overview” page.

After renewing you may need to reboot your computer to get Internet access. Alternatively, in Vista you may type “Network and Sharing Center” in the Start Search box. Within the Network and Sharing Center select the red “X” between the network on Internet on the map. The Windows Network Diagnostics menu should appear. On that menu select “Reset the network adapter…” option at the bottom. Windows will repair the network and you should see a message that says “the problem has been resolved.”

Network and Sharing Center

Now that everything is working, don’t forget to turn your anti-virus and firewall back on. Also, be sure to check out my Securing Your Wireless Network article if you want to learn how to have a really secure wireless network.

Congratulations, you’ve successfully flashed your router! Since you’ve successfully flashed your WRT54G, you may be interested in Wireless Hacks: Tips & Tools for Building, Extending, and Securing Your Network.

If you liked this post, consider subscribing to my feed and/or sending me something from my wish list.

14 Responses to “How to Flash Your WRT54GL Firmware from DD-WRT to Tomato”

  1. Christina says:

    Hello! I am glad we could be of some entertainment to you! LOL! That was a crazy morning/day. We don’t lack days like that around here though. We have been doing pretty good but we found out today we won’t be coming home for Christmas which is a complete bummer! Other than that all is well here… if you are looking for some more Alaska stories we are going to try and update the blog again tonight. That should let you in on our life here.
    Miss you guys!

  2. Matt says:

    It was entertaining for me if it wasn’t so much fun for you guys. For yall’s sake, I wish you were able to come home for Christmas. At least you’ll have a white Christmas though you’re probably tired of the snow by now. It actually snowed in TN this past Thursday. We had about an inch at our house.

    I’ll keep my eye out for some more good Alaskan stories. I’m bad about only writing tech posts on my blog…I do try to post pictures every now and then…

    Let us know when you’re back in TN and maybe we can get together.

    Stay in touch.

  3. Vladimir says:

    Thank you for this excellent article! Great job! The part for hard reset of the password was really helpful.

  4. Matt says:

    Thanks. It’s always good to know something I created is useful.

  5. Rsarmiento says:

    Hey man thank you for the guide!
    Not sure if this will help me with my situation. I currently have the DD-WRT installed on my 54GL. I recently made a few changes in my setup where I enabled DMZ and forwarded some ports for my ps3 in order to host games and what not.
    I’ve been getting disconnected like crazy from the psn network. I’ve tried numerous things from disabling Upnp, having just port forwarded and then disabling the dmz..vice versa. Anyway hopefully this tomato firmware will solve my issue. Not sure how but will try Qos as my gf loves to watch streaming drama series on the net while I play online games on my ps3.

    Thanks for the guide!

  6. Matt says:

    Rsarmiento, you’re more than welcome. I don’t know if Tomato will solve your issues or not but it’s worth a try. I really like DD-WRT, maybe even more than Tomato, but DD-WRT doesn’t sound like it’s working for you.

    I would advice you to keep UPNP disabled and just use the port forwarding method. It accomplishes the same goal in a more secure way.

    Good luck with the QOS ;)

  7. Rsarmiento says:

    Hey Matt,

    I’ve tried disabling UPNP with the just the port forwarding..and just dmz.. also a combination of both…
    Just wanted to update you on my progress.. soo I’ve successfully switched from DD-WRT to Tomato…and wow. it solved all my problems… I know for a fact that the PSN network has many flaws and many random disconnects but I haven’t gotten a single disconnect since switching to Tomato and port forwarding all the ps3 ports.
    I haven’t setup QoS yet..but I will after I read more about it and how to set it up on Tomato… It does take a little time to get use to their interface coming from DD-WRT :)
    Anyway Tomato is solid!

    Thank you for the guide again!!! <3Google haha

  8. Matt says:

    Hey Rsarmiento,

    Great! I’m glad Tomato fixed your problems. The interface is a drastic change. I love the bandwidth graphs. I don’t need QOS but Tomato’s QOS is supposed to better than DD-WRTs and also produce some cool graphsy.

    Thanks for the update.

  9. Given DD-WRT’s non-compliance with the GNU GPL, I decided to move my Linksys routers to Tomato. This guide made the process easy. Thank you.

  10. Matt says:

    I’m glad the guide was helpful. Hope you enjoy Tomato.

  11. Les says:

    Much thanks. The Guide worked like a charm with no hitches. Good work.

  12. Matt says:

    Thank you very much. Always glad when my guides help people out.

  13. [...] I have several posts related to the Linksys WRT54GL (e.g., Tomato, DD-WRT, etc.), I thought I’d let my readers know that Newegg has the WRT54GL on sale for [...]

  14. [...] I have several posts related to the Linksys WRT54GL (e.g., Tomato, DD-WRT, etc.), I thought I’d let my readers know that Newegg has the WRT54GL on sale for [...]

  • Recent Comments

    • Ubuntu HDMI Sound Configuration (22)
      • Tim: Thanks Matt and Mark!! I now have sound through HDMI on my HTPC. I have Ubuntu 9.04, ASUS EN9400GT with Nvidia....
      • Mark: Thank you. Worked on my Toshiba M300 Laptop running Ubuntu 9.04 Jaunty, with the following modifications: I...
    • Tomato Firmware Option for WRT54GL (9)
      • junn: I just upgrade my brand new wrt54gl to dd-wrt. Do have compare dd-wrt with tomato ? Which is fast and stable ?...
      • brianko: FWIW, after having a year of 1500/300 speeds with Time-Warner (supposedly after the RR-Turbo free upgrade),...
  • All About Me

    I'm a recent college graduate with a degree in information systems and work as an IS Internal Auditor. I enjoy creating websites and learning about new technology. The best way to get me away from the PC is a good camping trip or mountain bike ride. Want to learn more?