May you elaborate that more? I have a 8MB flashchip and since I also mostly use minimal builds I've never tuched extroot (I even used to remove that feature completely while testing ultra-minimal builds).
I built a new image with a custom /etc/config/fstab that automatically mount as overlay the partition with owrt_overlay as label... and it works :3! Now I have a nice image that even at its first boot do not touch (or at least not so much) the flashchip for writing. Now to avoid even more stuffs I should copy things from /rom/ to /overlay/upper/...
To do it properly without overwriting stuffs that should not be overwritten, my idea is:
Get a list of all custom files I modified after the first boot
Files modified / created / automatically by OpenWRT are already inside /overlay/upper/ (and thus in the USB)
Open the sysupgrade image I built like an archive to get a full list of real/non-special/non-memory-backed files existing in the ROM
Merge the lists to get an files to exclude/include lists
Manually copy everything
Or there is a fancy (more intelligent) way to do it? Can I do something like dir / -R (print all directory and subdirs starting from /) but excluding special stuffs?
I'm dumb. looking at /rom/ (and coping from it) make much more sense u.u i should just copy form rom to upper overlay without overwriting already existing files
I ended up using cp -aRu /rom/* /overlay/upper/... it still works what you think? Are there better ways to do it?
Btw that + customized fstab built-in the image to autoload the overlay even at first boot, now my openwrt image runs 99% of the time from USB. Be careful guys if you follow my exemple, to properly reset your router you have to format (from a pc) the overlay partition BEFORE turning up your router (possibly in failsafe mode) to perform a firstboot command and reset your configuration.
I'm not a big fan of writing directly to the parts of the overlay system. Too much magic going on for me to trust that I've gotten the state properly updated. Mounting it as an overlay (over nothing) would probably be more robust. See Script: Mount "Alternate" NAND Firmware (Linksys +?) for one sketch of how to mount an overlay-intended file system and then apply it as an overlay (over an empty "lower", if you want "everything" copied). (I'm not sure you're writing to an overlay-intended file system. Reading from one that is not mounted as an overlay (and was cleanly unmounted) should be OK to extract the changes.)
"Better"? Probably something like building a kernel and system that runs natively off the USB file system. Worth the time on a TD-W8970? Personal decision.
I'd consider a separate modem and router. That way you can get the best in both for your budget, yet when one fails or becomes underpowered/obsolete, you can swap it out, and still have half your investment still running. At least in the US, the modem-router-wifi units are built as cheaply as possible for sale to the ISPs, where there really isn't any consumer choice. If your TD-W8970v1 is working as a modem, then maybe unloading everything but the modem function will help.
I have a TD-W8980 myself and I use some experimental patches, which have been tested thoroughly and they improved the wifi a lot and also the overall cpu performance and ethernet speed. I use it with a external hdd for torrents and samba mainly because Internet is routed from HH5A. Btw you can also try these patches and hopefully they can improve the performance of your router in general.
At first it was thought that your flash may be corrupted so for that I would choose the overlay option with slightly changing the overlay part. At boot router will need to mount the USB and then, unless restarted, everything runs from the USB. I just modified the copy command to include rom and overlay.
tar -C /rom -cvf - . | tar -C /mnt/upper -xf -
tar -C /overlay -cvf - . | tar -C /mnt -xf -
You just need to execute the above commands in order and then everything should be in USB and your router should work fine.
I just realized that I haven't tried LEDE in a while and never started doing the whole git bisect thing... I rebuilt an image with the same "verbose-as-fuck" i used for master builds and kept the weird network and USB-overlay configuration. The router is still running and I haven't got a crash in 15 hours... And I begin to see things in the crashlogs!
I see this (all lines were starting with <date> kern.warn kernel: [<timestamp>]):
Yes it is a lede image, but its the only thing that seems to not crash within 5hours xD If it was already fixed then they may backport it, or point me to its fix, I could try to backport it and try to tackle the next bug...
It doesnt look much mandatory to fix if router is still working for you. It could be just some variable over-flowing. If the build works then stay on it and dont think much about fixing stuff because you cant just backport the entire 18.06, that will be pointless. I'd suggest to just use it as is and maybe wait for 19.x builds.