Rocky Linux 8

Prev Next

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 tasks and various setting tasks. Therefore, be familiar with 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 successfully. When switching to operational status after restarting, check for any issues in the server. Perform the kernel update only after thorough validation to ensure there are no issues.
  • In the case of GPU servers, the GPU driver that matches the kernel version must be installed for normal operation. If the updated kernel is incompatible 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.
Note

This kernel update guide will no longer provide regular updates moving forward. Therefore, when checking for the latest information or installing a different kernel version, see the relevant guide and take the necessary steps.
The kernel version specified in the guide serves as an example, so make sure to thoroughly test other kernel versions as needed before installation.

Caution
  • The user is solely responsible for performing kernel updates on their server, and NAVER Cloud Platform will not be held responsible for any issues caused by these updates.
  • Normal server usage might be unavailable during kernel updates and restarts, and recovery from this issue is not supported. In addition, server recovery is not supported when the kernel update fails.
  • Before updating the kernel, make 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.

Check for kernel versions available for update

To check the kernel versions available for update on a Rocky Linux 8 server, follow these steps:

By default, http://repo.ncloud.com, the NCP repo is set as the base URL. In environments with a public IP or a private subnet configured with NAT, you can switch the repository to an external public mirror site instead of the NCP repo.

Note

NCP repo is a repository provided by NAVER Cloud Platform to support user environments like VPC private subnets where external access is limited.
Since NCP repo synchronizes only 4 times a year, it is recommended to switch to an external public mirror site to apply the latest patches promptly. For more information, see Linux OS repository configuration checklist guide.

  1. Access the server you want to apply the kernel update to remotely.

  2. Check the kernel version to apply to the server.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# dnf --showduplicates --releasever=8.10 list kernel
    Installed Packages
    kernel.x86_64                                                                  4.18.0-553.el8_10                                                                        @System
    kernel.x86_64                                                                  4.18.0-553.5.1.el8_10                                                                    @System
    Available Packages
    kernel.x86_64                                                                  4.18.0-553.el8_10                                                                        baseos
    kernel.x86_64                                                                  4.18.0-553.5.1.el8_10                                                                    baseos
    kernel.x86_64                                                                  4.18.0-553.8.1.el8_10                                                                    baseos
    kernel.x86_64                                                                  4.18.0-553.16.1.el8_10                                                                   baseos
    kernel.x86_64                                                                  4.18.0-553.22.1.el8_10                                                                   baseos
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# dnf --showduplicates --releasever=8.10 list kernel
    Installed Packages
    kernel.x86_64                                                                  4.18.0-553.el8_10                                                                        @System
    kernel.x86_64                                                                  4.18.0-553.5.1.el8_10                                                                    @System
    Available Packages
    kernel.x86_64                                                                  4.18.0-553.el8_10                                                                        baseos
    kernel.x86_64                                                                  4.18.0-553.5.1.el8_10                                                                    baseos
    kernel.x86_64                                                                  4.18.0-553.8.1.el8_10                                                                    baseos
    kernel.x86_64                                                                  4.18.0-553.16.1.el8_10                                                                   baseos
    kernel.x86_64                                                                  4.18.0-553.22.1.el8_10                                                                   baseos
    

Update kernel

To update kernels for Rocky Linux 8 servers, follow these steps:

Note

This guide provides an example of upgrading the kernel version to 4.18.0-553.22.1.el8_10 on a Rocky Linux 8 server.
The kernel versions available for installation at the time of referencing the guide may vary, so thoroughly test other versions before installation.

  1. Access the server you want to apply the kernel update to remotely.

  2. Check the kernel version of the server.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# uname -r
    4.18.0-553.5.1.el8_10.x86_64
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# uname -r
    4.18.0-553.5.1.el8_10.x86_64
    
  3. Check the repository information connected to the server.
    If you need to edit the Repo file, see Linux OS repository configuration checklist guide to edit the repository information.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# grep -e ^mirrorlist -e ^baseurl /etc/yum.repos.d/Rocky-{AppStream,BaseOS,Extras}.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-Extras.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/extras/$basearch/os/
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# grep -e ^mirrorlist -e ^baseurl /etc/yum.repos.d/Rocky-{AppStream,BaseOS,Extras}.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-Extras.repo:baseurl=http://repo.ncloud.com/rocky/$releasever/extras/$basearch/os/
    
  4. Check the kernel version provided by the repository.

    Note

    If you do not use --releasever=8.10 as the yum command option, you might not be able to view the latest 8.10 kernel. In this case, see the Change yum command settings on Rocky Linux 8 server section of Linux OS repository configuration checklist guide to change the yum command settings.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# rm -rf /var/cache/dnf/*
    
    [root@xen-rockylinux810 ~]# dnf --releasever=8.10 list kernel-4.18.0-553.22.1.el8_10
    Available Packages
    kernel.x86_64                                                                   4.18.0-553.22.1.el8_10                                                                   baseos
    
    • KVM Rocky Linux8
    [root@kvm-rockylinux810 ~]# rm -rf /var/cache/dnf/*
    
    [root@kvm-rockylinux810 ~]# dnf --releasever=8.10 list kernel-4.18.0-553.22.1.el8_10
    Available Packages
    kernel.x86_64                                                                   4.18.0-553.22.1.el8_10                                                                   baseos
    
  5. Install the viewed version of the kernel.
    Carefully review the list of packages being newly installed, updated, or removed. If everything is in order, enter y to complete the installation.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# dnf --releasever=8.10 install kernel-4.18.0-553.22.1.el8_10
    Dependencies resolved.
    ===============================================================================================================================================================================
     Package                                     Architecture                        Version                                             Repository                           Size
    ===============================================================================================================================================================================
    Installing:
     kernel                                      x86_64                              4.18.0-553.22.1.el8_10                              baseos                               10 M
     kernel-core                                 x86_64                              4.18.0-553.22.1.el8_10                              baseos                               43 M
     kernel-modules                              x86_64                              4.18.0-553.22.1.el8_10                              baseos                               36 M
    
    Transaction Summary
    ===============================================================================================================================================================================
    Install  3 Packages
    
    Total download size: 90 M
    Installed size: 96 M
    Is this ok [y/N]: y
    (Check the installed packages, updated packages, and deleted packages carefully, and proceed with y if there are no abnormalities)
    
    ... Omitted ...
    
    Installed:
      kernel-4.18.0-553.22.1.el8_10.x86_64                 kernel-core-4.18.0-553.22.1.el8_10.x86_64                 kernel-modules-4.18.0-553.22.1.el8_10.x86_64
    
    Complete!
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# dnf --releasever=8.10 install kernel-4.18.0-553.22.1.el8_10
    Dependencies resolved.
    ===============================================================================================================================================================================
     Package                                     Architecture                        Version                                             Repository                           Size
    ===============================================================================================================================================================================
    Installing:
     kernel                                      x86_64                              4.18.0-553.22.1.el8_10                              baseos                               10 M
     kernel-core                                 x86_64                              4.18.0-553.22.1.el8_10                              baseos                               43 M
     kernel-modules                              x86_64                              4.18.0-553.22.1.el8_10                              baseos                               36 M
    
    Transaction Summary
    ===============================================================================================================================================================================
    Install  3 Packages
    
    Total download size: 90 M
    Installed size: 96 M
    Is this ok [y/N]: y
    (Check the installed packages, updated packages, and deleted packages carefully, and proceed with y if there are no abnormalities)
    
    ... Omitted ...
    
    Installed:
      kernel-4.18.0-553.22.1.el8_10.x86_64                 kernel-core-4.18.0-553.22.1.el8_10.x86_64                 kernel-modules-4.18.0-553.22.1.el8_10.x86_64
    
    Complete!
    
  6. After the installation is complete, check the bootable kernel version and the default boot kernel version.

    Note

    For XEN Rocky Linux 8, grub2 is the default, and for KVM Rocky Linux 8, BootLoaderSpec Configuration (BLSCFG) is the default. Thus, XEN Rocky Linux 8 uses grub2 commands, and KVM Rocky Linux 8 uses grubby commands.

    • XEN Rocky Linux 8
     [root@xen-rockylinux810 ~]# grep BLSCFG /etc/default/grub
     [root@xen-rockylinux810 ~]#
    
     [root@xen-rockylinux810 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2
     Rocky Linux (4.18.0-553.5.1.el8_10.x86_64) 8.10 (Green Obsidian)
     Rocky Linux (4.18.0-553.el8_10.x86_64) 8.10 (Green Obsidian)
     Rocky Linux (0-rescue-22b3e1e3130c45978071f903c5b6cf5d) 8.10 (Green Obsidian)
    
     [root@xen-rockylinux810 ~]# ls -ld /etc/grub2*
     lrwxrwxrwx. 1 root root 22 May 25 01:59 /etc/grub2.cfg -> ../boot/grub2/grub.cfg
    
     [root@xen-rockylinux810 ~]# grub2-mkconfig -o /etc/grub2.cfg
     Generating grub configuration file ...
     Found linux image: /boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64
     Found initrd image: /boot/initramfs-4.18.0-553.22.1.el8_10.x86_64.img
     Found linux image: /boot/vmlinuz-4.18.0-553.5.1.el8_10.x86_64
     Found initrd image: /boot/initramfs-4.18.0-553.5.1.el8_10.x86_64.img
     Found linux image: /boot/vmlinuz-4.18.0-553.el8_10.x86_64
     Found initrd image: /boot/initramfs-4.18.0-553.el8_10.x86_64.img
     Found linux image: /boot/vmlinuz-0-rescue-22b3e1e3130c45978071f903c5b6cf5d
     Found initrd image: /boot/initramfs-0-rescue-22b3e1e3130c45978071f903c5b6cf5d.img
     done
    
     [root@xen-rockylinux810 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2
     Rocky Linux (4.18.0-553.22.1.el8_10.x86_64) 8.10 (Green Obsidian)
     Rocky Linux (4.18.0-553.5.1.el8_10.x86_64) 8.10 (Green Obsidian)
     Rocky Linux (4.18.0-553.el8_10.x86_64) 8.10 (Green Obsidian)
     Rocky Linux (0-rescue-22b3e1e3130c45978071f903c5b6cf5d) 8.10 (Green Obsidian)
    
     [root@xen-rockylinux810 ~]# grub2-editenv list
     saved_entry=22b3e1e3130c45978071f903c5b6cf5d-4.18.0-553.22.1.el8_10.x86_64
     boot_success=0
    
     [root@xen-rockylinux810 ~]# grub2-set-default "Rocky Linux (4.18.0-553.22.1.el8_10.x86_64) 8.10 (Green Obsidian)"
    
     [root@xen-rockylinux810 ~]# grub2-editenv list
     saved_entry=Rocky Linux (4.18.0-553.22.1.el8_10.x86_64) 8.10 (Green Obsidian)
     boot_success=0
    
    • KVM Rocky Linux 8
     [root@kvm-rockylinux810 ~]# grep BLSCFG /etc/default/grub
     GRUB_ENABLE_BLSCFG=true
    
     [root@kvm-rockylinux810 ~]# grubby --info=ALL | grep ^kernel
     kernel="/boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64"
     kernel="/boot/vmlinuz-4.18.0-553.5.1.el8_10.x86_64"
     kernel="/boot/vmlinuz-4.18.0-553.el8_10.x86_64"
     kernel="/boot/vmlinuz-0-rescue-e7ae61e978ce4c7f88f8f4f2659d068f"
    
     [root@kvm-rockylinux810 ~]# grubby --default-kernel
     /boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64
    
  7. (Optional) If the default boot kernel version is different from the installed kernel version, change the default boot kernel.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2
    Rocky Linux (4.18.0-553.22.1.el8_10.x86_64) 8.10 (Green Obsidian)
    Rocky Linux (4.18.0-553.5.1.el8_10.x86_64) 8.10 (Green Obsidian)
    Rocky Linux (4.18.0-553.el8_10.x86_64) 8.10 (Green Obsidian)
    Rocky Linux (0-rescue-22b3e1e3130c45978071f903c5b6cf5d) 8.10 (Green Obsidian)
    
    [root@xen-rockylinux810 ~]# grub2-set-default "Rocky Linux (4.18.0-553.22.1.el8_10.x86_64) 8.10 (Green Obsidian)"
    
    [root@xen-rockylinux810 ~]# grub2-editenv list
    saved_entry=Rocky Linux (4.18.0-553.22.1.el8_10.x86_64) 8.10 (Green Obsidian)
    boot_success=0
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# grubby --info=ALL | grep ^kernel
    kernel="/boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64"
    kernel="/boot/vmlinuz-4.18.0-553.5.1.el8_10.x86_64"
    kernel="/boot/vmlinuz-4.18.0-553.el8_10.x86_64"
    kernel="/boot/vmlinuz-0-rescue-e7ae61e978ce4c7f88f8f4f2659d068f"
    
    [root@kvm-rockylinux810 ~]# grubby --set-default="/boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64"
    The default is /boot/loader/entries/e7ae61e978ce4c7f88f8f4f2659d068f-4.18.0-553.22.1.el8_10.x86_64.conf with index 0 and kernel /boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64
    
    [root@kvm-rockylinux810 ~]# grubby --default-kernel
    /boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64
    
  8. Reboot the server to activate the latest kernel version.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# sync;reboot
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# sync;reboot
    
    Note

    If the server reboot fails, it means the kernel update was not successfully applied. In this case, see Restore kernel update to revert to the previous kernel version.

  9. Log in to the server again and check if the new kernel is activated.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# uname -r
    4.18.0-553.22.1.el8_10.x86_64
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# uname -r
    4.18.0-553.22.1.el8_10.x86_64
    
    Note

    To check if the updated kernel is properly applied, see Checking kernel updates to check the kernel installation status.

Check kernel update

To check if the kernel update was successfully applied, follow these steps:

  1. Access the server remotely.

  2. Check if the kernel package is installed.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# rpm -qa | grep kernel-4.18.0-553.22.1.el8_10.x86_64
    kernel-4.18.0-553.22.1.el8_10.x86_64
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# rpm -qa | grep kernel-4.18.0-553.22.1.el8_10.x86_64
    kernel-4.18.0-553.22.1.el8_10.x86_64
    
  3. Check if the initramfs file and vmlinuz file are created in the /boot directory.

    Note

    The /boot/initramfs-<kernel version>.x86_64kdump.img file may not be created depending on your settings.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# ls -l /boot/initramfs-4.18.0-553.22.1.el8_10.x86_64.img
    -rw------- 1 root root 29410248 Oct 30 10:46 /boot/initramfs-4.18.0-553.22.1.el8_10.x86_64.img
    
    [root@xen-rockylinux810 ~]# ls -l /boot/initramfs-4.18.0-553.22.1.el8_10.x86_64kdump.img
    -rw------- 1 root root 25040896 Oct 30 10:55 /boot/initramfs-4.18.0-553.22.1.el8_10.x86_64kdump.img
    
    [root@xen-rockylinux810 ~]# ls -l /boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64
    -rwxr-xr-x 1 root root 10881352 Sep 25 18:31 /boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# ls -l /boot/initramfs-4.18.0-553.22.1.el8_10.x86_64.img
    -rw------- 1 root root 29549483 Oct 30 10:46 /boot/initramfs-4.18.0-553.22.1.el8_10.x86_64.img
    
    [root@kvm-rockylinux810 ~]# ls -l /boot/initramfs-4.18.0-553.22.1.el8_10.x86_64kdump.img
    -rw------- 1 root root 25237504 Oct 30 10:55 /boot/initramfs-4.18.0-553.22.1.el8_10.x86_64kdump.img
    
    [root@kvm-rockylinux810 ~]# ls -l /boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64
    -rwxr-xr-x 1 root root 10881352 Sep 25 18:31 /boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64
    
  4. Check if the latest kernel settings are registered.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2
    Rocky Linux (4.18.0-553.22.1.el8_10.x86_64) 8.10 (Green Obsidian)
    Rocky Linux (4.18.0-553.5.1.el8_10.x86_64) 8.10 (Green Obsidian)
    Rocky Linux (4.18.0-553.el8_10.x86_64) 8.10 (Green Obsidian)
    Rocky Linux (0-rescue-22b3e1e3130c45978071f903c5b6cf5d) 8.10 (Green Obsidian)
    
    [root@xen-rockylinux810 ~]# ls -l /boot/loader/entries
    total 16
    -rw-r--r--. 1 root root 406 Jun  4 18:49 22b3e1e3130c45978071f903c5b6cf5d-0-rescue.conf
    -rw-r--r--  1 root root 374 Oct 30 10:46 22b3e1e3130c45978071f903c5b6cf5d-4.18.0-553.22.1.el8_10.x86_64.conf
    -rw-r--r--. 1 root root 369 Jun  8 12:28 22b3e1e3130c45978071f903c5b6cf5d-4.18.0-553.5.1.el8_10.x86_64.conf
    -rw-r--r--. 1 root root 349 Jun  4 18:49 22b3e1e3130c45978071f903c5b6cf5d-4.18.0-553.el8_10.x86_64.conf
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# grubby --info=ALL | grep ^kernel
    kernel="/boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64"
    kernel="/boot/vmlinuz-4.18.0-553.5.1.el8_10.x86_64"
    kernel="/boot/vmlinuz-4.18.0-553.el8_10.x86_64"
    kernel="/boot/vmlinuz-0-rescue-e7ae61e978ce4c7f88f8f4f2659d068f"
    
    [root@kvm-rockylinux810 ~]# ls -l /boot/loader/entries
    total 16
    -rw-r--r--. 1 root root 406 Jun  5 18:07 e7ae61e978ce4c7f88f8f4f2659d068f-0-rescue.conf
    -rw-r--r--  1 root root 374 Oct 30 10:46 e7ae61e978ce4c7f88f8f4f2659d068f-4.18.0-553.22.1.el8_10.x86_64.conf
    -rw-r--r--. 1 root root 369 Jun 14 16:31 e7ae61e978ce4c7f88f8f4f2659d068f-4.18.0-553.5.1.el8_10.x86_64.conf
    -rw-r--r--. 1 root root 349 Jun  5 18:07 e7ae61e978ce4c7f88f8f4f2659d068f-4.18.0-553.el8_10.x86_64.conf    
    
  5. Check the grub settings.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# grep GRUB_DEFAULT /etc/default/grub
    GRUB_DEFAULT=saved
    
    [root@xen-rockylinux810 ~]# cat /boot/grub2/grubenv
    # GRUB Environment Block
    saved_entry=Rocky Linux (4.18.0-553.22.1.el8_10.x86_64) 8.10 (Green Obsidian)
    boot_success=0
    ... Omitted ...
    
    [root@xen-rockylinux810 ~]# grub2-editenv list
    saved_entry=Rocky Linux (4.18.0-553.22.1.el8_10.x86_64) 8.10 (Green Obsidian)
    boot_success=0
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# grep GRUB_DEFAULT /etc/default/grub
    GRUB_DEFAULT=saved
    
    [root@kvm-rockylinux810 ~]# cat /boot/grub2/grubenv
    # GRUB Environment Block
    saved_entry=e7ae61e978ce4c7f88f8f4f2659d068f-4.18.0-553.22.1.el8_10.x86_64
    kernelopts=root=UUID=582f5c2c-67ab-4bdc-81bb-8cb06a26548f ro net.ifnames=0 biosdevname=0 crashkernel=auto console=ttyS0,115200n8 console=tty0
    boot_success=0
    ... Omitted ...
    
    [root@kvm-rockylinux810 ~]# grubby --default-kernel
    /boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64 
    

Restore kernel update

If the server fails to restart properly after a kernel update, you must revert to the previous kernel before the update. You can revert it to one of the many installed kernel versions, and this guide describes how to revert the kernel to the version immediately before the update.

Note

To resolve server restart issues, you can attempt server recovery by entering single mode. For more information on how to run reboot in Single Mode, see Server recovery guide.

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to i_menu > Services > Compute > Server.

  2. Click the Server menu.

  3. Select the server to recover from the server image list, and then click the [Server connection console] button.

  4. Select the previous version as the booting kernel from the grub booting page and reboot.

    • XEN RockyLinux 8 grub booting screen
      kernel-update-xen-rocky8_console01
    • KVM RockyLinux 8 grub booting screen
      kernel-update-kvm-rocky8_console01
  5. After booting is complete, check the kernel version of the server.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# uname -r
    4.18.0-553.5.1.el8_10.x86_64
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# uname -r
    4.18.0-553.5.1.el8_10.x86_64
    
  6. Check the kernel version that is currently active.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# grub2-editenv list
    saved_entry=Rocky Linux (4.18.0-553.22.1.el8_10.x86_64) 8.10 (Green Obsidian)
    boot_success=0
    
    [root@xen-rockylinux810 ~]# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2
    Rocky Linux (4.18.0-553.22.1.el8_10.x86_64) 8.10 (Green Obsidian)
    Rocky Linux (4.18.0-553.5.1.el8_10.x86_64) 8.10 (Green Obsidian)
    Rocky Linux (4.18.0-553.el8_10.x86_64) 8.10 (Green Obsidian)
    Rocky Linux (0-rescue-22b3e1e3130c45978071f903c5b6cf5d) 8.10 (Green Obsidian)
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# grubby --default-kernel
    /boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64
    
    [root@kvm-rockylinux810 ~]# grubby --info=ALL | grep ^kernel
    kernel="/boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64"
    kernel="/boot/vmlinuz-4.18.0-553.5.1.el8_10.x86_64"
    kernel="/boot/vmlinuz-4.18.0-553.el8_10.x86_64"
    kernel="/boot/vmlinuz-0-rescue-e7ae61e978ce4c7f88f8f4f2659d068f"
    
  7. Reset the default kernel version to the previous kernel version when booting.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# grub2-set-default "Rocky Linux (4.18.0-553.5.1.el8_10.x86_64) 8.10 (Green Obsidian)"
    
    [root@xen-rockylinux810 ~]# grub2-editenv list
    saved_entry=Rocky Linux (4.18.0-553.5.1.el8_10.x86_64) 8.10 (Green Obsidian)
    boot_success=0
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# grubby --set-default="/boot/vmlinuz-4.18.0-553.5.1.el8_10.x86_64"
    The default is /boot/loader/entries/e7ae61e978ce4c7f88f8f4f2659d068f-4.18.0-553.5.1.el8_10.x86_64.conf with index 1 and kernel /boot/vmlinuz-4.18.0-553.5.1.el8_10.x86_64
    
    [root@kvm-rockylinux810 ~]# grubby --default-kernel
    /boot/vmlinuz-4.18.0-553.5.1.el8_10.x86_64
    
  8. (Optional) Reboot the server to check whether the server boots up normally with the updated kernel version.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# sync;reboot
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# sync;reboot
    
  9. (Optional) Log back into the server to check the booting status and the kernel version.

    • XEN Rocky Linux 8
    [root@xen-rockylinux810 ~]# uname -r
    4.18.0-553.5.1.el8_10.x86_64
    
    • KVM Rocky Linux 8
    [root@kvm-rockylinux810 ~]# uname -r
    4.18.0-553.5.1.el8_10.x86_64
    

Troubleshoot repository related issues during kernel update

In case of repository issues during a kernel update, see Linux OS repository configuration checklist guide FAQs.