- Print
- PDF
Rocky Linux 8
- Print
- PDF
Available in VPC
This guide describes how to update a kernel on the Rocky Linux 8 server of NAVER Cloud Platform.
This guide is written based on new servers created on NAVER Cloud Platform, so there might be differences from the user server environment. User server environments may be affected by kernel updates and server restarts due to various reasons such as security hardening operations and various setting operations. Therefore, check the following before you perform a kernel update.
- Create a replicated server using Server image before updating a kernel of the actual server. Perform the kernel update on the replicated server and check if it restarts normally. When switching to operational status after restarting, check for any issues in the server. Proceed with the server kernel update only when no issues were found after through validation.
- In the case of GPU servers, the GPU driver that matches the kernel version must be installed for normal operation. If the updated kernel isn't compatible with GPU drivers, the GPU server might not function normally. Therefore, check GPU driver compatibility before you perform kernel updates. For related information, see GPU driver guide.
- NCP Repo is a repository provided by NAVER Cloud Platform to support user environments where external access is limited, such as VPC private subnet. NCP Repo may not provide the latest package.
NAVER Cloud Platform has not tested all kernel versions after each update. As of January 1, 2024, the kernel version tested on Rocky Linux 8 is 4.18.0-513.5.1.el8_9.x86_64.
- The user is entirely responsible for performing user's server kernel updates. NAVER Cloud Platform does not take responsibility for issues caused by kernel updates.
- Normal server usage might be unavailable during kernel updates and restart, and recovery due to this is not supported. In addition, server recovery is not supported when the kernel update fails.
- Before updating the kernel, be sure to keep the backup created through Server image until it is no longer needed.
- No separate support is provided for problems related to this guide.
Update kernel
To update kernels for the Rocky Linux 8.6 and 8.8 servers, follow these steps:
Connect to the server you want to apply the kernel update to remotely.
Check the kernel version of the server.
- Rocky Linux 8.6
[root@rockylinux86 ~]# uname -r 4.18.0-372.32.1.el8_6.x86_64
- Rocky Linux 8.8
[root@rockylinux88 ~]# uname -r 4.18.0-477.13.1.el8_8.x86_64
Check the repository information connected to the server.
[root@rockylinux88 ~]# grep ^baseurl /etc/yum.repos.d/Rocky* /etc/yum.repos.d/Rocky-AppStream.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/AppStream/$basearch/os/ /etc/yum.repos.d/Rocky-BaseOS.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/BaseOS/$basearch/os/
Check the kernel version provided by the repository.
[root@rockylinux88 ~]# rm -rf /var/cache/dnf/* [root@rockylinux88 ~]# yum --releasever=8.9 list kernel-4.18.0-513.5.1.el8_9 Available Packages kernel.x86_64 4.18.0-513.5.1.el8_9 baseos
NoteIf you do not use
--releasever=8.9
as the yum command option, you might not be able to view the latest 8.9 kernel. In this case, see Change yum command settings on Rocky Linux 8 server to change the yum command settings.Install the latest version of the kernel.
Carefully review the list of packages being newly installed, updated, or removed. If everything is in order, entery
to complete the installation.- Rocky Linux 8.6
[root@rockylinux86 ~]# yum --releasever=8.9 install kernel-4.18.0-513.5.1.el8_9 Dependencies resolved. ============================================================================================================================================================================ Package Architecture Version Repository Size ============================================================================================================================================================================ Installing: kernel x86_64 4.18.0-513.5.1.el8_9 baseos 10 M kernel-core x86_64 4.18.0-513.5.1.el8_9 baseos 43 M kernel-modules x86_64 4.18.0-513.5.1.el8_9 baseos 35 M Transaction Summary ============================================================================================================================================================================ Install 3 Packages Total download size: 88 M Installed size: 96 M Is this ok [y/N]: y ... Omitted... Installed: kernel-4.18.0-513.5.1.el8_9.x86_64 kernel-core-4.18.0-513.5.1.el8_9.x86_64 kernel-modules-4.18.0-513.5.1.el8_9.x86_64 Complete!
- Rocky Linux 8.8
[root@rockylinux88 ~]# yum --releasever=8.9 install kernel-4.18.0-513.5.1.el8_9 Dependencies resolved. ============================================================================================================================================================================ Package Architecture Version Repository Size ============================================================================================================================================================================ Installing: kernel x86_64 4.18.0-513.5.1.el8_9 baseos 10 M kernel-core x86_64 4.18.0-513.5.1.el8_9 baseos 43 M kernel-modules x86_64 4.18.0-513.5.1.el8_9 baseos 35 M Transaction Summary ============================================================================================================================================================================ Install 3 Packages Total download size: 88 M Installed size: 96 M Is this ok [y/N]: y ... Omitted... Installed: kernel-4.18.0-513.5.1.el8_9.x86_64 kernel-core-4.18.0-513.5.1.el8_9.x86_64 kernel-modules-4.18.0-513.5.1.el8_9.x86_64 Complete!
After the installation is complete, check the bootable kernel version and the default boot kernel version.
- Rocky Linux 8.6
[root@rockylinux86 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2 Rocky Linux (4.18.0-372.32.1.el8_6.x86_64) 8.6 (Green Obsidian) Rocky Linux (4.18.0-372.9.1.el8.x86_64) 8.6 (Green Obsidian) Rocky Linux (0-rescue-50f85e7b58fc48c8a91ae8a9a60ee028) 8.6 (Green Obsidian) [root@rockylinux86 ~]# grub2-editenv list saved_entry=50f85e7b58fc48c8a91ae8a9a60ee028-4.18.0-513.5.1.el8_9.x86_64 boot_success=0
- Rocky Linux 8.8
[root@rockylinux88 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2 Rocky Linux (4.18.0-477.13.1.el8_8.x86_64) 8.8 (Green Obsidian) Rocky Linux (4.18.0-477.10.1.el8_8.x86_64) 8.8 (Green Obsidian) Rocky Linux (0-rescue-a4746ff35a7a4d2a9f4280ec20051fb6) 8.8 (Green Obsidian) [root@rockylinux88 ~]# grub2-editenv list saved_entry=a4746ff35a7a4d2a9f4280ec20051fb6-4.18.0-513.5.1.el8_9.x86_64 boot_success=0
Because the latest kernel version was not applied to the grub.cfg file, make additional edits.
- Rocky Linux 8.6
[root@rockylinux86 ~]# ls -ld /etc/grub2* lrwxrwxrwx. 1 root root 22 May 10 2022 /etc/grub2.cfg -> ../boot/grub2/grub.cfg [root@rockylinux86 ~]# grub2-mkconfig -o /etc/grub2.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64 Found initrd image: /boot/initramfs-4.18.0-513.5.1.el8_9.x86_64.img Found linux image: /boot/vmlinuz-4.18.0-372.32.1.el8_6.x86_64 Found initrd image: /boot/initramfs-4.18.0-372.32.1.el8_6.x86_64.img Found linux image: /boot/vmlinuz-4.18.0-372.9.1.el8.x86_64 Found initrd image: /boot/initramfs-4.18.0-372.9.1.el8.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-50f85e7b58fc48c8a91ae8a9a60ee028 Found initrd image: /boot/initramfs-0-rescue-50f85e7b58fc48c8a91ae8a9a60ee028.img done [root@rockylinux86 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2 Rocky Linux (4.18.0-513.5.1.el8_9.x86_64) 8.6 (Green Obsidian) Rocky Linux (4.18.0-372.32.1.el8_6.x86_64) 8.6 (Green Obsidian) Rocky Linux (4.18.0-372.9.1.el8.x86_64) 8.6 (Green Obsidian) Rocky Linux (0-rescue-50f85e7b58fc48c8a91ae8a9a60ee028) 8.6 (Green Obsidian) [root@rockylinux86 ~]# grub2-editenv list saved_entry=50f85e7b58fc48c8a91ae8a9a60ee028-4.18.0-513.5.1.el8_9.x86_64 boot_success=0
- Rocky Linux 8.8
[root@rockylinux88 ~]# ls -ld /etc/grub2* lrwxrwxrwx. 1 root root 22 Apr 29 2023 /etc/grub2.cfg -> ../boot/grub2/grub.cfg [root@rockylinux88 ~]# grub2-mkconfig -o /etc/grub2.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64 Found initrd image: /boot/initramfs-4.18.0-513.5.1.el8_9.x86_64.img Found linux image: /boot/vmlinuz-4.18.0-477.13.1.el8_8.x86_64 Found initrd image: /boot/initramfs-4.18.0-477.13.1.el8_8.x86_64.img Found linux image: /boot/vmlinuz-4.18.0-477.10.1.el8_8.x86_64 Found initrd image: /boot/initramfs-4.18.0-477.10.1.el8_8.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-a4746ff35a7a4d2a9f4280ec20051fb6 Found initrd image: /boot/initramfs-0-rescue-a4746ff35a7a4d2a9f4280ec20051fb6.img done [root@rockylinux88 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2 Rocky Linux (4.18.0-513.5.1.el8_9.x86_64) 8.8 (Green Obsidian) Rocky Linux (4.18.0-477.13.1.el8_8.x86_64) 8.8 (Green Obsidian) Rocky Linux (4.18.0-477.10.1.el8_8.x86_64) 8.8 (Green Obsidian) Rocky Linux (0-rescue-a4746ff35a7a4d2a9f4280ec20051fb6) 8.8 (Green Obsidian) [root@rockylinux88 ~]# grub2-editenv list saved_entry=a4746ff35a7a4d2a9f4280ec20051fb6-4.18.0-513.5.1.el8_9.x86_64 boot_success=0
Reboot the server to activate the latest kernel version.
[root@rockylinux88 ~]# reboot
NoteIf the server reboot fails, it means the kernel update was not performed normally. In this case, see Restore kernel update to revert to the previous kernel version.
Log in to the server again and check if the new kernel is activated.
- Rocky Linux 8.6
[root@rockylinux86 ~]# uname -r 4.18.0-513.5.1.el8_9.x86_64
- Rocky Linux 8.8
[root@rockylinux88 ~]# uname -r 4.18.0-513.5.1.el8_9.x86_64
NoteTo check if the updated kernel is properly applied, see Checking kernel updates to check the kernel installation status.
Change yum command settings on Rocky Linux 8 server
If you cannot view the latest 8.9 kernel by executing the yum list kernel
command on Rocky Linux 8.6/8.8, follow these steps:
To ensure compatibility with other services on NAVER Cloud Platform, the yum settings for the Rocky Linux 8.6 and 8.8 servers are fixed to 8.6 and 8.8 only. By removing these settings or adding a yum command option, you can direct the settings toward other versions than 8.6 and 8.8 as well.
Check the yum settings.
The settings are fixed to 8.6 and 8.8 as follows:- Rocky Linux 8.6
[root@rockylinux86 ~]# cat /etc/yum/vars/releasever 8.6
- Rocky Linux 8.8
[root@rockylinux88 ~]# cat /etc/yum/vars/releasever 8.8
Make the settings so that they are directed toward the REPO RPM files of higher versions than the current 8.6/8.8 REPO's RPM file.
You can use select one of the following three methods to set it. This guide is based on method (2).
(1) Delete the releasever file- Rocky Linux 8.6
[root@rockylinux86 ~]# rm /etc/yum/vars/releasever rm: remove regular file '/etc/yum/vars/releasever'? y [root@rockylinux86 ~]# yum clean all 17 files removed [root@rockylinux86 ~]# yum list kernel Installed Packages kernel.x86_64 4.18.0-372.9.1.el8 @System kernel.x86_64 4.18.0-372.32.1.el8_6 @System Available Packages kernel.x86_64 4.18.0-513.5.1.el8_9 baseos
- Rocky Linux 8.8
[root@rockylinux88 ~]# rm /etc/yum/vars/releasever rm: remove regular file '/etc/yum/vars/releasever'? y [root@rockylinux88 ~]# yum clean all 17 files removed [root@rockylinux88 ~]# yum list kernel Installed Packages kernel.x86_64 4.18.0-477.10.1.el8_8 @System kernel.x86_64 4.18.0-477.13.1.el8_8 @System Available Packages kernel.x86_64 4.18.0-513.5.1.el8_9 baseos
(2) Add the --releasever=8.9 option to the yum command
- Rocky Linux 8.6
[root@rockylinux86 ~]# yum --releasever=8.9 list kernel Installed Packages kernel.x86_64 4.18.0-372.9.1.el8 @System kernel.x86_64 4.18.0-372.32.1.el8_6 @System Available Packages kernel.x86_64 4.18.0-513.5.1.el8_9 baseos
- Rocky Linux 8.8
[root@rockylinux88 ~]# yum --release=8.9 list kernel Installed Packages kernel.x86_64 4.18.0-477.10.1.el8_8 @System kernel.x86_64 4.18.0-477.13.1.el8_8 @System Available Packages kernel.x86_64 4.18.0-513.5.1.el8_9 baseos
(3) Add the --releasever=8 option to the yum command
- Rocky Linux 8.6
[root@rockylinux86 ~]# yum --releasever=8 list kernel Installed Packages kernel.x86_64 4.18.0-372.9.1.el8 @System kernel.x86_64 4.18.0-372.32.1.el8_6 @System Available Packages kernel.x86_64 4.18.0-513.5.1.el8_9 baseos
- Rocky Linux 8.8
[root@rockylinux88 ~]# yum --releasever=8 list kernel Installed Packages kernel.x86_64 4.18.0-477.10.1.el8_8 @System kernel.x86_64 4.18.0-477.13.1.el8_8 @System Available Packages kernel.x86_64 4.18.0-513.5.1.el8_9 baseos
yum command executed on KVM Rocky Linux 8.8 continues to stand by in Extras
If the yum command does not run smoothly on the KVM-based Rocky Linux 8 server, follow these steps:
- Connect to the server remotely.
- Check if the yum list kernel command continues to stand by in Extras as in the following example.
This happens in an environment closed to outside such as private subnet without NAT, public subnet without public IP and blocked ACG.[root@kvm-rockylinux88 ~]# yum --releasever=8.9 list kernel-4.18.0-513.5.1.el8_9 Rocky Linux 8.9 - AppStream 80 MB/s | 9.5 MB 00:00 Rocky Linux 8.9 - BaseOS 61 MB/s | 2.9 MB 00:00 Rocky Linux 8.9 - Extras [ === ] --- B/s | 0 B --:-- ET
- Check the Repo file information.
[root@kvm-rockylinux88 ~]# grep -e ^baseurl -e ^mirrorlist /etc/yum.repos.d/Rocky* /etc/yum.repos.d/Rocky-AppStream.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/AppStream/$basearch/os/ /etc/yum.repos.d/Rocky-BaseOS.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/BaseOS/$basearch/os/ /etc/yum.repos.d/Rocky-Debuginfo.repo:mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=BaseOS-$releasever-debug /etc/yum.repos.d/Rocky-Debuginfo.repo:mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=AppStream-$releasever-debug /etc/yum.repos.d/Rocky-Debuginfo.repo:mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=HighAvailability-$releasever-debug /etc/yum.repos.d/Rocky-Debuginfo.repo:mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=PowerTools-$releasever-debug /etc/yum.repos.d/Rocky-Debuginfo.repo:mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=ResilientStorage-$releasever-debug /etc/yum.repos.d/Rocky-Devel.repo:mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=Devel-$releasever /etc/yum.repos.d/Rocky-Extras.repo:mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=extras-$releasever ... Rest omitted...
- Use the below command to change the repository server of the Repo file to repo.ncloud.com.
[root@kvm-rockylinux88 ~]# sed -i "s/^mirrorlist=/#mirrorlist/" /etc/yum.repos.d/*.repo [root@kvm-rockylinux88 ~]# sed -i "s|#baseurl=http://dl.rockylinux.org/\$contentdir|baseurl=http://repo.ncloud.com/rocky|" /etc/yum.repos.d/*.repo
- Check the changes made.
[root@kvm-rockylinux88 ~]# grep -e ^baseurl /etc/yum.repos.d/*.repo /etc/yum.repos.d/Rocky-AppStream.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/AppStream/$basearch/os/ /etc/yum.repos.d/Rocky-BaseOS.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/BaseOS/$basearch/os/ /etc/yum.repos.d/Rocky-Debuginfo.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/BaseOS/$basearch/debug/tree/ /etc/yum.repos.d/Rocky-Debuginfo.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/AppStream/$basearch/debug/tree/ /etc/yum.repos.d/Rocky-Debuginfo.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/HighAvailability/$basearch/debug/tree/ /etc/yum.repos.d/Rocky-Debuginfo.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/PowerTools/$basearch/debug/tree/ /etc/yum.repos.d/Rocky-Debuginfo.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/ResilientStorage/$basearch/debug/tree/ /etc/yum.repos.d/Rocky-Devel.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/Devel/$basearch/os/ /etc/yum.repos.d/Rocky-Extras.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/extras/$basearch/os/ ... Rest omitted...
- Delete the yum cache and execute the yum command once again.
[root@kvm-rockylinux88 ~]# rm -rf /var/cache/dnf/* [root@kvm-rockylinux88 ~]# yum --releasever=8.9 list kernel-4.18.0-513.5.1.el8_9 Rocky Linux 8.9 - AppStream 63 MB/s | 9.5 MB 00:00 Rocky Linux 8.9 - BaseOS 47 MB/s | 2.9 MB 00:00 Rocky Linux 8.9 - Extras 1.1 MB/s | 14 kB 00:00 Available Packages kernel.x86_64 4.18.0-513.5.1.el8_9 baseos
How to check and change kernel on KVM Rocky Linux 8.8
On the KVM-based Rocky Linux 8 server, BLS (Boot Loader Specification) is enabled. To check the kernel and change the kernel setting, follow these steps:
- Connect to the server remotely.
- Check if BLS setting is enabled in the grub setting.
[root@kvm-rockylinux88 ~]# grep BLSCFG /etc/default/grub GRUB_ENABLE_BLSCFG=true
- Install the kernel and check the installed kernel.
[root@kvm-rockylinux88 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2 [root@kvm-rockylinux88 ~]# ls -l /boot/loader/entries total 16 -rw-r--r--. 1 root root 405 Jun 14 2023 2faf2183dcf14a70b2b32e1b9fe6e4e9-0-rescue.conf -rw-r--r--. 1 root root 368 Jun 14 2023 2faf2183dcf14a70b2b32e1b9fe6e4e9-4.18.0-477.10.1.el8_8.x86_64.conf -rw-r--r--. 1 root root 368 Sep 8 17:00 2faf2183dcf14a70b2b32e1b9fe6e4e9-4.18.0-477.15.1.el8_8.x86_64.conf -rw-r--r-- 1 root root 363 Dec 14 21:51 2faf2183dcf14a70b2b32e1b9fe6e4e9-4.18.0-513.5.1.el8_9.x86_64.conf or [root@kvm-rockylinux88 ~]# grubby --info=ALL | grep ^kernel kernel="/boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64" kernel="/boot/vmlinuz-4.18.0-477.15.1.el8_8.x86_64" kernel="/boot/vmlinuz-4.18.0-477.10.1.el8_8.x86_64" kernel="/boot/vmlinuz-0-rescue-2faf2183dcf14a70b2b32e1b9fe6e4e9"
- Run booting as follows and check the kernel that comes up.
[root@kvm-rockylinux88 ~]# grubby --default-kernel /boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64
- If the kernel version for default boot is different from the installed kernel version, change the kernel version for default boot.
[root@kvm-rockylinux88 ~]# grubby --set-default="/boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64" The default is /boot/loader/entries/2faf2183dcf14a70b2b32e1b9fe6e4e9-4.18.0-513.5.1.el8_9.x86_64.conf with index 0 and kernel /boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64 [root@kvm-rockylinux88 ~]# grubby --default-kernel /boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64
Check kernel update
To check if the kernel update is applied normally, follow these steps:
Connect to the server remotely.
Check if the kernel package is installed.
[root@rockylinux88 ~]# rpm -qa | grep kernel-4.18.0-513.5.1.el8_9 kernel-4.18.0-513.5.1.el8_9.x86_64
Check if the initramfs file and vmlinuz file are created in the /boot directory.
- Rocky Linux 8.6
[root@rockylinux86 ~]# ls -l /boot/initramfs-4.18.0-513.5.1.el8_9.x86_64.img -rw------- 1 root root 29279987 Dec 4 11:41 /boot/initramfs-4.18.0-513.5.1.el8_9.x86_64.img [root@rockylinux86 ~]# ls -l /boot/initramfs-4.18.0-513.5.1.el8_9.x86_64kdump.img -rw------- 1 root root 24992256 Dec 4 14:00 /boot/initramfs-4.18.0-513.5.1.el8_9.x86_64kdump.img [root@rockylinux86 ~]# ls -l /boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64 -rwxr-xr-x 1 root root 10913432 Nov 17 12:42 /boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64
- Rocky Linux 8.8
[root@rockylinux88 ~]# ls -l /boot/initramfs-4.18.0-513.5.1.el8_9.x86_64.img -rw------- 1 root root 29326362 Dec 4 11:43 /boot/initramfs-4.18.0-513.5.1.el8_9.x86_64.img [root@rockylinux88 ~]# ls -l /boot/initramfs-4.18.0-513.5.1.el8_9.x86_64kdump.img -rw------- 1 root root 24941568 Dec 4 14:00 /boot/initramfs-4.18.0-513.5.1.el8_9.x86_64kdump.img [root@rockylinux88 ~]# ls -l /boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64 -rwxr-xr-x 1 root root 10913432 Nov 17 12:42 /boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64
Check if the latest kernel settings are registered in the grub.cfg file.
- Rocky Linux 8.6
[root@rockylinux86 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2 Rocky Linux (4.18.0-513.5.1.el8_9.x86_64) 8.6 (Green Obsidian) Rocky Linux (4.18.0-372.32.1.el8_6.x86_64) 8.6 (Green Obsidian) Rocky Linux (4.18.0-372.9.1.el8.x86_64) 8.6 (Green Obsidian) Rocky Linux (0-rescue-50f85e7b58fc48c8a91ae8a9a60ee028) 8.6 (Green Obsidian)
- Rocky Linux 8.8
[root@rockylinux88 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2 Rocky Linux (4.18.0-513.5.1.el8_9.x86_64) 8.8 (Green Obsidian) Rocky Linux (4.18.0-477.13.1.el8_8.x86_64) 8.8 (Green Obsidian) Rocky Linux (4.18.0-477.10.1.el8_8.x86_64) 8.8 (Green Obsidian) Rocky Linux (0-rescue-a4746ff35a7a4d2a9f4280ec20051fb6) 8.8 (Green Obsidian)
Check the grub settings.
- Rocky Linux 8.6
[root@rockylinux86 ~]# grep GRUB_DEFAULT /etc/default/grub GRUB_DEFAULT=saved [root@rockylinux86 ~]# cat /boot/grub2/grubenv # GRUB Environment Block saved_entry=50f85e7b58fc48c8a91ae8a9a60ee028-4.18.0-513.5.1.el8_9.x86_64 boot_success=0 ... Omitted...
- Rocky Linux 8.8
[root@rockylinux88 ~]# grep GRUB_DEFAULT /etc/default/grub GRUB_DEFAULT=saved [root@rockylinux88 ~]# cat /boot/grub2/grubenv # GRUB Environment Block saved_entry=a4746ff35a7a4d2a9f4280ec20051fb6-4.18.0-513.5.1.el8_9.x86_64 boot_success=0 ... Omitted...
Restore kernel update
If you can't restart the server normally after a kernel update, you need to revert to the previous kernel before the update. You can revert it to one of the many installed kernel versions. This guide deals with how to revert the kernel to the version immediately before the update.
To restore the kernel version, follow these steps:
To resolve server restart issues, you can attempt server recovery by entering single mode. For how to run reboot in Single Mode, see Server recovery guide.
Click the environment you are using in the Region menu and the Platform menu on the NAVER Cloud Platform console.
Click Services > Compute > Server, in order.
Click the Server menu.
Select the server to recover from the server image list, and then click the [Server connection console] button.
Select the previous version as the booting kernel from the grub booting page and reboot.
- RockyLinux 8.6 grub booting screen
- RockyLinux 8.8 grub booting screen
- RockyLinux 8.6 grub booting screen
After booting is complete, check the kernel version of the server.
- Rocky Linux 8.6
[root@rockylinux86 ~]# uname -r 4.18.0-372.32.1.el8_6.x86_64
- Rocky Linux 8.8
[root@rockylinux88 ~]# uname -r 4.18.0-477.13.1.el8_8.x86_64
Check the kernel version that is currently active.
- Rocky Linux 8.6
[root@rockylinux86 ~]# grub2-editenv list saved_entry=50f85e7b58fc48c8a91ae8a9a60ee028-4.18.0-513.5.1.el8_9.x86_64 boot_success=0 [root@rockylinux86 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2 Rocky Linux (4.18.0-513.5.1.el8_9.x86_64) 8.6 (Green Obsidian) Rocky Linux (4.18.0-372.32.1.el8_6.x86_64) 8.6 (Green Obsidian) Rocky Linux (4.18.0-372.9.1.el8.x86_64) 8.6 (Green Obsidian) Rocky Linux (0-rescue-50f85e7b58fc48c8a91ae8a9a60ee028) 8.6 (Green Obsidian)
- Rocky Linux 8.8
[root@rockylinux88 ~]# grub2-editenv list saved_entry=a4746ff35a7a4d2a9f4280ec20051fb6-4.18.0-513.5.1.el8_9.x86_64 boot_success=0 [root@rockylinux88 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2 Rocky Linux (4.18.0-513.5.1.el8_9.x86_64) 8.8 (Green Obsidian) Rocky Linux (4.18.0-477.13.1.el8_8.x86_64) 8.8 (Green Obsidian) Rocky Linux (4.18.0-477.10.1.el8_8.x86_64) 8.8 (Green Obsidian) Rocky Linux (0-rescue-a4746ff35a7a4d2a9f4280ec20051fb6) 8.8 (Green Obsidian)
Reset the default kernel version to the previous kernel version when booting.
- Rocky Linux 8.6
[root@rockylinux86 ~]# grub2-set-default "Rocky Linux (4.18.0-372.32.1.el8_6.x86_64) 8.6 (Green Obsidian)" [root@rockylinux86 ~]# grub2-editenv list saved_entry=Rocky Linux (4.18.0-372.32.1.el8_6.x86_64) 8.6 (Green Obsidian) boot_success=0
- Rocky Linux 8.8
[root@rockylinux88 ~]# grub2-set-default "Rocky Linux (4.18.0-477.13.1.el8_8.x86_64) 8.8 (Green Obsidian)" [root@rockylinux88 ~]# grub2-editenv list saved_entry=Rocky Linux (4.18.0-477.13.1.el8_8.x86_64) 8.8 (Green Obsidian) boot_success=0
(Optional) Reboot the server to check whether the server boots up normally with the updated kernel version.
[root@rockylinux88 ~]# reboot
(Optional) Log back into the server to check the booting status and the kernel version.
- Rocky Linux 8.6
[root@rockylinux86 ~]# uname -r 4.18.0-372.32.1.el8_6.x86_64
- Rocky Linux 8.8
[root@rockylinux88 ~]# uname -r 4.18.0-477.13.1.el8_8.x86_64