OpenWrt Forum Archive

Topic: Recover crashed WRT54GS ?

The content of this topic has been archived on 31 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

Trying to upgrade to XWRT from OpenWRT, I had the great idea to force the upgrade...

root@OpenWrt:~# wget http://downloads.x-wrt.org/xwrt/kamikaz … m-2.4/open                                                                                                                                                              wrt-wrt54gs-2.4-squashfs.bin
Connecting to downloads.x-wrt.org [88.198.39.176:80]
openwrt-wrt54gs-2.4- 100% |*******************************************************************************************************************************************************************************************|  1924 KB 00:00:00 ETA
root@OpenWrt:~#
root@OpenWrt:~#
root@OpenWrt:~# dd bs=32 if=openwrt-wrt54gs-2.4-squashfs.bin of=openwrt-wrt54gs-2.4-squashfs.trx
61569+0 records in
61569+0 records out
root@OpenWrt:~# mtd -e linux -r write openwrt-wrt54gs-2.4-squashfs.trx linux
Bad trx header
This is not the correct file format; refusing to flash.
Please specify the correct file or use -f to force.
Image check failed.
root@OpenWrt:~# mtd -f -e linux -r write openwrt-wrt54gs-2.4-squashfs.trx linux
Bad trx header
This is not the correct file format; refusing to flash.
Please specify the correct file or use -f to force.
Unlocking linux ...
Erasing linux ...

Writing from openwrt-wrt54gs-2.4-squashfs.trx to linux ...  [w]

Right now, the router is crashed and won't boot anymore (blinking power led).

Is there any way to recover it? Using serial cable maybe?

Thanks for you help,

Kh3ops

Kh3ops wrote:
root@OpenWrt:~# dd bs=32 if=openwrt-wrt54gs-2.4-squashfs.bin of=openwrt-wrt54gs-2.4-squashfs.trx
61569+0 records in
61569+0 records out

The way the command was written above, it's nothing more than a copy. If you want the trx file, download the trx file; don't try to convert between them --  there is *one* trx file, that trx file works on *all* devices.

root@OpenWrt:~# mtd -e linux -r write openwrt-wrt54gs-2.4-squashfs.trx linux
Bad trx header
This is not the correct file format; refusing to flash.
Please specify the correct file or use -f to force.
Image check failed.

This warns you that the file isn't actually a trx file and you shouldn't flash it.

root@OpenWrt:~# mtd -f -e linux -r write openwrt-wrt54gs-2.4-squashfs.trx linux
Bad trx header
This is not the correct file format; refusing to flash.
Please specify the correct file or use -f to force.
Unlocking linux ...
Erasing linux ...

Writing from openwrt-wrt54gs-2.4-squashfs.trx to linux ...  [w]

Right now, the router is crashed and won't boot anymore (blinking power led).

.. but you flashed anyway.

Luckily for you there is yet *another* protection mechanism designed to prevent users from doing exactly what you just did.

The WRT54G can't boot the firmware, it's stuck in CFE; essentially a bios -- think of this as a PC with an "insert OS and press any key to continue" error. TFTP a new firmware (use the bin file) and it should boot again.

The discussion might have continued from here.