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

VPS no go boot after kernel update: how to fix am

VPS no dey boot after kernel update? Use provider console, select the previous kernel in GRUB, then fix initramfs or LVM errors before rebooting again.

First thing to do when VPS no go boot after kernel update

VPS wey no go boot after kernel update usually fit recover within few minutes, because the update no delete the kernel wey work yesterday. Ubuntu installs new kernel beside the old one and only change which entry GRUB dey start by default. So the first step no be repair. Select the previous kernel for boot menu, make login prompt come back, then diagnose am from running system.

To fix this for server different from fixing laptop, because no keyboard dey attached and no monitor dey show the panic. SSH no go answer too, since the machine never reach the point wey sshd starts. Everything below go happen through your provider console.

Read your own console before you change anything. The text for that screen go show which failure class you dey face, and two servers wey both "no go boot" fit need opposite fixes.

How I go reach the console when SSH no dey work?

Open your provider control panel and find the console option. Common names na VNC console, web console, noVNC, and serial console. If both dey available, prefer serial console because e give you real text wey you fit scroll and copy. VNC view na only picture of the screen. Find this control now while the machine still dey healthy, and confirm say e dey open. If you search for am during outage, e go waste the calm wey you need. Put this check inside the first ten minutes for a new VPS, together with firewall rules and SSH keys.

Most panels also get rescue mode or recovery image. E boot small system from the provider network and attach your disk as an extra device, so nothing for your disk go run. Rescue mode na fallback when GRUB itself don break. E also be the way to copy data from server wey you don decide say you no go save.

You usually need hard reset from the panel to reach the boot menu, because you no fit run sudo reboot for machine wey you no fit log into. Hard reset dey same as cutting the power. Filesystems go get unclean shutdown, so expect filesystem check for the next boot.

How I fit choose older kernel for GRUB menu?

Watch the console from the time you press reset. Press Esc again and again for the first few seconds, or hold Shift for machine wey dey boot with legacy BIOS mode. The time window short, and console viewer often dey take one second to connect, so start pressing early and continue pressing.

When the menu show, choose "Advanced options for Ubuntu". That submenu list every kernel wey install, newest one first, with one recovery mode entry for each. Choose the second normal entry, wey be the kernel below the newest one, then press Enter. Recovery mode na different thing: e dey boot into minimal single user system, and na for repair work, no be to bring your services back online.

If the older kernel boot, your server don dey run again. Confirm the kernel wey you dey use and write the numbers down.

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

The dpkg output na your list of installed kernels. If e get only one line, you no get any fallback at all, and na the first thing you need fix.

GRUB menu no dey show. Wetin you go do now?

Cloud images dey come with config wey hide the menu. Ubuntu images commonly set the timeout to 0 for file under /etc/default/grub.d/, so the newest kernel go start immediately and you no get anything to press.

The opposite fit also happen: menu dey show for screen and dey wait, so e look like system hang. GRUB record say boot fail, and for the next start e fit keep the menu open until person press key. For machine wey no get keyboard, that wait no go ever finish. If your console show menu and nothing dey move, na this happen. Select one entry and continue.

Fix both things while the machine still healthy, and no put the settings for /etc/default/grub on cloud image. When update-grub run, Ubuntu GRUB read /etc/default/grub first, then e read every .cfg file for /etc/default/grub.d/ according to sorted order. The image's 50-cloudimg-settings.cfg go read after your edit, set the values again, and win. Create a drop-in wey name go sort after that file, like /etc/default/grub.d/99-console-menu.cfg:

GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_RECORDFAIL_TIMEOUT=10
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0,115200"

This file replace GRUB_CMDLINE_LINUX_DEFAULT completely, so first copy any arguments wey the image already set for 50-cloudimg-settings.cfg into your line, then add the console= ones. Apply am and check say your file na the last one wey set each value, because na the last assignment GRUB dey use.

sudo update-grub
grep -E 'TIMEOUT|TERMINAL' /etc/default/grub /etc/default/grub.d/*.cfg

GRUB_TERMINAL="console serial" send the menu go graphical console and serial port, so e go show for whichever viewer your panel provide. The console= kernel arguments do the same thing for boot messages wey follow. Ten seconds delay for each boot na small price to pay for menu wey you fit actually reach at 2am.

Moi failure class I dey face?

Read the last twenty lines before the console stop to move. Four patterns cover most things wey fit happen after kernel update.

GRUB no fit find its own files. You go see a grub rescue> prompt, or error about partition or file wey no dey exist, and no kernel message go ever show. Kernel never enter the matter yet. This one dey follow disk or partition change, or bootloader wey dem write to wrong device, instead of kernel package by itself.

Kernel start but e no fit mount root. Kernel messages go scroll, then you go land for busybox shell wey prompt be (initramfs), or boot go end with panic say e no fit mount root filesystem. Kernel load successfully. The initramfs, wey be the small temporary root wey dey find and mount your real root filesystem, no find the disk. For Ubuntu, this shell normally dey come after message say e don give up waiting for root device, and the message go name the UUID wey e dey expect. Copy that UUID and compare am with blkid output later.

Logical volume no show at all. This na the previous class with one specific cause. For the (initramfs) prompt, run ls /dev/mapper. If the only entry na control, no LVM (logical volume manager) volume activate, so root device never exist yet. Bring the volume groups up by hand:

lvm vgchange -ay
ls /dev/mapper
exit

exit go hand control back to the initramfs script, wey go retry the mount. If system boot after that, the new initramfs dey miss the LVM components, and the repair na to rebuild that image instead of touching the kernel.

Nothing from Linux at all. Console go show firmware text, a UEFI (unified extensible firmware interface) shell, blank screen with no kernel output, or reset loop. The failure dey happen before Linux run. Check which mode your server actually dey use after you don come back up, because many VPS instances dey boot for legacy BIOS mode and dem never touch the EFI path:

[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS
mountpoint /boot/efi
sudo efibootmgr -v

An unmounted /boot/efi during the upgrade na common cause for UEFI machines, because the packages wey maintain the EFI system partition go write to ordinary empty directory instead. Firmware go continue to start the old boot entry until that entry stop matching wetin dey on disk.

One more pattern no be boot failure at all. If you reach root shell wey talk say system dey emergency mode, kernel don boot and userspace stop. Most times, na bad line for /etc/fstab or filesystem wey fail its check cause am. Run journalctl -xb for that shell and read the name of the unit wey fail.

Kernel package dey spoil, or na initramfs?

These two fit look the same for console, but repair wey each one need different. Boot the old kernel, then compare the files.

ls -l /boot/vmlinuz-* /boot/initrd.img-*
df -h /boot

You need one vmlinuz- and one matching initrd.img- for every installed version, and each one suppose get believable size. If initrd no dey, or e much smaller pass the ones around am, initramfs generation don fail. The usual reason na full /boot, and package logs get the evidence:

sudo grep -iE 'no space|update-initramfs' /var/log/apt/term.log
sudo tail -n 40 /var/log/apt/history.log

history.log still dey list exactly which packages the last runs install and when dem install am. This go settle any argument about wetin change.

Free space first if /boot full. Then rebuild the image for the version wey you need and refresh the menu. Take the version string from your own ls output, because the placeholder below no be real release:

KVER=6.8.0-XX-generic
sudo update-initramfs -c -k "$KVER"
sudo update-grub
ls -l /boot/initrd.img-$KVER

That last ls na the check. File wey get normal size mean say the image don dey there now. But if the kernel image itself damage, or dpkg -l show the package for any state apart from ii, reinstall the package:

sudo apt install --reinstall linux-image-$KVER
sudo dpkg --configure -a

Repair wey you do from rescue mode when no kernel boot

If every entry for the menu fail, boot the provider rescue image and repair the disk from outside. Your disk go show as an unmounted device, so nothing for inside am dey run and nothing fit interfere with you.

Full chroot repair sequence

Run lsblk -f first and read the real device names from your own machine. /dev/vda common for KVM, and Ubuntu server installs often put root for LVM as /dev/ubuntu-vg/ubuntu-lv.

sudo lsblk -f
sudo vgchange -ay
sudo mount /dev/ubuntu-vg/ubuntu-lv /mnt
sudo mount /dev/vda2 /mnt/boot
sudo mount /dev/vda1 /mnt/boot/efi

Skip the lines wey no apply to you. Plenty images no get separate /boot and no EFI partition. Then bind the kernel interfaces inside, and enter the system:

for d in dev proc sys run; do sudo mount --rbind /$d /mnt/$d; done
sudo chroot /mnt /bin/bash

Inside the chroot, you dey work on the broken system while healthy kernel dey run underneath am. Do the repair there:

df -h /boot
update-initramfs -u -k all
update-grub
grub-install /dev/vda
exit

grub-install dey take the whole disk for BIOS system, no be partition. For UEFI system use grub-install --target=x86_64-efi --efi-directory=/boot/efi for x86_64, and replace x86_64-efi with i386-efi or arm64-efi for those architectures. Confirm say that directory dey mounted before you run am. Leave with exit, unmount everything with sudo umount -R /mnt, then switch the panel back to normal boot and restart.

Test new kernel without risking the next boot

GRUB fit start one entry one time, then fall back to the default wey you choose. Point the default to kernel wey you trust, then launch the new one for only one boot. If e fail, hard reset from the panel go return you to the good kernel without any console timing wahala, as long as GRUB fit write to its environment block during boot.

Set GRUB_DEFAULT=saved inside /etc/default/grub.d/99-console-menu.cfg, run sudo update-grub, then list the entry titles so you fit name one exactly:

grep -E "(menuentry|submenu) " /boot/grub/grub.cfg | cut -d"'" -f2
sudo grub-set-default "Advanced options for Ubuntu>Ubuntu, with Linux 6.8.0-XX-generic"
sudo grub-editenv list
sudo grub-reboot 0
sudo reboot

grub-editenv list suppose print the title wey you choose as saved_entry. This output confirm the saved default, but e no prove say GRUB fit write to /boot/grub/grubenv during boot. If the environment block dey on LVM or MDRAID and GRUB no fit write to am, the one-time entry go remain selected after reboot instead of falling back. Entry 0 na the top of the menu, wey be the newest kernel. Titles safer pass numbers here, because numbers dey change every time you install or remove a kernel.

Why autoremove dey risky for headless box

APT dey protect kernel packages make automatic removal no touch dem. Read your configuration:

apt-config dump | grep -E 'Protect-Kernels|NeverAutoRemove|VersionedKernelPackages'
dpkg -l 'linux-image-*' | grep -c '^ii'

Current APT defaults dey protect two kernels: the kernel wey dey run and the latest one, or the second latest one when the running kernel already be the latest. Older installations still dey use generated /etc/apt/apt.conf.d/01autoremove-kernels file. The trap na to trust the protected set without checking the versions wey dey inside am. Before you run sudo apt autoremove --purge, read the proposed removals and confirm say the kernel wey you trust go remain installed.

Keep two kernels as the minimum, and three when /boot get enough space. Remove old ones by name after you check uname -r, so you no fit ever delete the one wey dey run:

uname -r
sudo apt purge linux-image-6.8.0-XX-generic
dpkg -l 'linux-image-*' | grep '^ii'

Run that last command again afterwards. If the count drop from three to two, na cleanup. If the count drop to one, na outage wey dey wait for the next reboot.

Take snapshot before upgrade

Snapshot wey you take before apt upgrade na the only recovery path wey no depend on booting anything. When you restore am, e go put the disk back to the state wey the old kernel still be the default, and you fit retry the upgrade while console don already open. Snapshot of machine wey dey run dey crash consistent. This mean say e capture the disk as if power cut happen. So, shut down the server first when your provider support offline snapshot. Snapshot no be backup too, because e usually dey for the same infrastructure as the volume wey e copy. Understanding the difference between VPS snapshots and real backups go decide which one fit save you when the failure pass kernel problem.

This one matter pass during release upgrade, because kernel, initramfs tools, bootloader, and GRUB config all change for one run. Take the snapshot immediately before you start an Ubuntu 24.04 to 26.04 upgrade, no be the night before. This make the restore point match the machine wey you wan change. LTS to LTS jump dey wait for the first point release, 26.04.1; Ubuntu announce say upgrades from 24.04 LTS to 26.04.1 LTS dey enabled on 29 September 2026. If your server still dey report say no new release dey available, check the machine own configuration with the do-release-upgrade no new release checks.

How unattended-upgrades dey handle kernel packages

Ubuntu unattended-upgrades dey install security updates without asking, and kernel packages dey come through the security pocket like every other package. Two things follow from this.

First, the new kernel don install but e never dey run. Kernel only takes effect when system boot. The file /var/run/reboot-required go show, and /var/run/reboot-required.pkgs go tell you wetin request the reboot, but unattended-upgrades no go reboot the machine unless the effective Unattended-Upgrade::Automatic-Reboot setting dey true. Put local overrides inside separate APT configuration fragment wey sorts after 50unattended-upgrades, like /etc/apt/apt.conf.d/52unattended-upgrades-local.

cat /var/run/reboot-required.pkgs
apt-config dump | grep -E 'Automatic-Reboot|Blacklist'

Second, that gap fit hide the cause. Server fit install kernel for March and reboot for June because of completely unrelated reason, then fail to come up. The change wey break the boot don old for three months, so nothing wey you do that day go explain am. /var/log/apt/history.log na where you go find the run wey install the kernel wey dey cause the current failure.

Reboot deliberately, for the day wey you choose, with the console window already open. That one habit fit turn mystery outage into two-minute menu selection. If you want the automation without surprise, leave automatic installs on and automatic reboots off, then check how to configure unattended-upgrades for Ubuntu for the exact settings. Holding linux-image-generic with sudo apt-mark hold linux-image-generic go prevent that metapackage from upgrading; e no go hold every kernel package or kernel flavour. Blocking kernel updates go also block their security fixes, so treat am as trade-off wey you don decide to accept, not as safety measure.

FAQ

How I fit boot older kernel for VPS wey no get keyboard?

Open provider console (VNC or serial), then trigger hard reset from control panel, because you no fit log in make you reboot am cleanly. As machine dey restart, press Esc again and again, or hold Shift during legacy BIOS boot, to keep GRUB menu open. Choose "Advanced options for Ubuntu", then select the entry under the newest kernel. Once login prompt show, run uname -r to confirm the kernel wey you dey use and dpkg -l 'linux-image-*' to see wetin else dey installed. Diagnose only after system don run again.

Why my VPS no dey show GRUB menu at all?

Cloud images commonly set GRUB timeout to 0 for /etc/default/grub.d/50-cloudimg-settings.cfg, so newest kernel go start without anything wey you fit press. Editing /etc/default/grub no go fix am, because Ubuntu's GRUB dey read the files inside /etc/default/grub.d/ after the main file, and the image setting na the one wey win. Put GRUB_TIMEOUT=10, GRUB_TIMEOUT_STYLE=menu, and GRUB_TERMINAL="console serial" inside a drop-in wey sorts later, like /etc/default/grub.d/99-console-menu.cfg, then run sudo update-grub. Verify with grep TIMEOUT /etc/default/grub /etc/default/grub.d/*.cfg. The last listed file wey sets a value na the one GRUB dey use.

I suppose remove old kernels to free space for /boot?

Remove the oldest ones, but keep at least two. If /boot full, na failure mode by itself, because initramfs generation go fail and you go remain with kernel wey no get working image. After you check uname -r, purge by exact package name, so the running kernel no go become candidate. Before you accept sudo apt autoremove --purge for headless machine, compare the proposed removals with the kernel wey you trust. Current APT dey protect two kernels by default, but this no guarantee say e go keep the particular older version wey you need.

Unattended-upgrades fit break my boot?

E fit install kernel wey later fail to boot, but e no go restart the machine unless effective Unattended-Upgrade::Automatic-Reboot setting dey true, no matter which APT configuration file supply am. The usual pattern na delayed failure: kernel land during automatic run, /var/run/reboot-required appear, and the problem only show when you reboot again weeks later. Reboot deliberately with console already open, then read /var/log/apt/history.log to find which run install the kernel wey you dey boot.

Dis article help you?