📖 ~1 min read
Table of contents
Symptom & Impact
System repeatedly boots an undesired kernel, complicating rollback and incident recovery.
Environment & Reproduction
Occurs when GRUB timeout style hides menu and default entry remains unchanged.
cat /etc/default/grub
uname -r
Root Cause Analysis
GRUB configuration hides menu and saved default entry points to a non-preferred kernel.
Quick Triage
Inspect GRUB defaults, available menu entries, and boot history.
grep -E 'GRUB_(TIMEOUT|TIMEOUT_STYLE|DEFAULT|SAVEDEFAULT)' /etc/default/grub
grep 'menuentry ' /boot/grub/grub.cfg | head -n 20
Step-by-Step Diagnosis
Identify target kernel menu index and current saved GRUB entry.
sudo grub-editenv list
grep -n 'menuentry ' /boot/grub/grub.cfg | head -n 30

Solution – Primary Fix
Enable menu display and set explicit default kernel entry.
Still having issues? Our Server Management team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo sed -i 's/^GRUB_TIMEOUT_STYLE=.*/GRUB_TIMEOUT_STYLE=menu/' /etc/default/grub
sudo sed -i 's/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=5/' /etc/default/grub
sudo grub-set-default 'Advanced options for Ubuntu>Ubuntu, with Linux '
sudo update-grub

Solution – Alternative Approaches
Use one-time kernel boot for testing without changing persistent default.
sudo grub-reboot 'Advanced options for Ubuntu>Ubuntu, with Linux '
Verification & Acceptance Criteria
GRUB menu appears and selected kernel persists across reboot.
sudo reboot
uname -r
Rollback Plan
Restore previous /etc/default/grub values and regenerate config.
sudo cp /etc/default/grub.bak /etc/default/grub
sudo update-grub
Prevention & Hardening
Keep at least one known-good kernel and document kernel pinning policy.
dpkg -l | grep linux-image
apt-mark showhold
Related Errors & Cross-Refs
Related to unattended-upgrades kernel transitions and initramfs regressions.
Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.
View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu GRUB administration and kernel rollback best practices.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.