How to Install Kernel 5.x on Rocky Linux 8

Kernel is central component of an operating system that manages operations of computer and hardware. It basically manages operations of memory and CPU time. It is core component of an operating system. Kernel acts as a bridge between applications and data processing performed at hardware level using inter-process communication and system calls.

Prerequisites

  • Access to RockyLinux command line terminal.
  • Root privileges or Sudo privileges.

Enable ELRepo Repository

Run the following commands to enable ELRepo repository.

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

dnf install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm

Run the following command to display the list of packages.

dnf repolist

Output:

[root@server netdata]# dnf repolist
repo id            repo name
appstream          Rocky Linux 8 - AppStream
baseos             Rocky Linux 8 - BaseOS
elrepo             ELRepo.org Community Enterprise Linux Repository - el8
epel               Extra Packages for Enterprise Linux 8 - x86_64
epel-modular       Extra Packages for Enterprise Linux Modular 8 - x86_64
extras             Rocky Linux 8 - Extras

Install Latest Kernel Version

To check the installed Kernal version.

uname -r

Output:

[root@server netdata]# uname -r
4.18.0-305.3.1.el8_4.x86_64   

Run the following command to install latest kernel version.

dnf --enablerepo=elrepo-kernel install kernel-ml

Once you install the latest kernel, you will have to reboot the server.

Reboot

Select Kernel 5.x in the Grub menu to boot to newly installed Kernel 5.x on Rocky Linux 8.

image!

To check the installed Kernal version.

uname -r

Output:

[root@server ~]# uname -r
5.13.0-1.el8.elrepo.x86_64