How to update Linux kernel in 5 easy steps

Performing a Linux kernel update offers new features and enhancements. Here’s a quick way to update your Linux kernel.

Steps to upgrade Linux kernel

1. Make a note of the current kernel version information:

[[email protected] kernel_pkg]# uname -r
[[email protected] kernel_pkg]#

Suggest to take HW and server software information using cfg2html in case of future needs.

2. Download the latest kernel package from the yum server.

Make sure the system is connected to the RHN.

[[email protected] tmp]# yum install --downloadonly --downloaddir=/tmp/kernel_pkg/ kernel
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:3.10.0-514.10.2.el7 will be installed
--> Processing Dependency: linux-firmware >= 20160830-49 for package: kernel-3.10.0-514.10.2.el7.x86_64
--> Running transaction check
---> Package linux-firmware.noarch 0:20160830-49.git7534e19.el7 will be installed
--> Processing Conflict: kernel-3.10.0-514.10.2.el7.x86_64 conflicts kmod < 20-9
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package kmod.x86_64 0:20-5.el7 will be updated
---> Package kmod.x86_64 0:20-9.el7 will be an update
--> Processing Conflict: kernel-3.10.0-514.10.2.el7.x86_64 conflicts xfsprogs < 4.3.0
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package xfsprogs.x86_64 0:3.2.2-2.el7 will be updated
---> Package xfsprogs.x86_64 0:4.5.0-9.el7_3 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
Package Arch Version Repository Size
kernel x86_64 3.10.0-514.10.2.el7 rhui-REGION-rhel-server-releases 37 M
kmod x86_64 20-9.el7 rhui-REGION-rhel-server-releases 115 k
xfsprogs x86_64 4.5.0-9.el7_3 rhui-REGION-rhel-server-releases 895 k
Installing for dependencies:
linux-firmware noarch 20160830-49.git7534e19.el7 rhui-REGION-rhel-server-releases 31 M
Transaction Summary
Install 1 Package (+1 Dependent package)
Upgrade 2 Packages
Total download size: 70 M
Background downloading packages, then exiting:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/4): xfsprogs-4.5.0-9.el7_3.x86_64.rpm | 895 kB 00:00:01
(2/4): kmod-20-9.el7.x86_64.rpm | 115 kB 00:00:01
(3/4): linux-firmware-20160830-49.git7534e19.el7.noarch.rpm | 31 MB 00:00:01
(4/4): kernel-3.10.0-514.10.2.el7.x86_64.rpm | 37 MB 00:00:03
Total 23 MB/s | 70 MB 00:00:03
exiting because "Download Only" specified

In the above command, we have just downloaded the kernel packages required in / tmp / kernel_pkg by specifying a variant of the -downloaddir = parameter for the Yum command. According to the uploaded files, the new version will be “3.10.0-514.10.2.”

3. Update the Linux kernel

After you have successfully downloaded the latest kernel RPMs. Go to this directory. According to RedHat, please don’t use the option -U with the rpm command to update the Linux kernel, as this will overwrite the currently installed kernel, which will create a bootloader problem later.

Related Posts