0

Can't reduce the countdown time from the default 30 seconds in grub 2.04. I am running a fresh Xubuntu 20.04 LTS, with the addition that I've installed newer kernel images, to get access to my CPU temperature.

What I've tried:

  • changed GRUB_TIMEOUT in /etc/default/grub
  • set quickboot to 0 and changed timeout as suggested here
  • changed GRUB_TIMEOUT_STYLE to menu and countdown as proposed in here and in another link I do not find at the moment.
  • Commented out the last line (adjust_timeout) in /etc/grub.d/30_os-prober

After all of these steps I've run sudo update-grub, which run without any error.

My /etc/default/grub file without comments:

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=countdown
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

Edit

Right after I've written the question down, I've made another try. I grep-ed all files in /etc/grub.d which had the string 30 in it. Only 00_header has it at two places. The big part of this file is a make_timeout function. This part of the script is reached only if "$recordfail_broken" = 1 or "\${recordfail}" = 1. So it indicates that something went wrong, and I probably should debug it, though I have not experienced any drawbacks yet. For the time being I've changed those values from 30 to 3.

  • 1
    Have you run update-grub which re-creates the grub.cfg file from the recorded settings? – guiverc Mar 09 '21 at 22:18
  • I have searched the web for "recordfail_broken" and had a few results. Some from them: https://askubuntu.com/questions/1120948/grub-recordfail-broken-regarding-lvm and https://askubuntu.com/questions/202309/cannot-get-grub-menu-to-timeout-or-go-away – Levente Mar 09 '21 at 22:51

2 Answers2

1

Try these commands as root

echo 'GRUB_RECORDFAIL_TIMEOUT=$GRUB_TIMEOUT' >> /etc/default/grub
update-grub

There was a regression added at some point in 18.04 that caused grub to trigger recordfail if your /boot partition was an LVM volume, IIRC.

I would have thought it would be fixed for 20.04, but I'm not sure. Here are some of the bug reports I saved

0

The GUI way: install grub customizer using the commands

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt update
sudo apt install grub-customizer

In the application navigate to general-settings>>default-boot-entry-after set it to as many seconds as you wish.