Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:installation:attended.sysupgrade [2022/08/13 01:12] – Initial page - lots of assumptions, needs LuCI images richb-hanoverdocs:guide-user:installation:attended.sysupgrade [2023/11/20 22:29] – Add explanations and examples of auc command line options efahlgren
Line 1: Line 1:
 ====== Upgrade using Attended Sysupgrade ====== ====== Upgrade using Attended Sysupgrade ======
  
-The Attended Sysupgrade (ASU) facility allows an OpenWrt device to request new firmware that replaces the current firmware, while preserving the packages and settings. +The Attended SysUpgrade (ASU) facility allows an OpenWrt device to update to 
-This dramatically simplifies the upgrade procedure to a couple clicks, plus one-to-three minute wait while a new image is built that contains exactly the same packages.+new firmware while preserving the packages and settings. 
 +This dramatically simplifies the upgrade process: just a couple clicks and 
 +short wait lets you retrieve and install a new image built with all your previous packages.
  
-ASU allows you to upgrade to released versionsrelease candidates, and the current nightly snapshot. +ASU eliminates the need to make a list of packages you installed manually
-ASU relies on significant updates over the last several years to the ImageBuilder.+or fuss with opkg just to upgrade your firmware.
  
-There is both LuCI (web page interface) and command-line package for Attended Sysupgrade.+Because it is initiated by person who waits until it's complete, 
 +it's called “attended” sysupgrade. 
 +You can see Attended Sysupgrade in action in a video from OneMarcFifty 
 +at: https://www.youtube.com/watch?v=FFTPA6GkJjg&t=1034s
  
 +There is both a LuCI (web page interface) and command-line package for Attended Sysupgrade.
 ===== From LuCI web page ===== ===== From LuCI web page =====
  
-The package [[https://github.com/openwrt/luci/tree/master/applications/luci-app-attendedsysupgrade|luci-app-attendedsysupgrade]] package offers simple tool in the router's web interface. It requests a new firmware image that includes the current set of packages, waits until it'built and flashes it. If "Keep Configuration" is checked in the GUI, the device upgrades to the new firmware without any need to re-enter any configuration or re-install any packages.+The [[packages:pkgdata:luci-app-attendedsysupgrade]] 
 +package provides page in the router's web interface. 
 +It requests a new firmware image built with the current set of packages, 
 +waits until it'ready, then downloads and flashes the image. 
 +If "Keep Configuration" is checked in the GUI, the device preserves all the settings.
  
-To install ''luci-app-attendedsysupgrade'', go to **System -> Software**, update the package list, and search for //luci-app-attendedsysupgrade// Install it in the usual manner. +To install ''luci-app-attendedsysupgrade'', go to **System -> Software**, 
 +update the package list, and search for //luci-app-attendedsysupgrade//
 +Install it in the usual manner. 
  
-To upgrade your firmware, go to **System -> Atttended Sysupgrade**. +To upgrade your firmware:
  
-  * Click **Search for sysupgrade** You will see choices for the firmware upgrades that are available. +  * **Make a backup!** Go to **System -> Backup/Flash firmware**. Click **Generate archive** //(Just do it. Every time...)// 
 +  * Go to **System -> Atttended Sysupgrade**. You'll see the main Attended Sysupgrade window 
 +  * Click **Search for sysupgrade** You will see choices for the firmware version that are available. 
   * Select the desired version from the dropdown, and click **Request Sysupgrade**   * Select the desired version from the dropdown, and click **Request Sysupgrade**
-  * There may be a wait while the firmware is built, including all the packages that you currently have installed. +  * There may be a wait as the server builds a custom image that includes all the packages that are currently installed. 
-  * You will see a window describing the new firmware: +  * When that completes, you will see a window describing the new firmware: 
      * If you wish to keep settings, check the box. Otherwise, settings will be erased and set to factory default.      * If you wish to keep settings, check the box. Otherwise, settings will be erased and set to factory default.
      * Click **Install Sysupgrade** and the router will download the new image, flash it, and reboot.      * Click **Install Sysupgrade** and the router will download the new image, flash it, and reboot.
-The default configuration is to use the server at [[https://sysupgrade.openwrt.org|https://sysupgrade.openwrt.org]]+     * You'll be running the new firmware, with all your packages and settings intact.
  
 +{{:media:doc:asu-main.png?400|  }} This is the main window. Click **Search for sysupgrade**
 +
 +{{:media:doc:asu-upgrade-choice.png?400|  }} Choose one of the available releases and click **Request Sysupgrade**
 +
 +{{:media:doc:asu-sysupgrade-ready.png?400|  }} Verify the parameters of the newly-generated image,\\
 +choose Keep Settings (or not) and click **Install Sysupgrade**
 ===== From the CLI ===== ===== From the CLI =====
  
-The [[https://github.com/openwrt/packages/tree/master/utils/auc|auc]] package performs the same process as the ''luci-app-attendedsysupgrade'' from SSH/the command line.+The [[packages:pkgdata:auc]] package performs 
 +the same process as the ''luci-app-attendedsysupgrade'' from SSH/the command line.
  
-To install the ''auc'' package, go to **System -> Software**, update the package list, and search for //auc// Install it in the usual manner. +To install the ''auc'' package, ssh into the router and enter ''opkg install auc'' or 
 +in the web intrface, go to **System -> Software**, update the package list, 
 +and search for //auc//Install it in the usual manner. 
  
-Enter ''auc'' on the command line.+To upgrade your device firmware, first **Make A Backup** //(see first step above)// 
 +Then enter ''auc'' on the command line.
 The default is to get the next version. The default is to get the next version.
 You can specify the following options on the command line. You can specify the following options on the command line.
Line 54: Line 78:
 </code> </code>
  
 +To use ''auc'' to check for new packages, or newer versions of the current branch, simply use the ''-c'' option.  This is completely benign, as ''auc'' terminates after reporting what it sees without doing anything further.  Using ''-c'' to experiment with the other options is a safe way to explore how ''auc'' works.
 +<code bash>
 +$ auc -c
 +auc/0.3.2-1
 +Server:    https://sysupgrade.openwrt.org
 +Running:   SNAPSHOT r24414-255d5c9bf8 on x86/64 (generic)
 +Available: SNAPSHOT r24414-255d5c9bf8
 +Requesting package lists...
 + base-files: 1548-r24414-255d5c9bf8 -> 1549-r24427-c4fe1bfc65
 + dnsmasq-full: 2.89-6 -> 2.89-7
 +</code>
 +
 +By default, ''auc'' works on the branch currently installed on your device.  The ''-b'' option can be used to change this behavior, so that you can upgrade or downgrade between release branches (like ''19.07'' or ''23.05'') or snapshot (where you just literally use ''snapshot'' as the value).  The ''-B'' option can be used to select a specific version within a branch, such as ''22.03.1'' or ''23.05.0''.
 +
 +This example detects that 23.05.2 is installed, and shows information related to downgrading to 22.03.4.
 +As indicated by the warning, this is probably not a good idea as the jump in versions is "too far", but you *can* use ''-B'' to downgrade within a branch pretty safely.
 +<code bash>
 +$ auc -c -b 22.03 -B 22.03.4
 +auc/0.3.2-1
 +Server:    https://sysupgrade.openwrt.org
 +Running:   23.05.2 r23630-842932a63d on x86/64 (generic)
 +Available: 22.03.4 r20123-38ccc47687
 +WARNING: Downgrade to older branch may not work as expected!
 +Requesting package lists...
 + kmod-usb-storage: 5.15.137-1 -> 5.10.176-1
 + terminfo: 6.4-2 -> 6.3-2
 + openssh-sftp-server: 9.5p1-1 -> 9.3p2-1
 + libopenssl: 3.0.12-1 -> 1.1.1w-1
 + luci-app-statistics: git-23.315.63824-5a81162 -> git-23.153.53801-38f5b55
 +...
 +</code>
 +
 +===== ASU Server =====
 +
 +The ASU Server listens for image requests and, if valid, automatically generates them.
 +It coordinates several OpenWrt ImageBuilders and caches the resulting images in a Redis database.
 +If an image is cached, the server can provide it immediately without rebuilding.
 +
 +The ASU Server provides an API to request custom firmware images with
 +any selection of packages pre-installed.
 +This avoids the need to set up a build environment, and makes it possible
 +to create a custom firmware image even using a mobile device.
 +
 +  * The current production ASU Server is ''sysupgrade.openwrt.org'' It provides released versions, release candidates, and the current nightly snapshot.
 +  * There is an development server at ''asu.aparcar.org'' that may or may not always be running
 +  * <del>chef.libremesh.org</del> is an old server name that currently is a CNAME to asu.aparcar.org
 +  * The [[https://firmware-selector.openwrt.org/|OpenWrt Firmware Selector]] is a client of the ASU server, as are the LuCI web page and ''auc''.
 +
 +ASU relies on significant updates over the last several years to the ImageBuilder, primarily by @aparcar.
 +[[https://github.com/openwrt/asu|Github repo]]
  • Last modified: 2024/07/02 16:09
  • by efahlgren