Raspberry Pi 4 | How to upgrade

I am currently running a Raspberry Pi 4 as my main home router.

OpenWrt 21.02.0-rc2 r16122-c2139eef27

I have purchased an additional Raspberry Pi 4 which I would like to use to upgrade without risking my existing router.

I think I might be using SquashFS, but I'm not sure. Is there an easy way to verify this?

What is the recommended method for upgrading?

  • Can I clone the existing microSD card and pop it into the new Raspberry Pi 4 to create an exact copy of my existing router?
  • If so, can I just download the relevant SysUpgrade file and use that to update the new router to the latest version of OpenWRT?
  • If that isn't possible, and I use the backup and restore function, do I need to install all the software packages before importing the backup file?
  • Does it matter if I am importing a backup file from a SquashFS version to an EXT version?
  • If it doesn't matter, which version is best for the Raspberry Pi 4?
  • What about configuration files that I may have manually edited using Nano (e.g. Wireguard)? Are they included in the backup file or do I need to try and find all those files manually (impossible, because I've not kept detailed notes)?


  • Yes
  • Yes
  • Yes
  • It shouldn't do
  • I use ext4, but I don't think it makes a huge difference
  • Config files should get picked up and included in the backup automatically

Make sure to check the network config for a hardcoded MAC address. I recommend plugging only one of the cloned Rpi4's into your LAN at a time until you confirm/fix this, otherwise you will have an ARP fight.

(I encountered this once when duping configs to a second, identical model access point. I didn't realise the hardware MAC address had been added to the /etc/config/network file, which lead to it being adopted by the new access point).

I use a smart switch with VLAN2 untagged to port 2 for the WAN, and port 1 trunked with VLAN2 tagged and VLAN1 untagged; ports 3 and on are left untagged on VLAN1 as defaults.
The 2nd rpi4 (or any single ethernet port router) connects to port1 of the smart switch.
Logging into the 2nd rp4, wan is added to the interfaces tab as eth0.2, with DHCP default.

I cloned my microsd card and successfully booted into OpenWrt. Everything was working fine with the new microsd card.

I then uploaded SysUpgrade 22.03.0-rc6.

The router has rebooted with the same config, but the storage is now showing 99% free. It appears to have wiped all the installed software packages as part of the upgrade.

  • TP link USB Gigabit ethernet is showing as 'network device is not present'
  • Wireguard interface is showing as Unsupported protocol type.
  • Adguard is not installed.

All my settings have been maintained, but not the drivers, software, etc.

Did I do something wrong?

Is there any way to recover this situation?

You need to use attended sysupgrade package to have your additional software preserved across sysupgrades.
Now the problem you are facing can be solved by directly downloading adguard or other packages, the config is already present so no need to setup again.
Also you can use the custom image builder to create an image with all the packages you need.

I am cloning the microsd card again.

What is 'attended sysupgrade package'?

It is a piece of software like adguard etc, what it does is like ota upgrades on mobile phones upgrades your openwrt with the benefit that it creates a custom image and then flashes it, so you retain all your packages post upgrade.

Thanks for that tip.

I installed 'attended sysupgrade' and it has now updated to OpenWrt 21.02.3 and kept all my settings/installed packages.

1 Like

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