Updated: 19 November 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9
CentOS 6 and its GRUB 0.97 "fallback" setting are long obsolete. Current systems use GRUB 2, where the same safety net works with a one-time boot entry. These steps are for Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9.
How it works
GRUB boots the saved default entry. You tell GRUB to try a new kernel once. If it works, you make it the default. If it hangs or panics, the next restart boots the old default again.
AlmaLinux / Rocky Linux 9
- List the kernels and their index numbers:
grubby --info=ALL | grep -E "^(index|kernel)" - Make sure the current, working kernel is the default:
grubby --default-kernel - Let a kernel panic restart the server automatically after 10 seconds:
grubby --update-kernel=ALL --args="panic=10" - Boot the new kernel once (index 0 in this example):
grub2-reboot 0 && reboot - If the server comes back on the new kernel (
uname -r), make it the default:grubby --set-default /boot/vmlinuz-<new-version>. If it did not boot, restart it (on a Ucartz VPS: Stop and Start in the VPS dashboard) and it starts the old kernel.
Ubuntu 24.04 / Debian 12
- In
/etc/default/grubsetGRUB_DEFAULT=savedand addpanic=10toGRUB_CMDLINE_LINUX, then runupdate-grub. - Save the working kernel as default:
grub-set-default "Advanced options for Ubuntu>Ubuntu, with Linux 6.8.0-45-generic"(use the names fromgrep -E "menuentry|submenu" /boot/grub/grub.cfg). - Try the new kernel once:
grub-reboot "Advanced options for Ubuntu>Ubuntu, with Linux 6.8.0-50-generic" && reboot.