OpenWrt Forum Archive

Topic: Not able to re-flash or recover

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

Hello,
Device is TP-Link-940n-v3.
sysupgrade -n <image name> goes through, router reboots and I still see old firmware and configs.
So basically firmware reflash is not succeeding.

I had flashed an image without mtd package, I was trying to create smallest image possible.

Can the lack of mtd package be a reason for this?

Let me know if there is a way to recover.
I have tried tp-link recovery method as well by setting up tftp server.
Still I see old firmware.

The mtd system is responsible for providing low-level access to the flash memory. If the related packages and components are missing, the kernel cannot access the flash memory. As a result, mounting a root filesystem most likely fails, and this would lead to a kernel panic and a restart.

What you're probably seeing is just that: the flash succeeds, but the new image does not boot due to lack of mtd. The kernel panics, router restarts, and the failsafe kicks in to load an alternative firmware image from another location. I think 940n v3 is one of those devices that has such a failsafe mechanism where you do not flash the firmware that you're currently running, but an alternative image placed in a secondary location.

Leaving the mtd package out is not going to work. You'll need to look for other ways to conserve space.

Thanks for the reply.
So is there a way to recover from current state?
This image also doesn't have opkg package so I am not able to do "opkg install mtd".

Wow you got your self in to a rite pickle lol Have you tryed logging in with putty and doing sysupgrade fermwair.bin -F I am not sure if you nede mtd for sysupgrades
If it turns out that you do ned mtd for sysupgrades, then you will need a USB TTL cable.

(Last edited by tapper on 15 Jul 2017, 06:41)

If the current firmware that you are running does not have mtd installed nor opkg, then you'll need to go down the bootloader route. This implies getting a USB TTL cable, as tapper pointed out, and connecting to the serial interface on the router.

tapper wrote:

I am not sure if you nede mtd for sysupgrades

While I do not know the specifics of this router model, I'm curious to know how exactly are you going to get the updated kernel / rootfs image into the flash memory if you do not have mtd installed? Does this router have some sort of a flash translation layer that presents the flash memory as a block device to the kernel?

"sysupgrade" doesn't work in this state. It prints some logs, doesn't error out, leads to router reboot, gives impression that upgrade succeeded, but comes up with old firmware.
Thank you for your replies.
I will probably use the device with current firmware, it should work as a dumb AP.

The discussion might have continued from here.