はじめに
現時点、RHELの最新バージョンは8.4です。状況によってはダウングレードしたい場合があると思います。今回はRHEL8.4から8.2にダウングレードする手順をまとめておきます。
環境
AWSのEC2インスタンスを使用しており、OSはRHEL8.4とします。
手順
OSのバージョンを確認します。RHEL8.4の確認ができました。
$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.4 (Ootpa)
$ uname -a
Linux ip-10-0-2-175.ap-northeast-1.compute.internal 4.18.0-305.el8.x86_64 #1 SMP Thu Apr 29 08:54:30 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux
カーネルの情報を確認します。
# dnf --showduplicates list kernel.x86_64
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Red Hat Update Infrastructure 3 Client Configuration Server 8 8.8 kB/s | 2.1 kB 00:00
Red Hat Enterprise Linux 8 for x86_64 - AppStream from RHUI (RPMs) 16 kB/s | 2.8 kB 00:00
Red Hat Enterprise Linux 8 for x86_64 - BaseOS from RHUI (RPMs) 13 kB/s | 2.4 kB 00:00
Installed Packages
kernel.x86_64 4.18.0-193.28.1.el8_2 @rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-305.el8 @anaconda
Available Packages
kernel.x86_64 4.18.0-80.el8 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-80.1.2.el8_0 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-80.4.2.el8_0 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-80.7.1.el8_0 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-80.7.2.el8_0 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-80.11.1.el8_0 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-80.11.2.el8_0 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-147.el8 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-147.0.2.el8_1 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-147.0.3.el8_1 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-147.3.1.el8_1 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-147.5.1.el8_1 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-147.8.1.el8_1 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-193.el8 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-193.1.2.el8_2 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-193.6.3.el8_2 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-193.13.2.el8_2 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-193.14.3.el8_2 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-193.19.1.el8_2 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-193.28.1.el8_2 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-240.el8 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-240.1.1.el8_3 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-240.8.1.el8_3 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-240.10.1.el8_3 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-240.15.1.el8_3 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-240.22.1.el8_3 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-305.el8 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-305.3.1.el8_4 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-305.7.1.el8_4 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-305.10.2.el8_4 rhel-8-baseos-rhui-rpms
kernel.x86_64 4.18.0-305.12.1.el8_4 rhel-8-baseos-rhui-rpms
RHEL8.2のカーネルをインストールします。
# dnf install -y kernel-4.18.0-193.28.1.el8_2
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:04:08 ago on Wed 01 Sep 2021 02:33:18 PM UTC.
Dependencies resolved.
=============================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================
Installing:
kernel x86_64 4.18.0-193.28.1.el8_2 rhel-8-baseos-rhui-rpms 2.8 M
Installing dependencies:
kernel-core x86_64 4.18.0-193.28.1.el8_2 rhel-8-baseos-rhui-rpms 28 M
kernel-modules x86_64 4.18.0-193.28.1.el8_2 rhel-8-baseos-rhui-rpms 24 M
linux-firmware noarch 20201218-102.git05789708.el8 rhel-8-baseos-rhui-rpms 123 M
Transaction Summary
=============================================================================================================================================================
Install 4 Packages
Total download size: 177 M
Installed size: 528 M
Downloading Packages:
(1/4): kernel-4.18.0-193.28.1.el8_2.x86_64.rpm 9.7 MB/s | 2.8 MB 00:00
(2/4): kernel-modules-4.18.0-193.28.1.el8_2.x86_64.rpm 30 MB/s | 24 MB 00:00
(3/4): kernel-core-4.18.0-193.28.1.el8_2.x86_64.rpm 27 MB/s | 28 MB 00:01
(4/4): linux-firmware-20201218-102.git05789708.el8.noarch.rpm 52 MB/s | 123 MB 00:02
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 66 MB/s | 177 MB 00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : linux-firmware-20201218-102.git05789708.el8.noarch 1/4
Installing : kernel-core-4.18.0-193.28.1.el8_2.x86_64 2/4
Running scriptlet: kernel-core-4.18.0-193.28.1.el8_2.x86_64 2/4
Installing : kernel-modules-4.18.0-193.28.1.el8_2.x86_64 3/4
Running scriptlet: kernel-modules-4.18.0-193.28.1.el8_2.x86_64 3/4
Installing : kernel-4.18.0-193.28.1.el8_2.x86_64 4/4
Running scriptlet: kernel-core-4.18.0-193.28.1.el8_2.x86_64 4/4
Running scriptlet: kernel-4.18.0-193.28.1.el8_2.x86_64 4/4
Verifying : kernel-core-4.18.0-193.28.1.el8_2.x86_64 1/4
Verifying : kernel-4.18.0-193.28.1.el8_2.x86_64 2/4
Verifying : kernel-modules-4.18.0-193.28.1.el8_2.x86_64 3/4
Verifying : linux-firmware-20201218-102.git05789708.el8.noarch 4/4
Installed products updated.
Installed:
kernel-4.18.0-193.28.1.el8_2.x86_64 kernel-core-4.18.0-193.28.1.el8_2.x86_64 kernel-modules-4.18.0-193.28.1.el8_2.x86_64
linux-firmware-20201218-102.git05789708.el8.noarch
Complete!
RHEL8.2にダウングレードします。
# dnf downgrade redhat-release-8.2-1.0.el8 -y
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:11:19 ago on Wed 01 Sep 2021 02:11:12 PM UTC.
Dependencies resolved.
=============================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================
Downgrading:
redhat-release x86_64 8.2-1.0.el8 rhel-8-baseos-rhui-rpms 40 k
Transaction Summary
=============================================================================================================================================================
Downgrade 1 Package
Total download size: 40 k
Downloading Packages:
redhat-release-8.2-1.0.el8.x86_64.rpm 279 kB/s | 40 kB 00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 129 kB/s | 40 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: redhat-release-8.2-1.0.el8.x86_64 1/1
Downgrading : redhat-release-8.2-1.0.el8.x86_64 1/2
Cleanup : redhat-release-8.4-0.6.el8.x86_64 2/2
Running scriptlet: redhat-release-8.4-0.6.el8.x86_64 2/2
Verifying : redhat-release-8.2-1.0.el8.x86_64 1/2
Verifying : redhat-release-8.4-0.6.el8.x86_64 2/2
Installed products updated.
Downgraded:
redhat-release-8.2-1.0.el8.x86_64
Complete!
再起動します。
OSのバージョンが「8.2」、カーネルのバージョンが「4.18.0-193.28.1.el8_2.x86_64」になっていることが確認できます。
# reboot
# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.2 (Ootpa)
# uname -a
Linux ip-10-0-2-175.ap-northeast-1.compute.internal 4.18.0-193.28.1.el8_2.x86_64 #1 SMP Fri Oct 16 13:38:49 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
コメント