Hello all,
I've successfully updated my main router ( Netgear WNDR3700 version 1) to 18.06.4, the only problem is I was using extroot on a USB drive to install extra packages from opkg.
Currently I'm stuck in a situation where trying to save any changes using luCI results in the following
I'm assuming this is because all the packages installed using opkg while on 17.04 are obsoleted. What's the best way to correct this situation? I'm okay with yanking the pendrive out and redoing extroot from scratch I'd just prefer not to lose all my wifi / host / ssh-key data if possible.
That's the lisf of files that the system will try to backup (and that we want to backup and restore after reformating the extroot). I don't see your SSH keys. What's the ouput of sysupgrade -l -o -u?
Do you have GNU tar installed?
Well, in that case:
Perform a backup: sysupgrade -b /tmp/backup.tar.gz. Grab the file with scp, remove your external root and let the device boot fresh.
Then, reformat the extroot and re-enable but this time try to use an external overlay instead of an external root. That way, you can easily perform an upgrade given that you have backup tar and you will not need to copy anything or reformat anything.
Once your device runs from a clean external overlay, go to LuCI in the Firmware section and upload your file to the "Restore settings" button.
Mainly the mount point. The external overlay is a feature used by OpenWrt for mounting a RW filesystem over the ROM which you install. This allows you changing where packages are installed and performing factory resets.
The rootfs is a kernel feature and it tells the kernel where is the root it should use to boot. It can be any "mountable" filesystem or an initamfs.
So, in the overlay there are actually two layers. The rootfs of the kernel will remain untouched but the kernel will merge both the rootfs and your overlay making them look like an unique filesystem.
Also: after restoring your settings from the backup, remember that it will override your fstab so you will likely end up with a device without external overlay upon reboot. To fix this, you will need to unpack the backup, delete the /etc/config/fstab file and repack the backup. LuCI only accepts .tar.gz and you will need to preserve all permisions.
--- Manually fixing the extroot will work but more reboots are requiered...
Yes, OpenWrt's upgrade process does not handle extroot very well. You should boot without the pen drive, upgrade and reconfigure, then start the extroot process again with an empty device. Of course, be free to keep any config files.
Also: for selectively restoring your settings you will have to unpack, modify and repack your backup. Of course, you'll need to do that in a Unix filesystem with either the root account or the fakeroot from Debian, because the tar contains very important permissions (i.e. dropbear/openssh will refuse to use keys without correct permissions).
I did not created that command, that's why I asked if you had GNU tar (not in the router, you can install it in macOS using Macports).