RHEL9.3 安装特定 Kernel 版本

RHEL9.3 使用注册后的官方 Yum 源获取到的 Kernel 版本为目前可用的最新版本:

1
2
3
4
5
[root@rhel-0 ~]# yum list available kernel
Updating Subscription Management repositories.
Last metadata expiration check: 0:00:11 ago on Tue 25 Nov 2025 10:04:39 AM CST.
Available Packages
kernel.x86_64 5.14.0-611.9.1.el9_7 rhel-9-for-x86_64-baseos-rpms

如果需要安装特定版本,可以通过如下方式。

确认目前版本:

1
2
[root@rhel-0 ~]# uname -r
5.14.0-362.8.1.el9_3.x86_64

此处要升级到 5.14.0-362.24.1.el9_3.x86_64 版本。

在 RedHat 官网下载特定版本 RPM 包,官网地址:https://access.redhat.com/downloads/content/package-browser

所需 RPM 包:

  • kernel-5.14.0-362.24.1.el9_3.x86_64.rpm
  • kernel-core-5.14.0-362.24.1.el9_3.x86_64.rpm
  • kernel-modules-5.14.0-362.24.1.el9_3.x86_64.rpm
  • kernel-modules-core-5.14.0-362.24.1.el9_3.x86_64.rpm

安装 RPM 包:

1
2
3
4
5
6
7
8
9
[root@rhel-0 ~]# rpm -ivh *.rpm
warning: kernel-5.14.0-362.24.1.el9_3.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:kernel-modules-core-5.14.0-362.24################################# [ 25%]
2:kernel-core-5.14.0-362.24.1.el9_3################################# [ 50%]
3:kernel-modules-5.14.0-362.24.1.el################################# [ 75%]
4:kernel-5.14.0-362.24.1.el9_3 ################################# [100%]

安装后,确认是否存在对应版本的内核文件:

1
2
3
4
[root@rhel-0 ~]# ls -lh /boot | grep vmlinuz
-rwxr-xr-x. 1 root root 13M Nov 25 09:37 vmlinuz-0-rescue-13bacdb3b6274c03a8128fbc0761ba69
-rwxr-xr-x 1 root root 13M Feb 15 2024 vmlinuz-5.14.0-362.24.1.el9_3.x86_64
-rwxr-xr-x. 1 root root 13M Oct 4 2023 vmlinuz-5.14.0-362.8.1.el9_3.x86_64

设置默认内核:

1
2
[root@rhel-0 ~]# grubby --set-default=/boot/vmlinuz-5.14.0-362.24.1.el9_3.x86_64
The default is /boot/loader/entries/13bacdb3b6274c03a8128fbc0761ba69-5.14.0-362.24.1.el9_3.x86_64.conf with index 0 and kernel /boot/vmlinuz-5.14.0-362.24.1.el9_3.x86_64

重启节点,可以看到默认内核为如上设置的版本:

1
2
[root@rhel-0 ~]# uname -r
5.14.0-362.24.1.el9_3.x86_64
Author

Warner Chen

Posted on

2025-11-25

Updated on

2025-11-25

Licensed under

You need to set install_url to use ShareThis. Please set it in _config.yml.
You forgot to set the business or currency_code for Paypal. Please set it in _config.yml.

Comments

You forgot to set the shortname for Disqus. Please set it in _config.yml.