Linksys EA8300 MTD partition 'rootfs_data' not found

Hey everyone!

New to the OpenWRT world, but fairly experience in command line/linux etc.

I've been fairly successful in getting my EA8300 set up with OpenWRT but all of the sudden when trying to install or upgrade packages I am seeing the "MTD partition 'rootfs_data' not found" error.

Let me know what information I can provide to better assist in troubleshooting, logs and what not etc.

I've try to perform a hard reset (holding the reset button for 10 seconds, but see no change in router activity. Not even a power cycle.)

Didn't want to move forward with force flashing the firmware in the event I brick the device.

Thanks!

OK, don't reset anything if it's booting and don't panic!

Installing packages shouldn't require MTD access, ever. (You also shouldn't upgrade packages, a topic of another discussion.)

What were you trying to do when it failed (what command or action)?

If you log in with ssh, what does

mount

show?

What about

cat /proc/mtd

On my EA8300, I see:

jeff@office:~$ mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup on /sys/fs/cgroup type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,cpu,cpuacct,blkio,memory,devices,freezer,net_cls,pids)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_1 on /overlay type ubifs (rw,noatime,assert=read-only,ubi=0,vol=1)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
jeff@office:~$ cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00100000 00020000 "sbl1"
mtd1: 00100000 00020000 "mibib"
mtd2: 00100000 00020000 "qsee"
mtd3: 00080000 00020000 "cdt"
mtd4: 00080000 00020000 "appsblenv"
mtd5: 00080000 00020000 "ART"
mtd6: 00200000 00020000 "appsbl"
mtd7: 00080000 00020000 "u_env"
mtd8: 00040000 00020000 "s_env"
mtd9: 00040000 00020000 "devinfo"
mtd10: 05800000 00020000 "kernel"
mtd11: 05500000 00020000 "rootfs"
mtd12: 05800000 00020000 "alt_kernel"
mtd13: 05500000 00020000 "alt_rootfs"
mtd14: 00100000 00020000 "sysdiag"
mtd15: 04680000 00020000 "syscfg"

Thanks for the quick reply Jeff!

The router is booting just fine! Hence my hesitation to re-flash lol.

I seem to have an intermittent issue with SSH returning this message.

" PTY allocation request failed on channel 0

shell request failed on channel 0"

Thoughts?

OK, that's not a good sign. How many times have you flashed the router since you got it? Once, or more than once?

Only the once, didnt want to risk bricking anything.

I have reset it using 'firstboot' and reset it using LuCI a handful of times.

I currently have internet and access via LuCI.

Should probably note I started seeing the SSH issue last night after installing several packages such as Adblock, SQM, etc. Then I got home from work today and did not see the issue. Until you just asked me to log in via SSH again.

My suggestion would be to flash OpenWrt from the OEM firmware, which should still be on your "other" firmware partitions. Dual-firmware devices are helpful with that!

This will overwrite your config -- you can try to save it with LuCI, but don't restore it verbatim!

While you have connectivity, I'd download both the "factory" and "sysupgrade" images.

https://downloads.openwrt.org/snapshots/targets/ipq40xx/generic/openwrt-ipq40xx-generic-linksys_ea8300-squashfs-factory.bin

https://downloads.openwrt.org/snapshots/targets/ipq40xx/generic/openwrt-ipq40xx-generic-linksys_ea8300-squashfs-sysupgrade.bin

I'd also pull up the installation instructions in a browser while you've got connectivity.

Since these are snapshots, you'll need to install LuCI manually, but I am guessing you've already done that once. If not, don't proceed without reading https://openwrt.org/docs/guide-user/luci/luci.essentials
(Personally, I install luci-ssl-nginx if I'm installing LuCI, for HTTP-S)

If you have LuCI up and running, install the luci-app-advanced-reboot package (as the easiest way to switch back to the OEM firmware partition)

Once you have that installed, confirm that the "Alternative" partition is OEM firmware. Reboot into the OEM firmware, and reinstall OpenWrt using the "factory" image.

If you run into problems and don't have connectivity, another way you can switch to the "other" firmware is to cause the router to "fail to boot successfully" three times. You can cause a boot failure by powering it on, waiting about 10 seconds (once the "booting" (WPS) light starts to flash), then switching it off. After three times, it will internally switch over to the other firmware for the next boot.

If you have any questions, ask now, while you've still got connectivity!!

1 Like

Alright Jeff! Looks like I've got more info and probably some related info here. When trying to install the advanced-reboot package I receive these errors.

Collected errors:
 * wfopen: //usr/lib/opkg/info/luci-app-advanced-reboot.control: Read-only file system.
 * wfopen: //usr/lib/opkg/info/luci-app-advanced-reboot.postinst: Read-only file system.
 * wfopen: //usr/lib/opkg/info/luci-app-advanced-reboot.prerm: Read-only file system.
 * wfopen: /usr/lib/lua/luci/controller/advanced_reboot.lua: Read-only file system.
 * extract_archive: Cannot make dir /usr/lib/lua/luci/view/advanced_reboot/: Read-only file system.
 * wfopen: /usr/lib/lua/luci/view/advanced_reboot/advanced_reboot.htm: No such file or directory.
 * wfopen: /usr/lib/lua/luci/view/advanced_reboot/alternative_reboot.htm: No such file or directory.
 * wfopen: /usr/lib/lua/luci/view/advanced_reboot/applyreboot.htm: No such file or directory.
 * wfopen: /usr/lib/lua/luci/view/advanced_reboot/power_off.htm: No such file or directory.
 * pkg_write_filelist: Failed to open //usr/lib/opkg/info/luci-app-advanced-reboot.list: Read-only file system.
 * opkg_install_pkg: Failed to extract data files for luci-app-advanced-reboot. Package debris may remain!
 * opkg_install_cmd: Cannot install package luci-app-advanced-reboot.

Should I attempt to switch over to OEM firmware via the power cycle method?

Looks like something is corrupt with your overlay, or you've somehow filled up over 50 MB.

I'd try to see of you can download a copy ("backup", I think is the word in LuCI) of your config.

What is the OpenWrt release string in LuCI? There was an important commit on Sat Jun 15 to the EA8300 code base.

1 Like

I'm looking at 98% (68.9MB) free space under the software page.

I am able to download a copy of the config. I've made several backups.

Where can I find the WRT release string? Is this it?

"OpenWrt SNAPSHOT r11320-2bc7c519dc / LuCI Master (git-19.296.33125-a9b680c)"

1 Like

October 22nd, good.

OK, I'd then try to switch over to the OEM firmware and re-install the OpenWrt "factory" image.

The config backup is a tar file. You can expand and examine with "the usual tools".

1 Like

Alright, I power cycled, shut it down when WPS started flashing.

Router booted and still seems to be booting to WRT.

Oddly enough I am able to SSH in.

OK! Now we can figure out what is going on (hopefully)

df -h
mount
cat /proc/mtd

(You can use the preformat button </> in the toolbar)

1 Like
root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.0M      3.0M         0 100% /rom
tmpfs                   121.9M    428.0K    121.5M   0% /tmp
/dev/ubi0_1              66.8M      1.1M     62.3M   2% /overlay
overlayfs:/overlay       66.8M      1.1M     62.3M   2% /
tmpfs                   512.0K         0    512.0K   0% /dev

root@OpenWrt:~# mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup on /sys/fs/cgroup type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,cpu,cpuacct,blkio,memory,devices,freezer,net_cls,pids)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_1 on /overlay type ubifs (rw,noatime,assert=read-only,ubi=0,vol=1)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "sbl1"
mtd1: 00100000 00020000 "mibib"
mtd2: 00100000 00020000 "qsee"
mtd3: 00080000 00020000 "cdt"
mtd4: 00080000 00020000 "appsblenv"
mtd5: 00080000 00020000 "ART"
mtd6: 00200000 00020000 "appsbl"
mtd7: 00080000 00020000 "u_env"
mtd8: 00040000 00020000 "s_env"
mtd9: 00040000 00020000 "devinfo"
mtd10: 05800000 00020000 "kernel"
mtd11: 05500000 00020000 "rootfs"
mtd12: 05800000 00020000 "alt_kernel"
mtd13: 05500000 00020000 "alt_rootfs"
mtd14: 00100000 00020000 "sysdiag"
mtd15: 04680000 00020000 "syscfg"

tells me that you have the proper overlay device mounted, not a tempfs or something like that. That's a good sign.

logread | less

should let you see the boot log. Is there anything there that suggests bad NAND blocks or any kind of file-system problem?

Can you

touch /etc/_test

successfully?

Edit: For reference, here's the segment of dmesg related to the MTD and UBI initialization

[    1.013653] loop: module loaded
[    1.015484] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xda
[    1.015999] nand: Winbond W29N02GV
[    1.022594] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.025950] 16 fixed-partitions partitions found on MTD device qcom_nand.0
[    1.033360] Creating 16 MTD partitions on "qcom_nand.0":
[    1.040254] 0x000000000000-0x000000100000 : "sbl1"
[    1.047513] 0x000000100000-0x000000200000 : "mibib"
[    1.052007] 0x000000200000-0x000000300000 : "qsee"
[    1.056761] 0x000000300000-0x000000380000 : "cdt"
[    1.061159] 0x000000380000-0x000000400000 : "appsblenv"
[    1.066017] 0x000000400000-0x000000480000 : "ART"
[    1.070932] 0x000000480000-0x000000680000 : "appsbl"
[    1.077376] 0x000000680000-0x000000700000 : "u_env"
[    1.080831] 0x000000700000-0x000000740000 : "s_env"
[    1.085164] 0x000000740000-0x000000780000 : "devinfo"
[    1.090130] 0x000000780000-0x000005f80000 : "kernel"
[    1.103064] random: fast init done
[    1.182089] 0x000000a80000-0x000005f80000 : "rootfs"
[    1.261225] mtd: device 11 (rootfs) set to be root filesystem
[    1.261554] mtdsplit: no squashfs found in "rootfs"
[    1.266023] 0x000005f80000-0x00000b780000 : "alt_kernel"
[    1.352047] 0x000006280000-0x00000b780000 : "alt_rootfs"
[    1.430772] 0x00000b780000-0x00000b880000 : "sysdiag"
[    1.432428] 0x00000b880000-0x00000ff00000 : "syscfg"
[    1.501138] libphy: ipq40xx_mdio: probed
[    1.532399] ESS reset ok!
[    1.565395] ESS reset ok!
[    1.983235] libphy: Fixed MDIO Bus: probed
[    1.984990] EDMA using MAC@ - using
[    1.985005] be:29:00:f3:79:76
[    2.086298] i2c /dev entries driver
[    2.091881] NET: Registered protocol family 10
[    2.093478] Segment Routing with IPv6
[    2.095381] NET: Registered protocol family 17
[    2.099190] 8021q: 802.1Q VLAN Support v1.8
[    2.103421] Registering SWP/SWPB emulation handler
[    2.112976] ubi0: attaching mtd11
[    2.657443] random: crng init done
[    2.717373] ubi0: scanning is finished
[    2.733847] ubi0: attached mtd11 (name "rootfs", size 85 MiB)
[    2.733921] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.738797] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.745481] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.752245] ubi0: good PEBs: 680, bad PEBs: 0, corrupted PEBs: 0
[    2.759091] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    2.765343] ubi0: max/mean erase counter: 3/1, WL threshold: 4096, image sequence number: 2086578551
[    2.772303] ubi0: available PEBs: 0, total reserved PEBs: 680, PEBs reserved for bad PEB handling: 40
[    2.781777] ubi0: background thread "ubi_bgt0d" started, PID 87
[    2.791521] block ubiblock0_0: created from ubi0:0(rootfs)
[    2.796475] hctosys: unable to open rtc device (rtc0)
[    2.808963] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    2.811274] Freeing unused kernel memory: 1024K
[    2.835647] Run /sbin/init as init process
1 Like

Okay, for the logs. I don't immediately see anything that would suggest bad NAND with my understanding in reading the logs.

Pasting them just incase you might identify something I don't see.

Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.032523] PTP clock support registered
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.033921] clocksource: Switched to clocksource arch_sys_counter
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.034924] NET: Registered protocol family 2
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.035732] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.035773] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.035811] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.035860] TCP: Hash tables configured (established 2048 bind 2048)
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.035985] UDP hash table entries: 256 (order: 1, 8192 bytes)
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.036025] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.036271] NET: Registered protocol family 1
Fri Oct 25 04:25:03 2019 kern.debug kernel: [    0.036314] PCI: CLS 0 bytes, default 64
Fri Oct 25 04:25:03 2019 kern.warn kernel: [    0.037360] No memory allocated for crashlog
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.037591] workingset: timestamp_bits=14 max_order=16 bucket_order=2
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.042406] squashfs: version 4.0 (2009/01/31) Phillip Lougher
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.042423] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat
, Inc.
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.048157] io scheduler noop registered
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.048175] io scheduler deadline registered (default)
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.050160] qcom-pcie 40000000.pci: host bridge /soc/pci@40000000 ranges:
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.050200] qcom-pcie 40000000.pci:    IO 0x40200000..0x402fffff -> 0x40200000
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.050226] qcom-pcie 40000000.pci:   MEM 0x40300000..0x40ffffff -> 0x40300000
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.325488] qcom-pcie 40000000.pci: Link up
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.325641] qcom-pcie 40000000.pci: PCI host bridge to bus 0000:00
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.325661] pci_bus 0000:00: root bus resource [bus 00-ff]
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.325677] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff] (bus address [0x40200000-0x402fff
ff])
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.325691] pci_bus 0000:00: root bus resource [mem 0x40300000-0x40ffffff]
Fri Oct 25 04:25:03 2019 kern.debug kernel: [    0.325734] pci 0000:00:00.0: [17cb:1001] type 01 class 0x060400
Fri Oct 25 04:25:03 2019 kern.debug kernel: [    0.325771] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
Fri Oct 25 04:25:03 2019 kern.debug kernel: [    0.325829] pci 0000:00:00.0: PME# supported from D0 D3hot
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.327481] PCI: bus0: Fast back to back transfers disabled
Fri Oct 25 04:25:03 2019 kern.debug kernel: [    0.327704] pci 0000:01:00.0: [168c:0056] type 00 class 0x028000
Fri Oct 25 04:25:03 2019 kern.debug kernel: [    0.327915] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
Fri Oct 25 04:25:03 2019 kern.debug kernel: [    0.328586] pci 0000:01:00.0: PME# supported from D0 D3hot
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.330376] PCI: bus1: Fast back to back transfers disabled
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.330431] pci 0000:00:00.0: BAR 8: assigned [mem 0x40400000-0x405fffff]
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.330449] pci 0000:00:00.0: BAR 0: assigned [mem 0x40300000-0x40300fff 64bit]
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.330474] pci 0000:01:00.0: BAR 0: assigned [mem 0x40400000-0x405fffff 64bit]
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.330550] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.330566] pci 0000:00:00.0:   bridge window [mem 0x40400000-0x405fffff]
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.332994] pcieport 0000:00:00.0: AER enabled with IRQ 94
Fri Oct 25 04:25:03 2019 kern.err kernel: [    0.334695] bam-dma-engine 8e04000.dma: num-channels unspecified in dt
Fri Oct 25 04:25:03 2019 kern.err kernel: [    0.334713] bam-dma-engine 8e04000.dma: num-ees unspecified in dt
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.335950] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.336032] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.336107] tcsr 1953000.ess_tcsr: setting ess interface select = 0
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.336184] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
Fri Oct 25 04:25:03 2019 kern.info kernel: [    0.336420] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled

When running touch /etc/_test no output is displayed. Just another command line.

OK, if you didn't get an error message and /etc/_test is there (and you can delete it), then you've probably got a good boot into OpenWrt.

fw_printenv boot_part

will show you which of the two firmware options you're running. "2" would not be a surprise. You can write it with

fw_setenv boot_part 1

or

fw_setenv boot_part 2

to "manually" set the next boot. (For information right now.)

I'd install the GUI reboot-er now, while you can:

opkg update
opkg install luci-app-advanced-reboot

Edit: I'm still scratching my head as to what might have happened. In the dusty recesses of my memory of porting OpenWrt to the EA8300 are vague recollections of trying to boot the OEM kernel with an OpenWrt file system. But they're really, really vague.

1 Like

Looks like I'm booting to Partition 1.

And to add I was able to install the advanced-reboot package via CLI.

I of course did not attempt via LuCI. Before I was unable to install anything via CLI or LuCI. I'm assuming I have WRT on both partitions.

EDIT: I just confirmed via the advanced-reboot tool I have two instances of WRT.

1 Like

I'm guessing that the "other" one is somehow corrupt. If it were my router and I didn't have serial access, I'd flash the "sysupgrade" image so that you've got two, relatively clean versions on your device.

1 Like

Thanks Jeff! All of your help is greatly appreciated! Feel like I also have a better understanding of how the router works. You were great!

1 Like

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