SSD Nodes Learn Hosting plans →
How to do am Matt ConnorBy Matt Connor · Updated 2026-11-06

Live kernel patching or reboot: which one VPS need?

Live kernel patching fit fix some kernel functions without reboot, but your VPS still dey boot the old kernel image. See wetin e covers and why reboot only dey wait.

What live kernel patching dey do for one VPS

Live kernel patching dey apply kernel security fixes to machine wey dey run, without reboot and without dropping connections. E load fixed copy of one function as kernel module, then redirect every call to the old function go the new copy while the server still dey serve traffic. This one mechanism explain wetin live patching good for and wetin e no fit do.

E dey buy time. E no replace reboot. Server wey dem don live patch for six months still boot from the old kernel image wey dey disk, and every one of those patches dey only for memory.

Dem often dey sell live patching as feature for managed plan. For unmanaged box, you fit enable am yourself with two commands. You suppose know this before you pay for the difference between managed and unmanaged VPS.

Live kernel patching dey work how?

Kernel get built-in live patching core, and dem compile am with CONFIG_LIVEPATCH. Check your running kernel to confirm say e get am:

grep CONFIG_LIVEPATCH /boot/config-$(uname -r)

If line dey show CONFIG_LIVEPATCH=y, e mean say dem build the kernel wey you dey run with the core inside. If e no dey, services wey use upstream live patching core no fit patch that kernel.

The redirection dey use ftrace, wey be kernel function tracer. Dem compile most kernel functions with call instruction for the very top of the function, before dem touch the arguments or stack. Ftrace dey use that call site as hook. When dem apply patch, live patching core register ftrace handler for the target function. The handler then send execution go the replacement function instead. Kernel documentation explain am clearly: "Livepatching typically needs to redirect the code at the very beginning of the function entry before the function parameters or the stack are in any way modified."

Two things follow from that statement, and both important later. Only function wey ftrace fit hook dey patchable. So, function wey dem compile without that entry call no fit patch at all. And the patching unit na the whole function, never be one line inside am.

The harder part na how to switch live system safely. If old code still dey run for one CPU stack when you swap the function, you go get mixture of old and new behaviour. Upstream Linux handle this with per-task consistency model. Kernel docs describe am as hybrid: "it uses kGraft's per-task consistency and syscall barrier switching combined with kpatch's stack trace switching." Tasks move go the new code one by one, only when kernel fit show say the task no dey inside patched function at that moment. Until every task don move, the patch dey transition.

You fit see the result by yourself. Applied patches dey appear under /sys/kernel/livepatch. Each patch get one directory, and the patched functions dey listed inside.

ls /sys/kernel/livepatch/

If the listing empty, e mean say no live patch dey loaded for memory. For fresh server, na the normal starting state.

Wetin live kernel patching no fit fix

Function bodies dey get patched. Data changes need special handling.

  • Changed data structures. Some data-structure changes fit dey handled safely with shadow variables. Dem attach separately allocated data to existing objects without changing their layout. The kernel documentation show livepatching a fix wey add a spinlock to existing structure. The kpatch project state the equivalent case directly: "Patches which modify statically allocated data are not directly supported." Shadow variables and callbacks dey available as workaround, but person must write dem separately for each patch; dem no automatic.
  • Fixes wey spread across several functions at once. A fix wey change lock ordering across one group of functions need consistency model wey safely switch every affected task to all the new versions. The fact say e span several functions no mean automatically say the fix no fit get patched.
  • Initialisation code. Functions marked __init don already run and get freed before your server come up, so nothing remain wey you fit redirect.
  • New kernel versions and new features. Live patching dey move you between patch levels inside one kernel series. E no ever move you from one series to another, and e no ever add feature. If you want something from newer series, like the changes wey land for Linux 7.1, install that kernel and boot am.
  • Userspace. Canonical state the boundary itself: "Canonical Livepatch does not patch userspace libraries like OpenSSL or glibc, because that is the responsibility of unattended-upgrades or a systems management tool." Live patched kernel beside stale OpenSSL no be patched server, so make unattended upgrades handle the userspace packages for the same box.

Ubuntu service get severity boundary too. Canonical talk say e "patches kernel vulnerabilities with critical and high Common Vulnerability Scoring System (CVSS) and Ubuntu Priority ratings." A CVE (common vulnerabilities and exposures) identifier name one flaw, while CVSS na the score wey attach to am. Medium-rated kernel CVE dey get fix for the package wey dey disk, but dem no live patch am. So e go reach your running kernel for the next reboot, and no be before then.

Wetin be the live kernel patching options?

Three main lineages dey common.

Canonical Livepatch dey come through Ubuntu Pro. Ubuntu Pro free for personal use, and Canonical talk say e "is and always will be free for personal use on up to 5 physical machines", and e fit reach 50 machines for official Ubuntu Community members. Na the documented limit as of October 2026. The free tier no dey limited to hobby machines: Canonical Ubuntu Pro FAQ talk say e cover you "and any business you own" for up to 5 physical machines, and the free tier terms talk say "The Service offering is limited to one account per company or legal entity." So small-scale commercial use dey covered. Paid subscription na for use wey pass those limits, and the FAQ describe am as large-scale commercial use. Coverage dey granted per kernel series and per flavour. E cover the general availability (GA) kernels for the supported long term support (LTS) releases plus their hardware enablement (HWE) kernels, across flavours like generic, aws, azure, gcp, oracle, ibm and lowlatency. Check your own kernel against Canonical published kernel list before you rely on am.

KernelCare, from TuxCare, na commercial agent wey cover plenty distributions, including ones wey no get first-party service. The documented install na vendor script, curl -s -L https://kernelcare.com/installer | bash, followed by /usr/bin/kcarectl --register KEY for key-based licence. The agent go then check for new patches according to its own schedule. /usr/bin/kcarectl --update go run update by hand, while kcarectl --check only check whether new patchset dey available. Read the installer before you pipe am go shell for server wey matter to you.

kpatch and kGraft na the ancestors. SUSE bring kGraft, while Red Hat bring kpatch. The live patching core for upstream Linux today na the merge of both ideas. kpatch itself dey wind down: its README talk say from Linux 6.19 "the kpatch project is deprecated and in maintenance mode", with kpatch-build being replaced by klp-build for the upstream kernel. For RHEL and its rebuilds, the tool wey you need na the distribution own service, instead of building patches by hand.

Choose based on wetin your distribution support and wetin your licence allow. Each option dey apply fixes to the running kernel, but the patching implementation no be the same.

How to enable Canonical Livepatch for Ubuntu

First, get token from your Ubuntu Pro account page. Both commands below need working outbound network access, because the client dey talk to Canonical servers to attach and fetch patches.

sudo pro attach TOKEN
sudo pro status

If you run sudo pro attach without token, e go start browser-based flow instead and print code wey you go enter for Canonical site. Attaching go automatically enable the services wey dem recommend. For current LTS release, this one include Livepatch. Use sudo pro attach --no-auto-enable if you prefer choose the services by yourself.

If Livepatch never dey on:

sudo pro enable livepatch
sudo canonical-livepatch status

The service dey run from canonical-livepatch snap, so snapd must dey work before the enable step fit finish. pro status go print table of services with their entitlement and status. canonical-livepatch status go print the detail for each kernel, and Canonical documentation show output for this format:

last check: 52 seconds ago
kernel: 5.4.0-216.236-generic
server check-in: succeeded
kernel state: ✓ kernel series 5.4 is covered by Livepatch
patch state: ✓ all applicable livepatch kernel modules applied
patch version: 113.1

Na two lines dey carry the answer. kernel state tell you whether the series wey you dey run dey covered by the service at all. This line go show bad result when you boot kernel wey Livepatch no support. patch state tell you whether the patches wey apply to that kernel don actually load. If kernel dey covered but no patches apply, e fit simply mean say no live patches dey available yet. The patch state line go separate this case from error. If kernel no dey covered, na kernel problem be that, and no client setting fit fix am.

How you fit know say reboot dey pending?

Live patching dey remove the emergency, so pending reboot no dey obvious again. You need check for am.

ls -l /var/run/reboot-required
cat /var/run/reboot-required.pkgs

Package manager dey create /var/run/reboot-required when installed package need restart before e go take effect, and new linux-image package dey create am. .pkgs file dey list the packages wey request am. If the first command answer No such file or directory, no reboot notice dey pending now. With livepatch-aware policy, Livepatch client dey remove the notice after kernel install when e confirm through coverage check say applied live patches cover the CVEs wey next-boot kernel fix, and no other package need reboot. For current Ubuntu, /var/run na symlink to /run, so either path go reach the same file.

That flag dey inside tmpfs and e reset for every boot, so confirm am against the kernel itself:

uname -r
dpkg -l 'linux-image-*' | grep ^ii

uname -r dey print the kernel wey you dey run. The second command dey print the kernel packages wey dem install for disk. If linux-image for that list dey newer than wetin uname -r report, the machine dey run old kernel, no matter wetin Livepatch status talk. Na this check matter, because live patching dey designed to make the running kernel safe, not to make am current.

For the userspace side of the same question, needrestart dey installed by default for Ubuntu Server and e dey list the running services wey still dey hold deleted library files.

sudo needrestart -r l

-r l flag pair mean "list only", so e dey report but e no dey change anything.

Why reboot no ever go away

The kernel wey dey for disk no change. Live patches dey load inside the kernel wey dey run, and dem no dey write am into boot image. So when you reboot, system go come up with whichever linux-image bootloader pick, then Livepatch client go apply again the patches wey still fit apply. Between those two moments, unpatched code dey run. Na another reason make you boot current kernel instead of old one.

Coverage fit still expire for individual kernel versions inside supported series. So even if you remain for the same series, you still need kernel updates and reboots. When coverage for the kernel wey dey run finish, the kernel state line go report am. You must install kernel wey get coverage and reboot. That one na reboot. For LTS release, newer series dey come as hardware enablement kernel, and e only dey come from the second point release onward. The first point release dey come out before later interim release exist to provide kernel from, so 26.04.1, wey come out on 27 August 2026, keep the same 7.0 GA series wey 26.04 get. 26.10 follow on 15 October 2026, 26.04.2 never release, and as of 21 October 2026, the linux-generic-hwe-26.04 package for 26.04 still dey install 7.0 kernel. So for 26.04 machine, no newer HWE series dey archive yet. But newer kernel package for the 7.0 series fit restore coverage. For 24.04, where 7.0 come as HWE kernel with 24.04.5, the replacement don already dey there. The only thing wey remain na boot wey you schedule.

Canonical Livepatch no dey live patch medium and low severity kernel fixes. Dem dey inside package for disk, and dem only reach you when you boot.

Kernels wey dey run for long time dey collect state wey patching no dey clean. Canonical own position worth quoting because e honest: Livepatch "is not a replacement for rebooting. It is a tool that gives you more control by preventing unscheduled reboots." The word wey carry the meaning there na unscheduled. You still reboot. Na you choose when.

How to schedule reboot wey go come back up

VPS reboot na one-way matter if you no fit reach console. Before you type reboot, make sure say you fit enter again if the machine no return.

  • Confirm say your provider dey give you serial console or VNC (virtual network computing) view for control panel, and open am now instead of waiting until outage happen.
  • Check free space with df -h /boot. If /boot full, kernel package fit fail while e dey write initramfs (initial RAM filesystem). This fit leave bootloader entry wey dey point to image wey never finish.
  • Keep at least one known-good older kernel installed. GRUB dey list am under "Advanced options for Ubuntu", and booting am na the fastest recovery when new kernel fail.
  • Find your provider rescue mode before you need am. If console show initramfs prompt after reboot, na there you go do the repair.

Then reboot for time wey you go dey awake:

sudo shutdown -r +5 "Kernel update, back in a moment"

This one schedule reboot for five minutes later and send message to logged-in users. sudo shutdown -c cancel am. When machine return, confirm both parts:

uname -r
sudo canonical-livepatch status

uname -r suppose report the newer kernel now, and status output suppose report say the new series dey covered. If machine no come back at all, the fault almost always dey for boot path, not network, and recovery route na the one for guide about VPS wey no go boot after kernel update.

Why e still important to clean old kernels comot

Live patching make this problem worse instead of better, because e remove the pressure to reboot while linux-image packages dey continue to install. Every kernel dey install a boot image, an initramfs, a modules tree, and usually a headers package. For small VPS wey get separate /boot partition of few hundred megabytes, three or four of dem fit fill am.

Full /boot go then stop the next kernel installation, and na so machine fit end up unable to receive the exact update wey e need. The apt autoremove path dey clear old kernels once dem qualify, but for machine wey never reboot, dem no always qualify yet, because package manager no go retire kernel wey you fit still dey run.

So check wetin dey installed, keep the running kernel and one known-good fallback, then remove the rest with this safe procedure to remove old kernels for Ubuntu. Never remove the kernel wey uname -r dey report as currently running.

FAQ

Live kernel patching mean say I no go ever reboot my VPS?

No. Live patches dey load into kernel wey dey run, and dem no dey write am inside boot image. So dem no dey update kernel package wey dey disk. Canonical talk am clearly: Livepatch "no be replacement for rebooting. Na tool wey give you more control by preventing unscheduled reboots." Coverage still dey end for individual kernel versions inside supported series, and Canonical no dey live patch medium severity kernel fixes. Schedule maintenance reboot based on interval wey you choose, instead make you wait until system force am.

How I fit check whether live kernel patching really dey apply patches?

Run sudo canonical-livepatch status and read two lines. kernel state dey report whether service cover your running kernel series, while patch state dey report whether patches for that kernel don load. You fit also check the kernel side directly with ls /sys/kernel/livepatch/. E dey list one directory for every loaded patch. Empty listing mean say nothing dey patched for memory right now, no matter wetin client talk.

Ubuntu Pro free for personal VPS?

Yes, but e get documented limit. Canonical talk say Ubuntu Pro "is and always will be free for personal use on up to 5 physical machines", and e dey increase to 50 machines for official Ubuntu Community members, as of October 2026. The same free subscription still cover small-scale commercial use. Canonical FAQ extend am to you "and any business you own" inside that machine limit. Na use wey pass the limit, which the FAQ describe as large-scale commercial use, need paid subscription. You attach machine with sudo pro attach TOKEN using token from your Ubuntu Pro account page, then enable the service with sudo pro enable livepatch.

Why kernel CVE still dey listed as unfixed after Livepatch run?

Usually, na one of two reasons. The fix fit dey below the severity threshold, because Canonical live patch "kernel vulnerabilities with critical and high Common Vulnerability Scoring System (CVSS) and Ubuntu Priority ratings", and leave the remaining fixes for package wey dey disk. Or the fix fit no safe to apply to kernel wey dey run. Data-structure changes need individual assessment, because shadow variables fit safely handle some changes to existing objects. Both cases get the same solution: install the updated kernel package and boot into am.

Wetin live kernel patching no cover at all?

Userspace. Canonical talk am clearly: Livepatch "does not patch userspace libraries like OpenSSL or glibc, because that is the responsibility of unattended-upgrades or a systems management tool." E also no fit deliver new kernel version or new feature, because e only replace function bodies inside the series wey you dey run already. And e no fit patch __init functions, because dem don run and memory don free dem before server come up.

Dis article help you?