TP-Link Archer c7v5: Config loss after reboot

Hi,

this topic was closed, so I'm opening a new one as a follow up. Link: Configuration loss after reboot

Reproducer:

  • Put 4 MByte on the /root partition
  • add a line "/root" to "/etc/sysupgrade.conf" to preserve the "/root" during sysupgrade
  • do sysupgrade /tmp/firmware.bin to OpenWrt 19.07.4
  • let it boot
  • config is there
  • /overlay/.fs_state -> 2
  • all files correct
  • reboot
  • /etc/config is missing

Logs:

dmesg | egrep "overlay|jffs"

[    0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[    0.289918] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[   11.125819] jffs2_scan_eraseblock(): End of filesystem marker found at 0x200000
[   11.133420] jffs2_build_filesystem(): unlocking the mtd device...
[   11.141827] jffs2_build_filesystem(): erasing all blocks after the end marker...
[   39.940063] jffs2: notice: (508) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   39.957280] mount_root: overlay filesystem has not been fully initialized yet
[   41.091552] mount_root: switching to jffs2 overlay
[   41.118023] overlayfs: upper fs does not support tmpfile.
[   77.996649] jffs2: Newly-erased block contained word 0x19852003 at offset 0x00000000

If doing this exact same upgrade procedure multiple times, ca. 1 out of 15 flashes work and /etc/config is persisted. When it is persisted, the lines

mount_root: overlay filesystem has not been fully initialized yet

and

jffs2: Newly-erased block contained word 0x19852003 at offset 0x00000000

do not come up in the log.

It seems, @JeremySTX @luochongjun already found an explanation for the issue and also a fix.

How can I make use of the fix?

Thank you.

Regards

This could also be a solution: 19.07.2: mount_root: failed - cp -a /tmp/root/* /rom/overlay: Not a tty

How can I use it?

Isn't Fix no settings saved supposed to fix this?

Related: 19.07.xx: Strange kernel jffs2 bug

I didn't have time to validate the latest version of OpenWRT.
I have a quick look at the 5.4.51 version of the kernel. Please try to comment my red box.

Note that the above changes, which I did not actually verify, may cause some unknown exceptions. Note that backup Falsh

2 Likes