Linksys EA8500 woes

I'm struggling to get going with this device and its multiple partitions.

I got the device with the Linksys 1.1.4.173728 firmware on it so I didn't reflash it with that or any other Linksys firmware (assuming that if current partition is 1.1.4.173728 than the other one is at least 1.1.4.169978, which is required to upgrade to 1.1.4.173728) -- and maybe that's the reason for my problems.

I got the customized LEDE image running on the device at the moment, but my attempts to use sysupgrade either from Luci or from CLI fail:

root@EA8500:~# sysupgrade -n /tmp/sys.tar
Sending TERM to remaining processes ... ubusd askfirst logd rpcd netifd odhcpd crond uhttpd openvpn ntpd vnstatd dnsmasq
Sending KILL to remaining processes ... openvpn askfirst
Switching to ramdisk...
Performing system upgrade...
Unlocking kernel2 ...

Writing from to kernel2 ...
UBI device number 1, total 296 LEBs (37584896 bytes, 35.8 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
ubimkvol: error!: UBI device does not have free logical eraseblocks
cannot create rootfs volume
libubi: error!: "/dev/" is not a character device
ubiupdatevol: error!: error while probing "/dev/"
error 22 (Invalid argument)
sysupgrade successful
umount: can't unmount /dev/pts: Resource busy
umount: can't unmount /dev: Resource busy

So, my questions are:

  1. How to return to stock to reflash the latest Linksys firmware twice to make sure I start from a clean slate? Luci sysupgrade rejects the Linksys firmware and I'm afraid to use drastic measures like mtd without having the exact command to run.
  2. If non-working sysupgrade on this device is a known issue, what's the exact command for mtd and should I use the sysupgrade.tar or factory.bin with mtd?

Please help, I got this fantastic device, but it's my first device with multiple partitions and I'm struggling with that. :frowning:

I got very lucky that @mkresin was online in IRC. After the extensive troubleshooting section, what helped me was:

  1. Upload the lede-ipq806x-EA8500-squashfs-factory.bin image to /tmp/lede-ipq806x-EA8500-squashfs-factory.bin
  2. Run sysupgrade -F -n /tmp/lede-ipq806x-EA8500-squashfs-factory.bin

That converted the other partition to the LEDE-compatible format and I can now freely sysupgrade at will.

I've also reached out to ianchi4 with suggestion for sysupgrade to recognize and automatically drop squashfs partitions so that no one will experience this issue again.

Hi @stangri, thanks for the report.
I have a working fix and will send a PR after some more testing.

1 Like

Fix has been merged into trunk. Now there is no error on the first flash with sysupgrade to the second partition.

Beware that recent changes at LEDE level, make "sysupgrade -F" the standard way for flashing back to stock firmware.

1 Like

@ianchi

Hi there ! I manage to flash the 1st boot partition to LEDE but when I booted the 2nd boot partition running default Linksys firmware and flash it with LEDE it was only applying to the 1st boot partition. How can I flash the 2nd boot partition to LEDE?

Both Linksys firmware and LEDE always flash alternative/another partition on EA8500. If you want to have LEDE on the 2nd partition, you need to boot into 1st partition and flash LEDE from there, it will write LEDE on the 2nd partition then.

1 Like

@Strangi
Great so where do I flash the image from LuCI or ash sysupgrade?

Either way, it flashes not current, but alternative partition.

@ianchi @stangri
Hi I have bad blocks on my ea8500 nand is there anyway to deal with this? does using mtd will try to recover those bad blocks?

[   12.539712] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   12.548564] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   12.576491] blk_update_request: I/O error, dev mtdblock0, sector 0
[   12.577099] blk_update_request: I/O error, dev mtdblock0, sector 8
[   12.582157] blk_update_request: I/O error, dev mtdblock0, sector 16
[   12.588402] blk_update_request: I/O error, dev mtdblock0, sector 24
[   12.594687] blk_update_request: I/O error, dev mtdblock0, sector 0
[   12.600146] Buffer I/O error on dev mtdblock0, logical block 0, async page read
[   12.809921] blk_update_request: I/O error, dev mtdblock0, sector 32
[   12.810498] blk_update_request: I/O error, dev mtdblock0, sector 40
[   12.815631] blk_update_request: I/O error, dev mtdblock0, sector 48
[   12.821782] blk_update_request: I/O error, dev mtdblock0, sector 56
[   12.828137] blk_update_request: I/O error, dev mtdblock0, sector 64
[   12.836059] Buffer I/O error on dev mtdblock0, logical block 1, async page read
[   12.843211] Buffer I/O error on dev mtdblock1, logical block 0, async page read
[   12.852704] Buffer I/O error on dev mtdblock1, logical block 1, async page read
[   13.198025] Buffer I/O error on dev mtdblock2, logical block 0, async page read
[   13.203769] Buffer I/O error on dev mtdblock2, logical block 1, async page read
[   13.207345] Buffer I/O error on dev mtdblock3, logical block 0, async page read
[   13.218489] Buffer I/O error on dev mtdblock3, logical block 0, async page read
[   13.228045] Buffer I/O error on dev mtdblock4, logical block 0, async page read
[   13.242886] Buffer I/O error on dev mtdblock4, logical block 0, async page read
[   21.791012] Adding 239612k swap on /dev/zram0.  Priority:-1 extents:1 across:239612k SS
[   24.228178] blk_update_request: 188 callbacks suppressed
[   24.228185] blk_update_request: I/O error, dev mtdblock0, sector 0
[   24.233223] blk_update_request: I/O error, dev mtdblock0, sector 8
[   24.239151] blk_update_request: I/O error, dev mtdblock0, sector 16
[   24.245356] blk_update_request: I/O error, dev mtdblock0, sector 24
[   24.259423] blk_update_request: I/O error, dev mtdblock0, sector 0
[   24.259457] buffer_io_error: 26 callbacks suppressed
[   24.259463] Buffer I/O error on dev mtdblock0, logical block 0, async page read
[   24.271997] blk_update_request: I/O error, dev mtdblock0, sector 32
[   24.277321] blk_update_request: I/O error, dev mtdblock0, sector 40
[   24.283509] blk_update_request: I/O error, dev mtdblock0, sector 48
[   24.289691] blk_update_request: I/O error, dev mtdblock0, sector 56
[   24.296028] blk_update_request: I/O error, dev mtdblock0, sector 64
[   24.303865] Buffer I/O error on dev mtdblock0, logical block 1, async page read
[   24.311004] Buffer I/O error on dev mtdblock1, logical block 0, async page read
[   24.320468] Buffer I/O error on dev mtdblock1, logical block 1, async page read
[   24.654873] Buffer I/O error on dev mtdblock2, logical block 0, async page read
[   24.659971] Buffer I/O error on dev mtdblock2, logical block 1, async page read
[   24.663907] Buffer I/O error on dev mtdblock3, logical block 0, async page read
[   24.671487] Buffer I/O error on dev mtdblock3, logical block 0, async page read
[   24.679527] Buffer I/O error on dev mtdblock4, logical block 0, async page read
[   24.689157] Buffer I/O error on dev mtdblock4, logical block 0, async page read