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.
yes I can ssh into the router easily.
Do you have GNU
What's the output of
sysupgrade -l? (Just confirm that it's a long list of files)
root@LEDE:~# sysupgrade -l
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
root@LEDE:~# tar -v
BusyBox v1.28.4 () multi-call binary.
I'm assuming the keys are stored in '/etc/dropbear/authorized_keys' properly which is in that list.
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.
Thanks I'll try it!
Could you point me to something where I could read about the differences of external overlay vs external root?
I thought I was using overlay already, I had followed these instructions originally when setting it up.
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.
what am I backup up exactly with that backup?
settings that can be applied to the non-extroot router?
I've removed the extroot device and rebooted the router which fixed being unable to save settings in LuCI but lost many configuration settings too.
Is there a way to selectively bring back settings from that backup I took?
For more information about the command: https://openwrt.org/docs/techref/sysupgrade
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).