I have a laptop which I intend to be dual-boot. It previously booted into Windows (7), and after Linux install now boots directly into Linux (openSUSE). I've edited /etc/grub.d/40_custom
to add the Windows chainloader entry. So far, so good.
Unfortunately I can't get GRUB2 to display the selection menu at all, even to select the Safe Mode entry for the Linux install. I get a split-second flash of the "welcome to grub" message and then it boots directly into the default Linux entry.
Things I have tried:
GRUB_TIMEOUT
to an integer value and GRUB_HIDDEN_TIMEOUT
to
GRUB_HIDDEN_TIMEOUT_QUIET
to both true
and false
GRUB_TERMINAL
to console
quiet
and splash=silent
from GRUB_CMDLINE_LINUX_DEFAULT
I am regenerating the config each time with /usr/sbin/grub2-mkconfig
Other info:
GRUB_HIDDEN_TIMEOUT
/sys/firmware/efi
directory)Anything else I can try? This is getting really aggravating, I never had this much trouble with grub legacy!
Edit:
Section of grub.cfg
related to timeout:
if [ x${boot_once} = xtrue]; then
set timeout=0
elif [ x$feature_timeout_style = xy ]; then
set timeout_style=menu
set timeout=0
# Fallback normal timeout code in case the timeout_style feature is unavailable
else
set timeout=0
fi
This is different to the output displayed by the grub update script, which has timeout = 10
! Editing the grub.cfg
file directly displays the menu as expected.
Do this lines exist in the your /etc/default/grub
? If not, add them.
GRUB_TIMEOUT=10
GRUB_TIMEOUT_STYLE=menu
run update-grub
afterwards to update /boot/grub/grub.cfg
You can check, if the needed changes has happened, by this way:
grep -i timeout /boot/grub/grub.cfg
Output should be contained such values:
set timeout_style=menu
set timeout=10
From the grub manual:
GRUB_TIMEOUT
Boot the default entry this many seconds after the menu is displayed, unless a key is pressed. The default is 5. Set to 0 to boot immediately without displaying the menu, or to -1 to wait indefinitely. If GRUB_TIMEOUT_STYLE is set to countdown or hidden, the timeout is instead counted before the menu is displayed.
GRUB_TIMEOUT_STYLE
If this option is unset or set to menu, then GRUB will display the menu and then wait for the timeout set by GRUB_TIMEOUT to expire before booting the default entry. Pressing a key interrupts the timeout. 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. If ESC is pressed during that time, it will display the menu and wait for input. If a hotkey associated with a menu entry is pressed, it will boot the associated menu entry immediately. If the timeout expires before either of these happens, it will boot the default entry. In the countdown case, it will show a one-line indication of the remaining time.
External links referenced by this document: