Little problem after sysupgrade from 18.06.5 to 23.05.2

Startingwith

TP-Link Archer C7 v5
OpenWrt 18.06.5, r7897-9d401013fc
root@C7v5-K:/tmp# sha256sum openwrt-23.05.2-ath79-generic-tplink_archer-c7-v5-sq
uashfs-sysupgrade.bin 
c89cf5d3141cb96a50fcafdf05e2b71a7a0a221b41d0b5fcd1376413f6d54082  openwrt-23.05.2-ath79-generic-tplink_archer-c7-v5-squashfs-sysupgrade.bin
root@C7v5-K:/tmp# free
             total       used       free     shared    buffers     cached
Mem:        125248      28952      96296       6348       2460      12704
-/+ buffers/cache:      13788     111460
Swap:            0          0          0
root@C7v5-K:/tmp# sysupgrade -v /tmp/openwrt-23.05.2-ath79-generic-tplink_archer
-c7-v5-squashfs-sysupgrade.bin 
Saving config files...
etc/config/dhcp
etc/config/dropbear
etc/config/firewall
etc/config/luci
etc/config/network
etc/config/rpcd
etc/config/system
etc/config/ubootenv
etc/config/ucitrack
etc/config/uhttpd
etc/config/wifi_schedule
etc/config/wireless
etc/dropbear/authorized_keys
etc/dropbear/dropbear_rsa_host_key
etc/group
etc/hosts
etc/inittab
etc/luci-uploads/.placeholder
etc/opkg/keys/1035ac73cc4e59e3
etc/opkg/keys/5151f69420c3f508
etc/opkg/keys/72a57f2191b211e0
etc/opkg/keys/792d9d9b39f180dc
etc/opkg/keys/9ef4694208102c43
etc/opkg/keys/b26f36ae0f4106d
etc/opkg/keys/b5043e70f9a75cde
etc/opkg/keys/c10b9afab19ee428
etc/opkg/keys/dace9d4df16896bf
etc/opkg/keys/dd6de0d06bbd3d85
etc/passwd
etc/profile
etc/rc.local
etc/shadow
etc/shells
etc/sysctl.conf
Commencing upgrade. Closing all shell sessions.
Connection to 192.168.178.58 closed by remote host.
Connection to 192.168.178.58 closed.

So everything looks fine.

Now:
OpenWrt 23.05.2 r23630-842932a63d / LuCI openwrt-23.05 branch git-23.306.39416-c86c256

But I lost id_rsa.pub from my pc, which I entered a few minutes before flashing and which worked with OpenWrt 18.06.5.

I used:
ssh -oHostKeyAlgorithms=+ssh-rsa root@192.168.178.58

This is not a big problem to add the key again, and it works again, but I wonder.

Of course now "-oHostKeyAlgorithms=+ssh-rsa" is not necessary anymore.

Did I loose the key because of security reasons? Other old and shorter keys exist.

Please note, the router is a "playground".

You should reset to defaults and configure from scratch. Three reasons for this:

  1. that upgrade path with preserving settings is not supported or tested and may have unexpected results. Upgrades with configs preserved is only tested and supported for 22.03 > 23.05

  2. the upgrade would have involved a target transition from ar71xx to ath79. This is largely considered incompatible and a reset is officially required.

  3. there have been several syntax changes that are material to the config files. If your old files are used, things may go wrong (similar to point 1 above).

2 Likes

Thanks, I feared this, but I got no warning as in Can I avoid new configuration partially - Config cannot be migrated from swconfig to DSA

I recommend to issue a warning when flashing. Especially since everything works with this wireless bridge, which I use.

As mentioned, this router is a playground. I have other ones for testing and I made a mistake and thought to flash via ethernet cable, but flashed the same model via wifi, worked.

Which way would you recommend doing this?

This is a function of the sysupgrade binary as it exists in the previous install. So 18.06, for example, isn’t aware of the fact that its configs are not compatible with 23.05. There’s no way for it to know, nor is there any way for it to be updated to look for that condition because it has been EOL for so long.

Go to the LuCI sysupgrade page and click the reset to defaults button. Or, use the CLI via an ssh session:

firstboot -y && reboot
3 Likes

RSA keys are deprecated both as host keys and login key pairs. The new version will use EC keys.

2 Likes

I feared that there are problems, no idea why I see the access point now 2 times, but generally it works.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.