Sorry, it's old question, but I have no answers for me with my Engenius EPG 5000 OpenWrt 18.06.2 r7676-cddd7b4c77 / LuCI openwrt-18.06 branch (git-19.020.41695-6f6641d).
So, I'm trying to add external overlay partition at USB drive. All was done by native manual
But no any final solution for "after reboot" case, extroot was not reconnecting
export PREINIT = 1 ; mount_root was added.
/etc/config/fstab at /overlay was equal as default.
I don't see any mistake in your configuration. Is there anything in dmesg or syslog?
swap on USB doesn't look like a good idea. Too slow and will wear out the flash if used.
Nope, logs contains only records about "mtdblockX already connected" after about 6 seconds after boot. Same was googled in other cases.
Sure, SWAP was used only for problem identification. It's reconnected after reboot too.
Yes, but such big delay was covered in some situations as possible to fix overlay automount after reboot. For exampe in native manual:
Do not use vfat (FAT/FAT32); it does not work. If you have a FAT preformatted USB drive, you cannot use it for extroot without reformatting. Use e.g. ext4 (install e2fsprogs, then format your FAT formatted USB drive using mkfs.ext4 /dev/sda1 as per the example).
If the partition containing your extroot isn't mounted during boot, but you can mount it without problems from a shell, you should try to increase config 'global' / option delay_root . On my system I had to set it to 15 seconds to get extroot working. Another hint to this being the culprit is having a working swap or other partitions mounted after booting, but not your extroot.
Another possibility to consider and try is to include in /etc/rc.local the commands: export PREINIT = 1 ; mount_root , as described in 14946 ticket, which in the case of running Chaos Calmer r44266 in the Comtrend AR-5387un, has been the only thing that allowed me to achieve extroot.
Yup been there, and I commend your adherence to the docs.... I even spent a few weeks in the procd etc. source.....
There have been changes over the last few releases....
There is another obscure tip about changing where is says mount for the root partition to say overlay or something like that.....
But for now....
Keep it simple.....
-Disable the other mounts ( 0 )....
-Manullly fsck and restart block mount or whatever the current command is to force a remount based on /etc/config/fstab
-Try changing the UUID.... to /dev/sdX ( make sure blkid is installed )
If it works on the live system.... then you can return to the fiddly bits above....
But the thing is to inspect / interrogate the OS until you find the cause....
-logread
-running daemons in foreground
-double check the drive FS on another PC ( including files present )
etc. etc. etc.
Lastly..... I have some drives that just don't work..... Given your this far down the path.... that's probably the first thing on the list to try ( another drive ).....
Problem solved. It was fixed after clean firmware reinstallation without saving settings. After that /overlay was mounted permanently, no any issues with automounting after reboot.