Software & AppsOperating SystemLinux

Why Did My Grub Timeout Change to 30 Seconds After Upgrading?

Ubuntu 18

Understanding the GRUB Timeout Change

After upgrading your system, you may have noticed that the GRUB menu now appears on every boot with a 30-second timeout. This is a significant change if your GRUB menu was previously hidden. This issue has been reported as a bug and has been fixed, but the fix may not be available for all systems, particularly those using UEFI and LVM. In this article, we will explore why this happens and how to address it.

Quick Answer

After upgrading your system, the GRUB timeout may change to 30 seconds due to a bug in the GRUB-related packages. This bug causes the GRUB menu to appear on every boot, regardless of previous settings. To address this issue, you can modify the GRUB configuration file or header file. However, these are temporary solutions and the bug may reappear after future upgrades. It is recommended to keep an eye on the bug report for updates on the fix.

Understanding GRUB

The GRand Unified Bootloader (GRUB) is a boot loader package from the GNU Project. GRUB is the reference implementation of the Free Software Foundation’s Multiboot Specification, which provides a user the choice to boot one of multiple operating systems installed on a computer or select a specific kernel configuration available on a particular operating system’s partitions.

The GRUB Timeout Issue

The GRUB timeout is the period that the system waits for user input before booting into the default operating system. The timeout is typically set to a short duration to speed up the boot process. However, after certain upgrades, the GRUB timeout may change to 30 seconds. This can be frustrating as it slows down the boot process.

This issue is caused by a bug in the GRUB-related packages that were upgraded. The bug causes the GRUB menu to appear on every boot, regardless of the previous settings. The bug has been reported here and a fix has been released. However, the fix may not be available for all systems, particularly those using UEFI and LVM.

Fixing the GRUB Timeout Issue

There are several ways to address the GRUB timeout issue. Here are a few methods:

Method 1: Modify the GRUB configuration file

To temporarily fix the issue, you can modify the GRUB configuration file. This can be done by running the following commands in the terminal:

sudo sh -c 'echo GRUB_RECORDFAIL_TIMEOUT=5 >> /etc/default/grub'
sudo update-grub

The sudo command is used to run the following command as the root user. The sh -c command runs the command that follows in a new shell process. The echo command prints the text that follows to the terminal. The >> operator appends the output of the command that precedes it to the file that follows it.

In this case, the command echo GRUB_RECORDFAIL_TIMEOUT=5 >> /etc/default/grub appends the line GRUB_RECORDFAIL_TIMEOUT=5 to the end of the /etc/default/grub file. This line sets the GRUB timeout to 5 seconds.

The update-grub command is used to generate the GRUB configuration file based on the /etc/default/grub file and the scripts in the /etc/grub.d/ directory.

Method 2: Modify the GRUB configuration file (alternative method)

Alternatively, you can try adding the line GRUB_RECORDFAIL_TIMEOUT=0 to the /etc/default/grub file and then running sudo update-grub. This sets the GRUB timeout to 0 seconds, effectively hiding the GRUB menu.

Method 3: Modify the GRUB header file

If the above solutions don’t work, you can try running the following commands in the terminal:

sudo sed -i "/recordfail_broken=/{s/1/0/}" /etc/grub.d/00_header
sudo update-grub

The sed command is a stream editor for filtering and transforming text. The -i option is used to edit files in place. The command /recordfail_broken=/{s/1/0/} replaces the first occurrence of 1 with 0 on each line where recordfail_broken= appears.

In this case, the command sudo sed -i "/recordfail_broken=/{s/1/0/}" /etc/grub.d/00_header changes the recordfail_broken= value from 1 to 0 in the /etc/grub.d/00_header file. This disables the recordfail feature, which is responsible for the GRUB menu appearing on every boot.

Conclusion

The GRUB timeout issue can be frustrating, but it can be addressed by modifying the GRUB configuration or header file. However, these are temporary solutions and the issue may reappear after future upgrades. It is recommended to keep an eye on the bug report for updates on the fix. If you’re not comfortable modifying system files, consider seeking help from a professional or waiting for the official fix to be released.

What is GRUB?

GRUB stands for GRand Unified Bootloader. It is a boot loader package from the GNU Project that allows users to choose between multiple operating systems installed on a computer or select a specific kernel configuration on a particular operating system’s partitions.

Why did my GRUB timeout change to 30 seconds after upgrading?

The change in GRUB timeout to 30 seconds after upgrading is caused by a bug in the GRUB-related packages that were upgraded. This bug causes the GRUB menu to appear on every boot, overriding the previous settings.

Leave a Comment

Your email address will not be published. Required fields are marked *