[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GRUB 2.06 doesn't seem to obey GRUB_TIMEOUT and GRUB_TIMEOUT_STYLE
From: |
Rodrigo Morales |
Subject: |
GRUB 2.06 doesn't seem to obey GRUB_TIMEOUT and GRUB_TIMEOUT_STYLE |
Date: |
Sun, 9 Jun 2024 00:40:23 -0500 |
TL; DR: I have set-up dual boot in my system for Ubuntu 22.04.4 LTS
and Windows 10. When I turn on my system, the GRUB menu is shown. I'm
now trying to configure the GRUB menu: I want to wait 30 seconds
before the GRUB menu is shown. I have read the info manual and I have
set the variables accordingly in /etc/default/grub, but the behavior I
am getting is different than that described in the info manual.
In the info node "(grub) Simple configuration" available in my system,
the following is stated:
#+BEGIN_SRC
(... some omitted lines ...)
'GRUB_TIMEOUT_STYLE'
(... some omitted lines ...)
If this option is set to 'countdown' or 'hidden', then, before
displaying the menu, GRUB will wait for the timeout set by
'GRUB_TIMEOUT' to expire.
(... some omitted lines ...)
#+END_SRC
I set =GRUB_TIMEOUT= to =30= and =GRUB_TIMEOUT_STYLE= to
=countdown=. The code block shows the contents of the file
=/etc/default/grub= in my system.
#+BEGIN_SRC sh
cat /etc/default/grub && echo Exit code: $?
#+END_SRC
#+RESULTS:
#+begin_example
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT=30
GRUB_TIMEOUT_STYLE=countdown
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
#+end_example
In the Ubuntu documentation, I found that I need to execute =sudo
update-grub= after making changes to =/etc/default/grub= (see
[1]). So, I executed =sudo update-grub=.
#+BEGIN_SRC text
$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.5.0-35-generic
Found initrd image: /boot/initrd.img-6.5.0-35-generic
Found linux image: /boot/vmlinuz-6.5.0-18-generic
Found initrd image: /boot/initrd.img-6.5.0-18-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot
entries.
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done
$ echo $?
0
#+END_SRC
I turned off my laptop by executing =poweroff=.
I turned on my laptop by pressing the "Power" button in my laptop, and
the GRUB menu was shown in less than 10 seconds, the line at the
bottom of the screen displaying the GRUB menu read "The highlighted
entry will be executed automatically in 30s." This behavior is
different to that stated in the info manual. Because I set
=GRUB_TIMEOUT_STYLE= to =countdown= and =GRUB_TIMEOUT= to =30=, I
believe that the correct behavior would be wait 30 seconds before the
GRUB menu is shown, but in my laptop the GRUB menu is shown right away
after the laptop has been turned on.
Feel free to ask for log files or any information that might help to
find the root cause that makes GRUB don't honour the variables
=GRUB_TIMEOUT= and =GRUB_TIMEOUT_STYLE=.
* System information
#+BEGIN_SRC text
$ lsb_release -a && echo Exit code: $?
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
Exit code: 0
#+END_SRC
#+BEGIN_SRC text
$ grub-mkconfig --version && echo Exit code: $?
grub-mkconfig (GRUB) 2.06-2ubuntu7.2
Exit code: 0
#+END_SRC
* Links
[1] https://help.ubuntu.com/community/Grub2/Setup
Archive link:
http://web.archive.org/web/20240609045518/https://help.ubuntu.com/community/Grub2/Setup
#+BEGIN_QUOTE
After editing /etc/default/grub or the scripts in the /etc/grub.d folder the
user should run sudo update-grub to incorporate the changes into the GRUB 2
menu.
#+END_QUOTE
- GRUB 2.06 doesn't seem to obey GRUB_TIMEOUT and GRUB_TIMEOUT_STYLE,
Rodrigo Morales <=