Set GRUB Boot Menu Timeout to Zero on Ubuntu

Set GRUB Boot Menu Timeout to Zero on Ubuntu

The GRUB (Grand Unified Bootloader) is a critical component in the boot process of Linux systems, including Ubuntu. By default, GRUB presents a boot menu with a timeout, allowing users to choose an operating system or boot option. However, in some cases, you may prefer to skip the GRUB boot menu entirely and have the system boot directly into the default operating system. This tutorial explains how to set GRUB boot menu timeout to zero on Ubuntu.

Use the following command to edit the GRUB configuration file:

sudo sed -i 's/GRUB_TIMEOUT=10/GRUB_TIMEOUT=0/' /etc/default/grub

This command modifies the GRUB_TIMEOUT parameter in the configuration file, changing the timeout value to zero seconds.

Within the /etc/grub.d/30_os-prober file, there exists a code snippet that checks whether the GRUB timeout is set to zero. If the timeout is set to zero, the script automatically adjusts it to 10 seconds. To disable this behavior, the quick_boot parameter can be changed from 1 to 0. This adjustment ensures that the GRUB timeout remains at zero, preventing any automatic changes to a 10-second timeout.

sudo sed -i 's/quick_boot="1"/quick_boot="0"/' /etc/grub.d/30_os-prober

Finally, update GRUB to apply the changes:

sudo update-grub

With these steps completed, the GRUB boot menu timeout is set to zero, and the system will boot directly into the default operating system without waiting for user input.

Leave a Comment

Cancel reply

Your email address will not be published.