Linux Troubleshooting

Boot a previous kernel from GRUB

Rollback boot when the latest kernel panics or breaks drivers.

9 min read Beginner Updated 9 Jun 2026

Step-by-step guide

Work through each section in order. Stop when your issue is resolved — you do not need every step for every situation.

Warning

Booting an old kernel is a rollback tactic, not a permanent fix. Remove or pin broken kernel packages after confirming a stable boot. Keep at least one known-good kernel installed.

What you will achieve

Select a previous Linux kernel from the GRUB menu on Ubuntu or Debian when a kernel update causes boot failure, driver regression, or panic — then stabilise default boot behaviour.

1) Access GRUB at boot

Reboot and hold Shift (BIOS) or tap Esc (UEFI) during firmware splash to show the GRUB menu. On dual-boot setups, the menu may appear automatically. If hidden, edit /etc/default/grub:

GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=5

Then run sudo update-grub.

2) Choose Advanced options

Select Advanced options for Ubuntu (or Debian). You will see multiple entries per kernel version:

  • Ubuntu, with Linux 6.8.0-XX-generic — normal boot
  • ... (recovery mode) — single-user troubleshooting

Pick the previous working kernel version — one increment behind the latest is usually right.

3) Confirm boot success

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

Running kernel should match your GRUB selection. Test hardware that broke (Wi‑Fi, NVIDIA, ZFS) before declaring victory.

4) Pin default kernel temporarily

grep 'menuentry' /boot/grub/grub.cfg | head -10

Note the menu entry title. Set default in /etc/default/grub by index or saved entry:

GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 6.5.0-XX-generic"
sudo update-grub

Alternatively use GRUB_SAVEDEFAULT=true and grub-set-default after one successful manual boot.

5) Hold or remove bad kernel (after rollback works)

sudo apt-mark hold linux-image-6.8.0-XX-generic
# or once stable:
sudo apt purge linux-image-6.8.0-XX-generic

Never purge the kernel you are currently running. Remove newest broken one only after confirming old kernel boots reliably.

6) Rebuild initramfs if modules missing

sudo update-initramfs -u -k all
sudo update-grub

Needed when rollback shows mount errors or missing disk drivers — rare on stock Ubuntu but common with custom modules.

7) Document and report

If a specific kernel version breaks your hardware, file a bug against the linux package with ubuntu-bug linux on Ubuntu. Include dmesg from failed boot and note which previous kernel works — helps maintainers revert bad patches faster.

Verify

uname -r
sudo reboot   # should land on chosen default

System reaches login or SSH. Document kernel version and bug (e.g. broken NVIDIA module) for later proper fix or bug report.

Related guides

boot grub kernel