Upgrading and keeping settings

I'm in the process of upgrading my WRT1900ACSv2 from version 19.07 to the new 21.02.

As I read the upgrade instructions via LuCI I noticed:

Untick Keep Settings, then select Flash Image

  • Is this mandatory for version upgrade?
  • Will all setting be lost upon upgrading?
  • Is there a way to keep settings thru the upgrade?

The part I am most keen on keeping is the firewall rules. I hope someone here have the insights needed.


1 Like

Best practice is to not keep settings across major upgrades (minor/service upgrades are fine). That means unchecking the box, and this will result in a completely default configuration (i.e. all of your settings erased). Most users can re-create their settings fairly easily, although it is admittedly a bit of extra work.

Some files may cause major issues if things have changed between the versions, and others may be perfectly compatible. For example, the /etc/config/network file is no longer directly compatible, although there is code in 21.02 that can often adjust the file to the new syntax as long as your device is not in the DSA category. The /etc/config/firewall file should be fine from 19.07 > 21.02.

Make a backup before you do any upgrades. If you want to attempt to upgrade with settings in place, you can usually do this (provided you are not using a DSA device), but you could experience issues, so be ready for that. However, you can use your backup as a reference for how things were previously configured, and you can also manually restore certain files like the firewall.

Specifically with mvebu devices like WRT1900ACSv2, the incompatible part is the network config and the related LED config. So, /etc/config/network and /etc/config/system are poison due to the switch config DSA change.

Quick and dirty solution: You can keep the other config files, if you delete those two.


Thank you for your input!

  • Looking at the backup files do you now if wirless, dhcp, collectd etc are compatible (or if there is a table I can look up)? partly answered by hnyman while writing this

  • What is the best practice of restoring these files?
    in LuCI including network and system files?
    in LuCI without those files?
    or manually in terminal?

If you decide to go the “quick and dirty solution”, just remove
/etc/network and /etc/system entries from your backup and then use System / Backup/Flash Firmware in the GUI and restore your backup from 19.07.

Worst case scenario? Just boot back to your 19.07 partition and reflash 21.02 and try again.

Okey, here goes!

When doing the firmware upgrade in LuCI I get this error message:

Device linksys,shelby not supported by this image Supported devices: linksys,wrt1900acs armada-385-linksys-shelby linksys,shelby - Image version mismatch: image 1.1, device 1.0. Please wipe config during upgrade (force required) or reinstall. Reason: Config cannot be migrated from swconfig to DSA Image check failed.

The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform.

Is this safe to force upgrade provided that I untick the "Keep settings" checkbox? I have confirmed that the checksum matches.

Yes. To generalize: as long as you have downloaded the correct image and the checksum matches, it should always be safe to upgrade your device with "keep settings" unchecked. This is, of course, barring any bugs with the images themselves, but that is a relatively rare situation. The upgrade will set your device back to a completely default configuration -- this means that wifi will be disabled, too, so be sure to have an ethernet connected machine available so you can access the device post-upgrade.

Did the firmware upgrade, worked perfectly.
When restoring the config files via the LuCI I removed system and network files.

After the router rebooted I can not get into the we interface any more

/usr/lib/lua/luci/dispatcher.lua:427: /etc/config/luci seems to be corrupt, unable to find section 'main'

And ssh access is also not working.
What happened here and how can I reset the config?