Factory Reset results in "overlay filesystem has not been fully initialized yet" error

Hi,

I'm running into the following issue with a factory reset of my device,

[ 12.030000] mount_root: loading kmods from internal overlay
[ 14.560000] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[ 14.570000] block: unable to load configuration (fstab: Entry not found)
[ 14.580000] block: attempting to load /tmp/jffs_cfg/etc/config/fstab
[ 14.580000] block: unable to load configuration (fstab: Entry not found)
[ 14.590000] block: attempting to load /etc/config/fstab
[ 14.600000] block: unable to load configuration (fstab: Entry not found)
[ 14.600000] block: no usable configuration
[ 16.950000] mount_root: Copying files under overlay to a tmp location
[ 17.080000] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[ 17.090000] block: unable to load configuration (fstab: Entry not found)
[ 17.090000] block: attempting to load /tmp/jffs_cfg/etc/config/fstab
[ 17.100000] block: unable to load configuration (fstab: Entry not found)
[ 17.110000] block: attempting to load /etc/config/fstab
[ 17.110000] block: unable to load configuration (fstab: Entry not found)
[ 17.120000] block: no usable configuration
[ 17.170000] mount_root: overlay filesystem has not been fully initialized yet
/over[ 17.220000] mount_root: switching to jffs2 overlay
lay/.fs_state': No such file or directory

Because of this issue, the configs are not persistent on subsequent reboots. This issue is not seen when image is flashed to the device after a factory reset.

Can someone please let me know the reason for this ?
Thanks in advance !

which device? which exact build?

The overlay filesystem gets destroyed in the factory reset. That is the whole purpose/mechanism of the reset.

But overlay is supposed to get re-created at the next boot, so that the new settings and other changes will get stored on overlay. During early boot the possible setting changes are first stored on ramdisk and once the overlay is ready, the changes get copies there.

All other log lines look normal, except the last garbled one.
/overlay/.fs_state’: No such file or directory
Is that really garbled on two lines (and without a timestamp)?

1 Like

Yes, the log seems to be garbled, but I suspect the issue to be because of "/overlay/.fs_state" file not being present for subsequent reboots after factory reset. I don't exactly understand why this happens.

I tried to root cause on why this issue is seen, I see that mount_root done which has to be invoked as part of boot script in rc.d/S95done is not happening. Thus symlink file "/overlay/.fs_state" doesn't exist.
When i manually invoke "mount_root done" I see the symlink of .fs_state getting updated with state as ready i.e.; "fs_state -> 2" and on successive reboots following the manual command i don't see the "overlayfs not fully initialized yet" issue and my configs are persistent.

I'm not sure on why S95done script sequence which invokes "mount_root done" is getting skipped after factory reset !!!

I'm having similar issue with fresh build. After flashing the device I can see all my files in /etc/config/ (I set them by supplying FILES option of Image Builder) but there is mount_root: overlay filesystem has not been fully initialized yet in boot log. If I reboot device via reboot command - files in /etc/config/ has correct values, but if I reboot via simulating power disruption files in /etc/config/ has empty content, but in /rom/etc/config/ - they have proper values. And no changes were made to files after flashing.

For me this happened after a sysupgrade and it turned out to be .extroot-uuid file described in troubleshooting section

Deleting it made the extroot work again