OpenWrt Upgrade: Keep packages and settings | the easy way


Routers that are permanently connected to the Internet should be regularly updated with new software versions. Besides closed security holes, the update brings new features and fixes bugs. Upgrading an OpenWrt router is not a lot of work, but it can be made much easier with the "Attended Sysupgrade". Originally, I upgraded new OpenWrt versions using a previously downloaded sysupgrade image. Since the default image only contains certain software packages, additional packages have to be reactivated after an upgrade. A possible solution to this is provided by the firmware selector, which can be used to integrate software packages into a customized image. Customized images also use the "Attended Sysupgrade" package to install the upgrade with all packages via wizard. First, however, a backup of the configuration should be created before each upgrade to be able to restore the settings in case of an emergency.

Before the upgrade: Create a backup

The upgrade process with a sysupgrade.bin file

Devices that already use OpenWrt can exchange their firmware for a newer version via the menu "Backup / Flash Firmware" with a sysupgrade image. New versions for the respective devices can be downloaded from the OpenWrt page: Table of Hardware: Firmware downloads.

The problem with the firmware downloads: the activated packages get lost

If you install a new version using images from the "Table of Hardware: Firmware downloads" page, you will also lose activated software packages. Even though the software packages can be reactivated via the menu afterwards, this procedure is not really comfortable. To make the upgrade process a bit easier I wrote down the names of all packages and reinstalled them via a command line in the terminal, see: OpenWRT - my setup. An alternative is the Firmwareselector. When using the Firmwareselector, a custom download with additional software packages can be requested, making them available again after the upgrade:

The Firmwareselector

Using the firmware selector, specific packages can be added and installed as part of a customized image along with the firmware:

Firmwareselector: firmware-selector

The upgrade is done with a sysupgrade.bin file via the menu item: "Flash new firmware image":

The package "Attended Sysupgrade" offers an even simpler variant which initiates the build process comfortably via the web interface:

Upgrade - Attended Sysupgrade

The software package "luci-app-attendedsysupgrade" provides a wizard for upgrading the firmware. Attended Sysupgrade combines the capabilities of the firmware selector and compiles a sysupgrade file based on the installed packages and downloads it independently. The whole process can be initiated comfortably via the wizard directly from the OpenWrt gui. In the background the Attended Sysupgrade takes care of creating, downloading and installing the upgrade with all previously installed packages and with all settings.

The luci-app-attendedsysupgrade package can be easily installed from the software menu:

Advanced Mode is used to display additional images and also to disable certain packages during the upgrade :

Attended Sysupgrade searches for new firmware versions and can request and install them, including all settings and software packages.


Error building the firmware image

If a certain package is not compatible with the new version, the details of the error are displayed:

Server response: Error: Impossible package selection

In my case the package bandwithd-sqlite caused a conflict:

Collected errors:
 * check_conflicts_for: The following packages conflict with libgd-full:
 * check_conflicts_for: 	libgd * 
 * opkg_install_cmd: Cannot install package bandwidthd-sqlite.
make[2]: *** [Makefile:169: package_install] Error 255
make[1]: *** [Makefile:134: _call_manifest] Error 2
make: *** [Makefile:253: manifest] Error 2

After removing the package, I was able to upgrade the firmware without any problems.

Little flash memory: consolidate memory space

If a software package is removed, OpenWrt can no longer free its memory space, and later installed packages require additional Disk-space. To ensure that a device uses as little diskspace as possible, software packages should be selected directly in the image. If you have changed something in the packages and then install a new image via Firmware selector or Attended Sysupgrade, you consolidate the installed packages in the flash memory: The router then requires less disk space after an upgrade.

Upgrade from 22.03.5 to 23.05.0

When upgrading to version 23.05.0, I had to replace the luci-ssl package:

cannot install luci-ssl

Collected errors:
 * check_data_file_clashes: Package libustream-mbedtls20201210 wants to install file /home/aparcar/asu/worker1/cache/23.05.0-rc3/ramips/mt7620/build_dir/target-mipsel_24kc_musl/root-ramips/lib/
	But that file is already provided by package  * libustream-wolfssl20201210
 * opkg_install_cmd: Cannot install package luci-ssl.

added package: libmbedtls12 and libustream-mbedtls

and removed luci-ssl:

Too little memory: Troubleshooting

If the web interface no longer works after an upgrade, the device may still be accessible via SSH, e.g. via Putty or the Windows terminal. (ssh root@IPAddress). The GUI can then be installed in the terminal with the following command:

opkg update
opkg install luci

When upgrading an RE650 v2, I had the problem that there was not enough memory available in the "/overlay" path to install the GUI.

I was able to solve the problem by downloading the sysupgrade file via terminal to /tmp:

cd /tmp

and installing it with the sysupgrade command:

sysupgrade /tmp/openwrt-??-squashfs-sysupgrade.bin

The selection of the required packages can be compiled beforehand using the firmware selector and an image created from this. As an example, the package wpad-basic-mbedtls can be replaced with wpad for use as an access point and additional packages can be added without filling the storage disk space unnecessarily.

Instead of wpad-basic-mbedtls, I use wpad and the following packages for access points:

.... wpad usteer luci-app-usteer luci-app-attendedsysupgrade

Via firmware request, the upgrade package is compiled:

Via the Sysupgrade URL: Right click on Sysupgrade and "Copy address of link" the download link can be copied:

The link can then be used on the OpenWrt device for the upgrade:

cd /tmp

Alternatively, the sysupgrade file can also be copied to /tmp via winscp.

The TP-Link RE650 v2 has only 768KiB disk space, but I was able to add the complete wpad package, usteer and luci-attendedsysupgrade via the Attendedsysupgrade. The storage space required for this is only 268 KiB, although wpad would require 695 KiB if installed via System / Software:

Once fixed, future updates should hopefully work via the web interface and Attended Sysupgrade.


The Attended Sysupgrade software package greatly simplifies the upgrade process and is therefore a must-have for all OpenWrt device owners.


positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Questions / Comments

By continuing to browse the site, you agree to our use of cookies. More Details