When I set up my single-boot rig, I wanted it to boot straight to the desktop. But when I tried to hide the GRUB menu in Ubuntu and Kubuntu, the system actively fought me. Instead of a clean boot, I was stuck staring at the bootloader menu, eventually getting locked into a forced 30 second countdown on every startup.
The Cause
I discovered that Ubuntu-based systems rely on hardcoded safety mechanisms that refuse to be ignored. GRUB overrides your hidden settings if os-prober detects a phantom OS entry in your NVRAM, or if it suspects a system crash via the recordfail script. Because my root partition is formatted as BTRFS without a separate ext4 /boot partition, GRUB physically lacks the ability to clear the crash flag, permanently triggering the fail-safe.
Step 1: The Basic Configuration
If you have a perfectly clean single-OS installation, this is all you should run. Open your terminal:
sudo nano /etc/default/grub
Change these lines to match exactly:
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
Save the file, run sudo update-grub, and reboot.
- If it works: You are done. The trade-off is that if you need advanced boot options later, you must manually spam the
EscorShiftkey during boot. - If the menu is still there: Move to Step 2. GRUB thinks you are dual-booting.
Step 2: Destroying Phantom UEFI Entries (os-prober)
If you previously installed Windows or another distro and wiped the drive, your motherboard's NVRAM usually keeps the dead boot entry. GRUB's os-prober sees this ghost, assumes a dual-boot, and forces the menu.
- Run
efibootmgrin your terminal and look for a dead OS (e.g., "Boot0001* Windows Boot Manager"). - Identify the four-digit hex number.
- Delete it by running:
sudo efibootmgr -b 0001 -B. Do NOT delete your active Ubuntu entry.
Force GRUB to ignore other OSes entirely. Open /etc/default/grub and add:
GRUB_DISABLE_OS_PROBER=true
Save, run sudo update-grub, and reboot.
Step 3: Bypassing the BTRFS Trap (recordfail)
If you installed your root directory (/) as BTRFS, GRUB cannot write to the filesystem during the early boot phase. Because it cannot write, it cannot change the recordfail=1 flag back to a "successful boot" state in /boot/grub/grubenv. GRUB panics and forces a 30-second fail-safe menu every single time.
I had to tell GRUB to completely ignore the safety net. Open /etc/default/grub and append this line:
GRUB_RECORDFAIL_TIMEOUT=0
Save, run sudo update-grub, and reboot.
Conclusion: Summary & Next Steps
To guarantee a single-boot system hides its menu—regardless of BTRFS write limitations or phantom UEFI entries—verify your final /etc/default/grub configuration contains these four exact lines:
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISABLE_OS_PROBER=true
GRUB_RECORDFAIL_TIMEOUT=0
