Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:installation:generic.sysupgrade [2023/01/17 12:49] – [Upgrading OpenWrt firmware using LuCI and CLI] vgaeteradocs:guide-user:installation:generic.sysupgrade [2023/01/18 10:38] – [Can you keep settings?] update link vgaetera
Line 7: Line 7:
     * [[docs:guide-user:installation:sysupgrade.packages|Saving/restoring user-installed packages]]     * [[docs:guide-user:installation:sysupgrade.packages|Saving/restoring user-installed packages]]
  
-==== How the OpenWrt upgrade works ====+===== How the OpenWrt upgrade works =====
 An OpenWrt **sysupgrade** will replace the entire current OpenWrt installation with a new version. An OpenWrt **sysupgrade** will replace the entire current OpenWrt installation with a new version.
 This includes the Linux kernel and SquashFS/ext4/ubifs/JFFS2/other OS partition/s. This is NOT the same as a first time installation (factory). This includes the Linux kernel and SquashFS/ext4/ubifs/JFFS2/other OS partition/s. This is NOT the same as a first time installation (factory).
Line 24: Line 24:
 For [[tag:dual_firmware|Dual Firmware Devices]] please consult your device page for additional information. For [[tag:dual_firmware|Dual Firmware Devices]] please consult your device page for additional information.
  
-----+By compiling your own custom image with an OpenWrt buildroot or generating with the imagebuilder, it is possible to remove the need to perform many of the steps above.
  
-=== Part Prepare ===+===== Upgrade steps ===== 
 +==== 1Prepare ====
 The first part of the upgrade process is to prepare for the upgrade. The first part of the upgrade process is to prepare for the upgrade.
   - Setup for data migration ( keep settings ) and additional sysupgrade.conf entries   - Setup for data migration ( keep settings ) and additional sysupgrade.conf entries
Line 36: Line 37:
 When it is possible to 'keep settings' sysupgrade will automatically preserve much of the OpenWrt OS configuration by saving and then restoring configuration files in specific common locations (including ''/etc/config''). This will preserve things like OpenWrt network settings, Wi-Fi settings, the device hostname, and so on. Some data files and directories for additional services will need to be configured manually. When it is possible to 'keep settings' sysupgrade will automatically preserve much of the OpenWrt OS configuration by saving and then restoring configuration files in specific common locations (including ''/etc/config''). This will preserve things like OpenWrt network settings, Wi-Fi settings, the device hostname, and so on. Some data files and directories for additional services will need to be configured manually.
  
----- +===2Upgrade ====
- +
-=== Part Upgrade ===+
 Next is the actual upgrade. The two common upgrade methods to perform the upgrade are: Next is the actual upgrade. The two common upgrade methods to perform the upgrade are:
   * LuCI web interface System -> Backup / Flash Firmware -> "Flash new firmware image"   * LuCI web interface System -> Backup / Flash Firmware -> "Flash new firmware image"
   * Command-line using ''sysupgrade'' command over console or ssh   * Command-line using ''sysupgrade'' command over console or ssh
  
-Both use the same '...sysupgrade.bin/img.gz' file (more below).+Both use the same ''...sysupgrade.bin/img.gz'' file (more below).
  
----- +===3Post Install Configuration, Setup or Restore ====
- +
-=== Part Post Install Configuration, Setup or Restore ===+
 After the OS upgrade, there are usually some additional configuration steps required to; After the OS upgrade, there are usually some additional configuration steps required to;
-  * re-install additional packages not part of the base OpenWrt install +  * Re-install additional packages not part of the base OpenWrt install 
-  * configure new OpenWrt functionality or to +  * Configure new OpenWrt functionality or to 
-  * update configuration files to reflect new settings or updated packages+  * Update configuration files to reflect new settings or updated packages
  
 Please see the section below with more details. Please see the section below with more details.
- 
----- 
- 
-NOTE: By compiling your own custom image with an OpenWrt buildroot or generating with the imagebuilder, it is possible to remove the need to perform many of the steps above. 
- 
----- 
  
 ===== Preparing for upgrade ===== ===== Preparing for upgrade =====
 ==== Can you keep settings? ==== ==== Can you keep settings? ====
 See also: See also:
-[[docs:guide-user:installation:generic.sysupgrade#upgrade_compatibility|Upgrade Compatibility]]+[[docs:guide-quick-start:admingui_sysupgrade_keepsettings#upgrade_compatibility|Upgrade Compatibility]]
  
 Most of the time you can, jumping several versions, downgrading, if the release notes or upgrade message informs you it's not possible, then you will need to plan ahead of time and factor in the time and information required to re-apply some or most of your previous configuration manually. Most of the time you can, jumping several versions, downgrading, if the release notes or upgrade message informs you it's not possible, then you will need to plan ahead of time and factor in the time and information required to re-apply some or most of your previous configuration manually.
Line 79: Line 70:
  
 ==== Configure your backup ==== ==== Configure your backup ====
-Follow: +{{section>docs:guide-user:installation:sysupgrade.cli#back_up_openwrt_configuration&noheader&nofooter&noeditbutton}}
-[[docs:guide-user:troubleshooting:backup_restore|Backup and restore]] +
- +
-Based on the list of [[docs:guide-user:installation:generic.sysupgrade#savingrestoring_user-installed_packages|user-installed packages]] customize your backup configuration to save the files not included in the default list. +
-Verify your backup configuration and ensure that all OpenWrt configurations and user data are going to be preserved.+
  
 ==== Downloading the OpenWrt upgrade image ==== ==== Downloading the OpenWrt upgrade image ====
Line 158: Line 145:
 ==== Upgrade installed packages ==== ==== Upgrade installed packages ====
 Follow: Follow:
-[[docs:guide-user:additional-software:opkg#upgrading_packages]]+[[docs:guide-user:additional-software:opkg#upgrading_packages|Upgrading packages]]
  
 After the initial update, it is good to check for any updated packages released after the base OS firmware image was built. After the initial update, it is good to check for any updated packages released after the base OS firmware image was built.
Line 164: Line 151:
  
 ==== Reinstall user-installed packages ==== ==== Reinstall user-installed packages ====
 +See also:
 +[[docs:guide-user:installation:sysupgrade.packages|Preserving packages]]
 +
 After a successful upgrade, you will need to reinstall all previously installed and saved packages. After a successful upgrade, you will need to reinstall all previously installed and saved packages.
-Package configuration files should have been preserved due to steps above, but not the actual packages themselves. 
-You can reinstall packages manually with [[docs:guide-user:additional-software:opkg|Opkg]], or follow the section [[docs:guide-user:installation:generic.sysupgrade#savingrestoring_user-installed_packages|Saving/restoring user-installed packages]] to automate the process. 
  
 ==== Configure user-installed packages ==== ==== Configure user-installed packages ====
 +See also:
 +[[docs:guide-user:installation:sysupgrade.cli#comparing_new_package_config_options|Comparing configurations]]
 +
 The new package installations will have installed new, default versions of package configuration files. The new package installations will have installed new, default versions of package configuration files.
 If existing configuration files are in place, opkg displays a warning about this and saves the new configuration file versions under ''/etc/config/*-opkg'' filenames. If existing configuration files are in place, opkg displays a warning about this and saves the new configuration file versions under ''/etc/config/*-opkg'' filenames.
Line 174: Line 165:
 The new package-provided config files should be compared with your older customized files to merge in any new options or changes of syntax. The new package-provided config files should be compared with your older customized files to merge in any new options or changes of syntax.
 The ''diff'' tool is helpful for this. The ''diff'' tool is helpful for this.
- 
-  * See [[docs:guide-user:installation:sysupgrade.cli#comparing_new_package_config_options|CLI - Comparing New Package Config Options]] 
- 
-===== Upgrade compatibility ===== 
-See: 
-[[docs:guide-quick-start:admingui_sysupgrade_keepsettings#upgrade_compatibility|Upgrade compatibility]] 
- 
-In some cases it is not possible to keep settings due to incompatibilities. 
- 
-==== Legacy: LuCI flash_keep section of /etc/config/luci ==== 
-LuCI has a separate set of settings for configuration files to be preserved, however it appears to be obsolete since OpenWrt 14.07 and should be ignored. 
- 
-<code bash> 
-uci show luci.flash_keep 
-</code> 
- 
-==== Device Low Memory Workarounds: /tmp is too small to hold the downloaded file ==== 
-  * See [[docs:guide-user:installation:sysupgrade.cli#low_memory_workaroundstmp_is_too_small_to_hold_the_downloaded_file|CLI - Low Memory Workarounds]] 
  
  • Last modified: 2024/10/19 20:05
  • by efahlgren