OpenWrt Upgrade: Keep packages and settings | the easy way

 

Especially 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 reinstalling it requires additional memory. To ensure that a device uses as little memory 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 memory 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/libustream-ssl.so
	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:

Conclusion

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