Live Kernel Updates Without Downtime in New RHEL 8.1, 7.7 and 7.6 Release
How to’s
Kpatch’s patch Red Hat Package Manager (RPM) will be delivered via the Red Hat CDN network for specific kernel versions. Check the current kernel version and its kpatch-patch availability:# uname -r # yum search "kpatch-patch = $(uname -r)"Install Kpatch for the installed kernel:
# yum install "kpatch-patch = $(uname -r)"If no Kpatch updates are available, then Kpatch RPM will have the trailing name of 0-0 while a 1_1 pattern indicates active patches to be patched. For a 0-0 name package, an empty package (without any changes or effect ) will be installed. Verify kernel live patch is installed:
# kpatch list Loaded patch modules: kpatch_3_10_0_1062_1_1 [enabled] Installed patch modules: kpatch_3_10_0_1062_1_1 (3.10.0-1062.el7.x86_64)1_1 indicates active patches installed in the above kernel. The above process needs to be installed for every new kernel or new Kpatch per specific Kpatch released. Whenever the system reboots with the same kernel, it will be patched again with the patches from the /var/lib/kpatch/ directory by Kpatch service. Kpatch RPM can be updated with cumulative kernel patch modules just like any other RPM package.
# yum update kpatch-patch-*To disable live kernel patching, remove kpatch-patch package for the specific kernel. Existing patches will remain active in the loaded kernel until the next reboot. Once modules or the RPM are removed, they will no longer be patched after the reboot by Kpatch service. To remove a specific Kpatch module from the loaded kernel, the below commands can be used:
# kpatch list Loaded patch modules: kpatch_3_10_0_1062_1_1 [enabled] Installed patch modules: kpatch_3_10_0_1062_1_1 (3.10.0-1062.el7.x86_64) # kpatch uninstall kpatch_3_10_0_1062_1_1 uninstalling kpatch_3_10_0_1062_1_1 (3.10.0-1062.el7.x86_64)A Reboot is required to unload modules completely from the running kernel. To disable the Kpatch patching solution, you can disable Kpatch service by systemctl. This will disable the loading of Kpatches on reboot globally.
# systemctl disable kpatch.service Removed /etc/systemd/system/multi-user.target.wants/kpatch.service.A reboot is required to unload the module completely from the running kernel after disabling the service.
On this page
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
Interesting happenstance when installing Ansible dependencies in a MySQL Docker container
Interesting happenstance when installing Ansible dependencies in a MySQL Docker container
Jun 25, 2018 12:00:00 AM
5
min read
Part Two: Deploying High Available Applications in Oracle Cloud Infrastructure: Application Machine

Part Two: Deploying High Available Applications in Oracle Cloud Infrastructure: Application Machine
Aug 30, 2021 12:00:00 AM
11
min read
Creating a custom Oracle EBS preinstall RPM for RHEL7
Creating a custom Oracle EBS preinstall RPM for RHEL7
Feb 12, 2019 12:00:00 AM
1
min read
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.