Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

When upgrading the kernel package on CentOS or RHEL 6, is it possible to load the new kernel without rebooting?

My gut tells me it's not, but if it were, it'd be handy - especially when compiling applications that require kernel modules (like VirtualBox, for example) that complain when the "wrong" kernel source is available (eg the running kernel is 2.6.2-100 but the upgraded one is 2.6.2-152).

share|improve this question

6 Answers 6

up vote 3 down vote accepted


kexec will allow you to skip the firmware (BIOS/EFI) and bootloader steps of a standard restart, but this is not the same thing (though useful if you have a slow loading RAID card).

The closest you can get is loading and unloading kernel modules.

share|improve this answer
that's a shame :| .. thanks, though :) –  warren Jan 18 '12 at 23:06
"loading and unloading kernel modules" - can you actually load kernel-modules of a newer kernel? Sounds tricky to me. –  Nils Mar 7 '12 at 20:17
Didn't mean to imply the loading of modules from newer kernel, just modules that may not have been built on the same version. –  84104 Mar 7 '12 at 21:05

Oracle Enterprise Linux can do that with KSplice, but you have to have an oracle ULN (support) contract for it. I believe they are about $120.

share|improve this answer

Yes for RHEL. (Since Feb 22, 2012)

Oracle Offers Free Trial of Innovative Ksplice Zero-Downtime Updates to Red Hat Customers

To continue after the 30 day trial, you need to purchase the Oracle Linux Premier Support package.

Pricing starts at $1,400 for systems with two physical CPUs and $2,300 for systems with more than two physical CPUs. You can configure your systems to automatically install updates as they become available.

It had been offered for both RHEL and CentOS (as well as other operating systems) prior to July, 2011 when Oracle acquired Ksplice. Prior customers are still supported.
Oracle buys Ksplice

The Ksplice code was created and distributed under the GPL v2 and other open source licenses. After Oracle acquired Ksplice and limited availability to Oracle Linux, Ubuntu Desktop, and Fedora, there was discussion about maintaining a CentOS fork of Ksplice:
Ksplice and CentOS

It was also argued that Ksplice was violating the GPL:
Ksplice currently violates the GPL

share|improve this answer

Nobody pointed to kpatch. It not live kernel reload, but targeted same problem.

kpatch Red Hat technology to apply patches to live kernel.

With respect to granularity, kpatch works at the function level; put simply, old functions are replaced with new ones. It has four main components:

  • kpatch-build: a collection of tools which convert a source diff patch to a hot patch module. They work by compiling the kernel both with and without the source patch, comparing the binaries, and generating a hot patch module which includes new binary versions of the functions to be replaced.
  • hot patch module: a kernel module (.ko file) which includes the replacement functions and metadata about the original functions.
  • kpatch core module: a kernel module (.ko file) which provides an interface for the hot patch modules to register new functions for replacement. It uses the kernel ftrace subsystem to hook into the original function’s mcount call instruction, so that a call to the original function is redirected to the replacement function.
  • kpatch utility: a command-line tool which allows a user to manage a collection of hot patch modules. One or more hot patch modules may be configured to load at boot time, so that a system can remain patched even after a reboot into the same version of the kernel.

Supported from RHEL 7

share|improve this answer
But the OP is asking about loading an entire new kernel, not replacing modules or functions. –  Michael Martinez 7 hours ago
Yes. But other question marked as duplicate ( ask about kernel update. I expect, kernel reloaded in live not just for fun, but to be updated and keep uptime. –  mmv-ru 5 hours ago
I'm sure no one else mentioned it because the OP is from 2012 .. and this is only supported in RHEL7 :) –  warren 2 hours ago

KExec claims that you can do exactly that.

share|improve this answer
how does kexec work, and can it be automated to fire as soon as a kernel is upgraded? –  warren Jan 18 '12 at 22:17
From the link @monksy gave: "Essentially, kexec is a fast reboot feature that lets you reboot to a new Linux kernel -- without having to go through a bootloader." No mention of it being automated, it seems unlikely based on this statement: "Unlike the normal reboot process, kexec does not perform a clean shutdown of the system before rebooting. It is left to you to kill all applications and unmount file systems before attempting a kexec reboot." –  codewaggle May 19 '12 at 19:50
kexec was mostly aimed at industrial linux systems and got prominent via carrier gracde linux project. those are specialized / hardened distros for professionals and half-ass desktop/server distros like RHEL (for years) didn't make full use of kexec. OpenSUSE started like 3 years ago to skip the reboot after installing the OS. now in RHEL7 you can actually do it, too. I hope this kind of explains why kexec might have been there for 10 years but you couldn't just "use" it to do the 'fast reboot' it was intended for. –  Florian Heigl May 1 at 11:27
I would say this most certainly does not satisfy the OP's requirement of "not rebooting." In fact it only shifts the burden of reboot to the user instead of the init/systemd scripts ... And more importantly, it should be noted this does not replace the entire kernel, it's only for applying patches to pieces of the kernel. –  Michael Martinez 7 hours ago

Actually, I just re-read this Oracle Blog post:

So, as long as you use the UEK kernel, you can do the kexec fast reboot on OEL5 and OEL6. This is not related to ksplice (which is about not rebooting in the first place!) and not needed a license or anything to use.

share|improve this answer
Fast reboot is not the same as no reboot. –  Michael Martinez 7 hours ago

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.