How To Switch Firmwares on the NETGEAR WGR614L Without A Serial Cable

Recently it seems that quite a few users are using the firmwares published in this site and are very excited to test different versions and varieties of these firmwares.  However, most of the third party firmwares will not accept 'chk' images from their web interface, and the 614L boodloader accepts only ‘chk’ style images.

As such, it's always been a problem for a user to switch between different firmwares; especially if he/she does not have a serial console. This article is made to help you!  It proposes a solution of this problem using the 'mtd_erase' utility published in this site.  This utility can be downloaded from here.

You Can Switch WGR614L Firmwares Without A Serial Cable

Here's a little explanation of the MTD Erase utility.  If you do not have a serial cable, you cannot start the TFTP daemon from the bootloader prompt.  Without TFTP,  we are unable to upgrade the firmware, since the web interface does not accept ‘chk’ images. Therefore, the first trick is to turn the TFTP daemon of the bootloader into the listen state.  This enables it to accept the file from the LAN host and can successfully save that image into the flash.  For that, we need to execute the 'mtd_erase' utility in the router's shell.  Since most of the third party firmwares support SSH(Secure Shell), we can easily copy this executable to the board by scp.

Instructions for Using the MTD Erase Utility for WGR614L

1.  Download the tar ball.  It contains source (mtd.c) and executable files (mtd_erase) for WGR614L platform.

2.  Remotely login into your WGR614L using ssh.  Please note that ssh may not be enabled in your router by default.  You can enable the service from web interface.  For DD-WRT v24 SP1, this service can be enabled from the 'Services' Page.

Enable ssh in DD-WRT v24 SP1

3. Copy the 'mtd_erase' executable to the '/tmp' directory of the board using scp or any other communication protocol present in the board.  Please note that only the '/tmp/ folder has the write permission; so you will not be able to copy that utility in any other location.

scp mtd_erase [email protected]:/tmp

[Assuming that the mtd_erase utility is present from where you are running the above commands, and your router's IP address is 192.168.1.1]

4. Execute 'mtd_erase' from the '/tmp' directory using the following command –

./mtd_erase -d linux

This will the erase the Linux partition of your WGR614L.

This command can be executed either by logging into the router using ssh, or by using the UI.  DD-WRT and Tomato allow the user to execute any Linux command from the web interface.  For DD-WRT, go to the 'commands' tab in the 'Administration' section and type the above command in the command text box and run the command.

Execute mtd_erase from dd-WRT Web UI

On successful execution the UI will look like this:

Result After successful execution of ntd_erase

5. Reboot your router.  Since there is no bootable image in the Linux partition, the router will be in the TFTP listen state and you can see the green power LED is blinking.

6. Now, for the best part -  you can burn your router with your desired ‘chk’ image using tftp. For transferring a ‘chk’ image from a LAN host, use the following command –

"tftp -m binary 192.168.1.1 -c put [image name]

This command is for Linux only, if you want to upgrade from Windows please refer to the TFTP help. Please wait for a few minutes until your desired image is flashed.

After that, the router will reboot automatically with the new image - congratulations!


Quick Links:

Learn More About the WGR614L

Purchase a WGR614L

Check Out The Programmer's Corner

jeanrob98
jeanrob98's picture
Excellent and useful article.

Excellent and useful article.
Can it be included in the zip file?

Fmay
Fmay's picture
mtd_erase is not necessary to

mtd_erase is not necessary to the first installation. The way to do it is very simple as follow:

cd /tmp
cp /sbin/rc erase
chmod 111 erase
./erase linux

Eko
Eko's picture
All dd-wrt builds already

All dd-wrt builds already include erase utility, I see no need to load another one.
You can simply telnet in and type

erase linux
reboot
heath
heath's picture
tftp> status

tftp> status
Connected to 192.168.1.1.
Mode: octet Verbose: on Tracing: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> put
(file) openwrt_wgr614l.chk
putting openwrt_wgr614l.chk to 192.168.1.1:openwrt_wgr614l.chk [octet]
tftp: sendto: Network is unreachable

What's the problem? Also do I need a bin, trx, or chk? If anything other than chk (maybe I'm wrong for even attempting to use this), where can I find the download?

johncash
johncash's picture
Hi,

Hi,

I am new to this, by mistake i had installed dd-wrt on WNR3500L. I am now trying to put the default netgear firmware. I am not a programmer & not able to understand any thing from step 2. I am using windows 7. I would be helpful if some one can explain me on how to go about it.