Unable to upgrade Linksys E2000 from snapshot

For some reason I'm stuck on OpenWrt SNAPSHOT, r6181-761d45eb87 and am unable to upgrade further. I tried sysupgrade after reset/firstboot, sysupgrade run in failsafe mode and TFTP. I remember was able to upgrade from luci but currently am unable to use it. I can reset the device and have working ssh and the device is fully operational.

Luci won't run because of uhttpd[1342]: Error relocating /usr/sbin/uhttpd: uloop_run: symbol not found. It is after reset, opkg update and opkg install luci with distfeeds.conf pointing to http://archive.openwrt.org/releases/17.01.7 files. My guess is the time frame of 17.01.7 and the snapshot are roughly the same.

The output is

root@OpenWrt:/tmp# sysupgrade -v openwrt-e2000_v1-squashfs.bin
Image metadata not found
Found CyberTAN image with device pattern: 32XN
Found a valid TRX version 1
Saving config files...
Commencing upgrade. All shell sessions will be closed now.
Connection to closed by remote host.
Connection to closed.

After the reboot the version number in the banner is the same as before upgrade.

I was unable to connect to TFTP although I can see single packet from the bootloader:
64 bytes from icmp_seq=27 ttl=64 time=1.000 ms

The device is converted from Linksys WRT320N.

What hardware are we talking about here? There seem to be multiple revisions of the E2000, the first one being 4 MB flash and 32 MB RAM.

If you are still on a LuCI build, your RAM might be too tight to allow the sysupgrade altogether.

1 Like

Sysupgrade does not succeed even without the luci installed. The build is mini or something like that without luci after reset. The reason to convert the unit from WRT320N to E2000 is to use the 8 MB flash. I have checked after the conversion it was 8 MB.

But how much RAM do you have? The RAM might choke your sysupgrade process. Flash shouldn't matter since you're storing the image in /tmp, not on your flash.

root@OpenWrt:~# free
             total       used       free     shared    buffers     cached
Mem:         27884      15828      12056       4236         84       5940
-/+ buffers/cache:       9804      18080
Swap:            0          0          0
root@OpenWrt:~# sysupgrade -v /tmp/openwrt-e2000_v1-squashfs.bin

This was done after firstboot and subsequent reboot, uploaded *.bin and sync && echo 3 > /proc/sys/vm/drop_caches as per https://openwrt.org/docs/guide-user/installation/sysupgrade.cli.


  • Can you provide information on this???
  • Are you saying your device is not listed on the table of hardware?
  • Does this mean you're using a sysupgrade file that's not built for the device in question?
1 Like

The device is original Linksys WRT320N and with the help of DD-WRT it is converted to Linksys E2000. (https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=475684). As E2000 it is listed in the supported hardware and have corresponding image.

The fiddling with distfeeds.conf was an attempt to install working LuCI, compatible with this build because I remember upgrading from the UI was successful and I have done it many times.

Right now I get

root@OpenWrt:/etc/init.d# opkg update
Downloading http://downloads.lede-project.org/snapshots/targets/brcm47xx/mips74k/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading http://downloads.lede-project.org/snapshots/targets/brcm47xx/mips74k/packages/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_74kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_74kc/base/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_74kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_74kc/luci/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_74kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_74kc/packages/Packages.sig
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_74kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_74kc/routing/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_74kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_74kc/telephony/Packages.sig
Signature check passed.
root@OpenWrt:/etc/init.d# opkg install luci
Installing luci (git-20.113.70804-9d02ef1) to root...
Downloading http://downloads.lede-project.org/snapshots/packages/mipsel_74kc/luci/luci_git-20.113.70804-9d02ef1_all.ipk
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci:
 *      cgi-io *        kernel (= 4.14.169-1-d9ff4b92f8908e4c07459194f40bd0b7) *
 * opkg_install_cmd: Cannot install package luci.

As a way forward I see three options

  1. install working LuCI
  2. succeed in connecting to TFTP server of the bootloader
  3. live with this build/trash the device

Actually there are two more. Debug what's wrong with sysupgrade. Try mtd. As far as I can remember mtd was giving me some error about locked/readonly partition or something.

1 Like

Snapshots are a constantly moving target (well, not so much anymore for 17.01 :laughing:), so the version of the snapshot you were running is probably no longer the current in the repo (assuming there is a 'last' snapshot for LEDE still in there somewhere). So it is not surprising that the dependencies cannot be met. In fact, it seems to be looking for kernel 4.14.169 which implies that the packages in the snapshot that you are seeing are actually already for 19.07, but your kernel is still likely 4.4.x.

I agree with @Borromini that you may have a RAM issue, but it may be possible to workaround that for the moment (it may still be an issue later, though)...

  1. Download a version of 18.06 onto your computer (try 18.06.5 which would have been the last stable version before 19.07 was officially released, you can then later try 18.06.8 or jumping to 19.07.2 later or a snapshot).
  2. issue the firstboot command to erase any installed packages and reset the device to defaults. You will of course no longer have LuCI.
  3. copy the 18.06.5 image into the router using scp (copy it to /tmp/)
  4. ssh into the router and then use sysupgrade -n /tmp/<filename> to upgrade. If it doesn't work, you can try adding the -f argument to force it (warning - if you do this with the wrong image, it will brick your unit).
  5. report back about the status of that upgrade process.

Luci sysupgrade doesn't do anything but load the file to /tmp then invoke sysupgrade. Stopping / disabling uhttpd will free up some RAM.

Try installing a release 17.04 build first and do not save configuration (-n flag to sysupgrade). This will get you to something known.

The 32 MB RAM is going to limit what this router can do especially with a 19 build.


Same result with 17.01, 17.04 and 18.06. I guess it is a matter of the image size being big. To make things worst neither -n or --force did make difference.

I removed some of the non-essential packages with opkg and was able to free almost half the RAM still the upgrade failed

root@OpenWrt:~# free
             total       used       free     shared    buffers     cached
Mem:         27884      12740      15144       3632        188       5224
-/+ buffers/cache:       7328      20556
Swap:            0          0          0
root@OpenWrt:~# sysupgrade -n --force /tmp/17.01.0.bin
Image metadata not found
Found CyberTAN image with device pattern: 32XN
Found a valid TRX version 1
Commencing upgrade. All shell sessions will be closed now.
Connection to closed by remote host.
Connection to closed.

Is mtd an option here?

Have you tried building your own minimalist image?

Keep in mind that your device is old enough that it really isn't worth that much more effort (and even worse if you plan to use wireless -- the chipset isn't well supported on OpenWrt, so you'll get bad wifi performance).

1 Like

OK, follow-up.


root@OpenWrt:~# mtd -r write /tmp/17.01.0.bin firmware
Image check failed.

I forced it:

mtd -r -f write /tmp/17.01.0.bin firmware

After the reboot the unit was inaccessible but still answering to ping

$ ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=100 time=1.000 ms
64 bytes from icmp_seq=1 ttl=100 time=0.000 ms
64 bytes from icmp_seq=2 ttl=100 time=0.000 ms
64 bytes from icmp_seq=3 ttl=100 time=0.000 ms

That means it was in the bootloader and TFTP was waiting. Fired the TFTP client and put the earliest LEDE image available on the download page. For my surprise the image was accepted! After the reboot

$ ping
PING ( 56 data bytes
64 bytes from icmp_seq=6 ttl=100 time=372.021 ms
64 bytes from icmp_seq=7 ttl=100 time=0.000 ms
64 bytes from icmp_seq=18 ttl=64 time=721.042 ms
64 bytes from icmp_seq=19 ttl=64 time=1.000 ms
64 bytes from icmp_seq=20 ttl=64 time=0.000 ms
64 bytes from icmp_seq=21 ttl=64 time=0.000 ms
64 bytes from icmp_seq=22 ttl=64 time=0.000 ms
92 bytes from hostname ( Destination Host Unreachable
92 bytes from hostname ( Destination Host Unreachable
64 bytes from icmp_seq=47 ttl=64 time=720.041 ms
64 bytes from icmp_seq=48 ttl=64 time=0.000 ms
64 bytes from icmp_seq=49 ttl=64 time=0.000 ms

Normal boot sequence! Fired up the browser to and... LuCI!

That's it.

1 Like

That smells like some sysupgrade funkiness once more. Glad to hear you got a newer build loaded!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.