Detailed method of installing Kernel 5.x kernel version on CentOS 8 system

CentOS 8 operation comes with a custom kernel to ensure its integrity and compatibility with supported hardware. The kernel version included in CentOS 8 Linux is 4.18. The Linux kernel includes the basic kernel itself and many kernel modules.

The Linux kernel is the main component of the Linux operating system (OS) and the core interface between computer hardware and its processes. It has the following main functions:

  1. **Process management: ** Determine which processes can use the central processing unit (CPU), when and how long
  2. **Memory management: ** Keep track of how much memory is used to store what and where
  3. **Device driver: ** Act as a mediator/interpreter between hardware and process
  4. **System calls and security: ** Receive service requests from the process

If you are a novice and want to install the latest version of the Linux kernel, then this guide is for you. The list of kernel-related packages available for CentOS is as follows:

Install Kernel 5.x kernel on CentOS 8##

The general standard method for installing the latest kernel on CentOS is to build from source code. In this article, I will introduce you to ELRepo that provides RPM packages.

ELRepo is an RPM repository for Enterprise Linux software packages. It supports Red Hat Enterprise Linux (RHEL) and its derivative versions, such as Scientific Linux, CentOS, etc.

Test environment: Hui hosting www.idccoupon.com website.

Test system: CentOS 8 system.

Test purpose: install Kernel 5.x kernel version

Step 1: Add ELRepo to CentOS 8

Add the ELRepo repository to the CentOS 8 system by running the following command.

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

The installer will create a repository file in the /etc/yum.repos.d directory.

$ cat /etc/yum.repos.d/elrepo.repo

Step 2: Import the GPG key###

After adding the repository to the system, you can import the public key:

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

Step 3: Install Linux Kernel 5.4 on CentOS 8

The repository added here has an elrepo-kernel channel, which provides a long-term (kernel-lt) support kernel and the latest stable mainline kernel (kernel-ml) for CentOS and RHEL Linux systems .

We can list the mainline kernel versions available in the resource library:

$ sudo dnf --disablerepo="*"--enablerepo="elrepo-kernel" list available | grep kernel-ml
kernel-ml.x86_64                         5.7.4-1.el8.elrepo        elrepo-kernel
kernel-ml-core.x86_64                    5.7.4-1.el8.elrepo        elrepo-kernel
kernel-ml-devel.x86_64                   5.7.4-1.el8.elrepo        elrepo-kernel
kernel-ml-doc.noarch                     5.7.4-1.el8.elrepo        elrepo-kernel
kernel-ml-headers.x86_64                 5.7.4-1.el8.elrepo        elrepo-kernel
kernel-ml-modules.x86_64                 5.7.4-1.el8.elrepo        elrepo-kernel
kernel-ml-modules-extra.x86_64           5.7.4-1.el8.elrepo        elrepo-kernel
kernel-ml-tools.x86_64                   5.7.4-1.el8.elrepo        elrepo-kernel
kernel-ml-tools-libs.x86_64              5.7.4-1.el8.elrepo        elrepo-kernel
kernel-ml-tools-libs-devel.x86_64        5.7.4-1.el8.elrepo        elrepo-kernel

This will install the Linux kernel module as a dependency.

Dependencies resolved.========================================================================================================================================================
 Package                                Arch                        Version                                    Repository                          Size
========================================================================================================================================================
Installing:
 kernel-ml                              x86_64                      5.7.4-1.el8.elrepo                         elrepo-kernel                       32 k
Installing dependencies:
 kernel-ml-modules                      x86_64                      5.7.4-1.el8.elrepo                         elrepo-kernel                       23 M
 kernel-ml-core                         x86_64                      5.7.4-1.el8.elrepo                         elrepo-kernel                       28 M

Transaction Summary
========================================================================================================================================================
Install  3 Packages

Total download size:51 M
Installed size:87 M
Is this ok [y/N]: y

Now that the availability of Linux Kernel 5.x has been confirmed, you can continue to install it.

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

Install other kernel packages

sudo dnf --enablerepo=elrepo-kernel install kernel-ml-{devel,headers}

Step 4: Boot to Linux Kernel 5.4 on CentOS 8

After installing Linux Kernel 5.4 on CentOS 8, you need to reboot the system.

sudo reboot

Select kernel 5.x in the grub menu.

After the operating system starts, run the uname command to confirm the kernel version that the operating system is running.

$ uname -a
Linux cent01 5.7.4-1.el8.elrepo.x86_64 #1 SMP Thu Jun 1810:07:20 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux

Of course, you may need to take further steps to confirm that all OS functions are operating as expected.

Uninstall Kernel 5.x on CentOS 8

You can use the dnf command to remove Linux Kernel5.x from a CentOS 8 computer at any time.

First boot to the default operating system version of the Linux kernel.

Confirm the currently installed kernel.

$ uname -r
4.18.0- 80. el8.x86_64

Then delete the installed Kernel5.x from ELRepo.

sudo dnf remove kernel-ml kernel-ml-{devel,headers}

Confirm removal.

Dependencies resolved.========================================================================================================================================================
 Package                                    Arch                       Version                                 Repository                          Size
========================================================================================================================================================
Removing:
 kernel-ml                                  x86_64                     5.7.4-1.el8.elrepo                      @elrepo-kernel                       0  
 kernel-ml-devel                            x86_64                     5.7.4-1.el8.elrepo                      @elrepo-kernel                      50 M
 kernel-ml-headers                          x86_64                     5.7.4-1.el8.elrepo                      @elrepo-kernel                     5.0 M
Removing unused dependencies:
 kernel-ml-core                             x86_64                     5.7.4-1.el8.elrepo                      @elrepo-kernel                      64 M
 kernel-ml-modules                          x86_64                     5.7.4-1.el8.elrepo                      @elrepo-kernel                      23 M
 perl-Carp                                  noarch                     1.42-396.el8                            @BaseOS                             41 k
 perl-Errno                                 x86_64                     1.28-416.el8                            @BaseOS                            9.3 k
 perl-Exporter                              noarch                     5.72-396.el8                            @BaseOS                             54 k
 perl-File-Path                             noarch                     2.15-2.el8                              @BaseOS                             63 k
 perl-IO                                    x86_64                     1.38-416.el8                            @BaseOS                            137 k
 perl-PathTools                             x86_64                     3.74-1.el8                              @BaseOS                            179 k
 perl-Scalar-List-Utils                     x86_64                     3:1.49-2.el8                            @BaseOS                            122 k
 perl-Socket                                x86_64                     4:2.027-3.el8                           @BaseOS                            124 k
 perl-Text-Tabs+Wrap                        noarch                     2013.0523-395.el8                       @BaseOS                             24 k
 perl-Unicode-Normalize                     x86_64                     1.25-396.el8                            @BaseOS                            623 k
 perl-constant                              noarch                     1.33-396.el8                            @BaseOS                             26 k
 perl-interpreter                           x86_64                     4:5.26.3-416.el8                        @BaseOS                             14 M
 perl-libs                                  x86_64                     4:5.26.3-416.el8                        @BaseOS                            5.8 M
 perl-macros                                x86_64                     4:5.26.3-416.el8                        @BaseOS                            5.1 k
 perl-parent                                noarch                     1:0.237-1.el8                           @BaseOS                            9.0 k
 perl-threads                               x86_64                     1:2.21-2.el8                            @BaseOS                            107 k
 perl-threads-shared                        x86_64                     1.58-2.el8                              @BaseOS                             76 k

Transaction Summary
========================================================================================================================================================
Remove  22 Packages

Freed space:163 M
Is this ok [y/N]: y

Recommended Posts

Detailed method of installing Kernel 5.x kernel version on CentOS 8 system
Detailed tutorial of installing nginx on centos8 (graphic)
Detailed tutorial on installing JDK8 on Linux system (CentOS7 installation)
Tutorial diagram of installing CentOS 8 (1905) system on VMware virtual machine
Detailed tutorial on installing MySQL 8 in CentOS 7
Some basic optimizations of Centos6.9 system (updated on 2018/04/19)
Detailed explanation of building Hadoop environment on CentOS 6.5
The latest method of installing Mongodb on Ubuntu 16.04
Detailed explanation of Centos 7 system virtual machine bridging mode
Detailed installation steps of CentOS6.4 system in virtual machine
Detailed steps to install centos on vmware10.0 cracked version
Install ElasticSearch 7.x on CentOS 7
Deployment of graphite on centos7
CentOS 6.X system initialization script
CentOS 8 installation of MariaDB detailed tutorial
Detailed use of nmcli in CentOS8
Three methods of Centos kernel upgrade
CentOS6 mininal install CouchDB2 detailed version
CentOS 7.X system installation and optimization
001. Installation of enterprise-level CentOS7.6 operating system
CentOS deployment method of flask project
CentOS8 Chinese input method (2020-10-31 latest version) installation method
Detailed tutorial on installing python3.7 for ubuntu18
Concise summary of Ceph deployment on Centos7
CentOS7 system increase swap operation method example
CentOS7 build FastDFS distributed file system (on)
Linux kernel compilation and CentOS system installation
Install mysql8.0.13 version under Linux CentOS7 system
Centos install the latest version of cmake
Method of installing django module in python
Detailed tutorial for installing CUDA9.0 on Ubuntu 16.04
Detailed tutorial for installing phpMyAdmin on Ubuntu 18.04
CentOS8 yum/dnf configuration method of domestic sources
Centos7 installation and deployment of Airflow detailed
[Centos8] The bumpy process of installing docker
Analysis on the method of CentOS8 virtual machine to access Windows10 host folder