Hi,
this topic was closed, so I'm opening a new one as a follow up. Link: Configuration loss after reboot - #12 by JeremySTX
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