How to update running kernel without reboot? I know about Oracle ksplice but it's not free and it supports only distributions that I don't use. Are there alternatives to ksplice?
It is an old question, but it shows up on top of google, and a lot of things has changed since then. Here are ksplice alternatives as of now:
Livepatch is the technology in mainstream kernel. Canonical provides kernel livepatch service for Ubuntu 16.04 and later. It is free for up to 3 machines for personal use or up to 50 machines if you are a recognised Ubuntu Community member. If you are neither - you can use it for a fee in an Ubuntu Advantage support subscription ($225-$1,500/machine/year on physical servers, $75-$500/machine/year - on VMs), which is still cheaper than ksplice option. Unlike other solutions in the list, it allows administrators to create their own patches but it can be difficult and time-consuming work. Amazon Linux recently announced livepatch support (beta) for Amazon Linux 2 as well. No other distros offers live patching services (even though technology is integrated into the kernels) .
Kpatch is Red Hat’s own rebootless kernel live patching tool based on livepatch. It was announced in 2014. It works on RHEL and its derivative and is available as a part of the Premium support subscription ($1,299 per year).
SUSE’s Kgraft live patching solution only supports SUSE’s own Linux Enterprise Server 12. The prices start from $699/year per 2 sockets or $1,890/three years per 2 sockets. They have the longest trial period - 60 days, but there are some limitations from an architectural perspective.
KernelCare - automated live patching solution, covers most of the popular distributions, including CentOS, RHEL, Oracle Linux, Debian, Ubuntu, Amazon Linux and others. KernelCare also supports the Glibc and OpenSSL patching without a reboot. It also offers custom and fixed-date patching to meet the specific needs. A 30-day trial is available and subscription options start from $2.25/server/month for kernel patching only and $5.45/server/month for kernel and Glibc/OpenSSL package.
One alternative to
kexec(). Rather than patching the Linux kernel whilst running, this command essentially replaces the current kernel with a new one without rebooting your system.
In order for this to be available, it needs to be turned on as a compiler option in your distribution's kernel - that is, you can compile kernels without this functionality, so you'll need to check it is available and/or enable it yourself.