openEuler 22.03 LTS Upgrade and Downgrade Guide
This document describes how to upgrade openEuler 22.03 LTS to openEuler 22.03 LTS SP1. The operations for other versions are similar.
1. OS Installation
Obtain an openEuler 22.03 LTS SP1 image and install the OS by referring to the installation guide.
View the versions of openEuler and the kernel in the current environment.
cat /etc/openEuler-latest
2. Compatibility Upgrade
2.1 Adding the openEuler 22.03 LTS SP3 Repositories (openEuler-22.03-LTS-SP3.repo)
vi /etc/yum.repos.d/openEuler-22.03-LTS-SP3.repo
Add information about the following openEuler 22.03 LTS SP3 repositories and save and exit.
[SP3_OS]
name=SP3_OS
baseurl=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/OS/$basearch/
metalink=https://mirrors.openeuler.org/metalink?repo=$releasever/OS&arch=$basearch
metadata_expire=1h
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/OS/$basearch/RPM-GPG-KEY-openEuler
[SP3_everything]
name=SP3_everything
baseurl=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/everything/$basearch/
metalink=https://mirrors.openeuler.org/metalink?repo=$releasever/everything&arch=$basearch
metadata_expire=1h
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/everything/$basearch/RPM-GPG-KEY-openEuler
[SP3_EPOL]
name=EPOL
baseurl=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/EPOL/main/$basearch/
metalink=https://mirrors.openeuler.org/metalink?repo=$releasever/EPOL/main&arch=$basearch
metadata_expire=1h
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/OS/$basearch/RPM-GPG-KEY-openEuler
[SP3_debuginfo]
name=debuginfo
baseurl=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/debuginfo/$basearch/
metalink=https://mirrors.openeuler.org/metalink?repo=$releasever/debuginfo&arch=$basearch
metadata_expire=1h
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/debuginfo/$basearch/RPM-GPG-KEY-openEuler
[SP3_source]
name=source
baseurl=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/source/
metalink=https://mirrors.openeuler.org/metalink?repo=$releasever&arch=source
metadata_expire=1h
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/source/RPM-GPG-KEY-openEuler
[SP3_update]
name=SP3_update
baseurl=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/update/$basearch/
metalink=https://mirrors.openeuler.org/metalink?repo=$releasever/update&arch=$basearch
metadata_expire=1h
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/OS/$basearch/RPM-GPG-KEY-openEuler
[SP3_update-source]
name=SP3_update-source
baseurl=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/update/source/
metalink=https://mirrors.openeuler.org/metalink?repo=$releasever/update&arch=source
metadata_expire=1h
enabled=1
gpgcheck=1
gpgkey=http://repo.openeuler.org/openEuler-22.03-LTS-SP3/source/RPM-GPG-KEY-openEuler
2.2 Performing the Upgrade
dnf update | tee update_log
Note:
- If an error is reported during the upgrade, run
dnf update --skip-broken -x conflict_pkg1 |tee update_log
to avoid the problem. If multiple packages conflict, use the-x conflict_pkg1 -x conflict_pkg2 -x conflict_pkg3
options to skip the packages and analyze, validate, and update the conflicted packages after the upgrade. - Options:
--allowerasing
: Allow erasing of installed packages to resolve dependencies.--skip-broken
: Resolve dependency problems by skipping packages.-x
: Used with--skip-broken
to specify the packages to be skipped.
2.3 Rebooting the OS
reboot
3. Upgrade Verification
View the versions of openEuler and the kernel in the current environment.
cat /etc/openEuler-latest
4. Compatibility Downgrade
4.1 Performing the Downgrade
dnf downgrade | tee downgrade_log
4.2 Rebooting the OS
reboot
5. Downgrade Verification
View the versions of openEuler and the kernel in the current environment.
cat /etc/openEuler-latest