GRUB Menu not unhiding

I have run out of thoughts and ideas. I cannot for the life of me get the GRUB menu to show up. As per the topic on hidden grub menu I ran grub2-editenv - unset menu_auto_hide && grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg then rebooted without success. I disabled os-prober and put my Windows entry in 40_custom and this is the resulting config file:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -f ${config_directory}/grubenv ]; then
  load_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

terminal_output console
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_users ###
if [ -f ${prefix}/user.cfg ]; then
  source ${prefix}/user.cfg
  if [ -n "${GRUB2_PASSWORD}" ]; then
    set superusers="root"
    export superusers
    password_pbkdf2 root ${GRUB2_PASSWORD}
  fi
fi
### END /etc/grub.d/01_users ###

### BEGIN /etc/grub.d/08_fallback_counting ###
insmod increment
# Check if boot_counter exists and boot_success=0 to activate this behaviour.
if [ -n "${boot_counter}" -a "${boot_success}" = "0" ]; then
  # if countdown has ended, choose to boot rollback deployment,
  # i.e. default=1 on OSTree-based systems.
  if  [ "${boot_counter}" = "0" -o "${boot_counter}" = "-1" ]; then
    set default=1
    set boot_counter=-1
  # otherwise decrement boot_counter
  else
    decrement boot_counter
  fi
  save_env boot_counter
fi
### END /etc/grub.d/08_fallback_counting ###

### BEGIN /etc/grub.d/10_linux ###
insmod part_gpt
insmod ext2
set root='hd2,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt1 --hint-efi=hd2,gpt1 --hint-baremetal=ahci2,gpt1  a2a61adb-d732-4692-bc4e-1c8949af7e5f
else
  search --no-floppy --fs-uuid --set=root a2a61adb-d732-4692-bc4e-1c8949af7e5f
fi
insmod part_gpt
insmod fat
set boot='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=boot --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2  C9C0-A7B2
else
  search --no-floppy --fs-uuid --set=boot C9C0-A7B2
fi

# This section was generated by a script. Do not modify the generated file - all changes
# will be lost the next time file is regenerated. Instead edit the BootLoaderSpec files.
#
# The blscfg command parses the BootLoaderSpec files stored in /boot/loader/entries and
# populates the boot menu. Please refer to the Boot Loader Specification documentation
# for the files format: https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/.

# The kernelopts variable should be defined in the grubenv file. But to ensure that menu
# entries populated from BootLoaderSpec files that use this variable work correctly even
# without a grubenv file, define a fallback kernelopts variable if this has not been set.
#
# The kernelopts variable in the grubenv file can be modified using the grubby tool or by
# executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX
# and GRUB_CMDLINE_LINUX_DEFAULT options from /etc/default/grub file are used to set both
# the kernelopts variable in the grubenv file and the fallback kernelopts variable.
if [ -z "${kernelopts}" ]; then
  set kernelopts="root=UUID=a2a61adb-d732-4692-bc4e-1c8949af7e5f ro rhgb quiet "
fi

insmod blscfg
blscfg
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_reset_boot_success ###
# Hiding the menu is ok if last boot was ok or if this is a first boot attempt to boot the entry
if [ "${boot_success}" = "1" -o "${boot_indeterminate}" = "1" ]; then
  set menu_hide_ok=1
else
  set menu_hide_ok=0 
fi
# Reset boot_indeterminate after a successful boot
if [ "${boot_success}" = "1" ] ; then
  set boot_indeterminate=0
# Avoid boot_indeterminate causing the menu to be hidden more then once
elif [ "${boot_indeterminate}" = "1" ]; then
  set boot_indeterminate=2
fi
# Reset boot_success for current boot 
set boot_success=0
save_env boot_success boot_indeterminate
### END /etc/grub.d/10_reset_boot_success ###

### BEGIN /etc/grub.d/12_menu_auto_hide ###
if [ x$feature_timeout_style = xy ] ; then
  if [ "${menu_show_once}" ]; then
    unset menu_show_once
    save_env menu_show_once
    set timeout_style=menu
    set timeout=60
  elif [ "${menu_auto_hide}" -a "${menu_hide_ok}" = "1" ]; then
    set orig_timeout_style=${timeout_style}
    set orig_timeout=${timeout}
    if [ "${fastboot}" = "1" ]; then
      # timeout_style=menu + timeout=0 avoids the countdown code keypress check
      set timeout_style=menu
      set timeout=0
    else
      set timeout_style=hidden
      set timeout=1
    fi
  fi
fi
### END /etc/grub.d/12_menu_auto_hide ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
	fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Windows 10 Pro' --class windows --class os $menuentry_id_option 'osprober-efi-18AC-3F59' {
        insmod part_gpt
        insmod fat
        set root='hd3,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd3,gpt1 --hint-efi=hd3,gpt1 --hint-baremetal=ahci3,gpt1  18AC-3F59
        else
          search --no-floppy --fs-uuid --set=root 18AC-3F59
        fi
        chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

I’ve also tried this at the bottom of my 40_custom file:

# Other OS found, undo autohiding of menu unless menu_auto_hide=2
if [ "${orig_timeout_style}" -a "${menu_auto_hide}" != "2" ]; then
  set timeout_style=${orig_timeout_style}
  set timeout=${orig_timeout}
fi

I can tell there is a difference between before and now, however I cannot see it. I can tell there is a 5s delay now, but for some reason the screens just stay black until I get the fedora+motherboard logo splash.

System:
Ryzen 5 3600/MSI B550-A Pro/32GB DDR4-3200
I’m using XMP profile 1. CSM is off.

Windows and Fedora are on different drives. I want to get GRUB working so I don’t have to use my MB’s boot override to get into any system. This is driving me up the wall :hot_face:
I consider myself at least intermediate at Linux, I’ve been using Linux for almost 10 years now. My VPS runs Fedora and I’ve ran dual boot for ages, but I recently decided to change to Fedora and this is a major headache.

1 Like

Post the output:

cat /etc/default/grub
sudo grub2-editenv list

As requested:

[valinwolf@localhost ~]$ cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true

[valinwolf@localhost ~]$ sudo grub2-editenv list
YubiKey for `valinwolf': 
saved_entry=7a993138f9f74a09b4b5a82e250e6730-5.8.4-200.fc32.x86_64
boot_success=1
kernelopts=root=UUID=a2a61adb-d732-4692-bc4e-1c8949af7e5f ro rhgb quiet 
boot_indeterminate=0

I would like to note that I also tried gfxterm instead of console without any luck.

If you need any additional info, just let me know.

1 Like

Also check this:

sudo ls -l $(sudo readlink -f /boot/grub*/grubenv \
    /etc/grub2$(test -d /sys/firmware/efi && echo -efi).cfg)
sudo grub2-mkconfig -o /etc/grub2$(test -d /sys/firmware/efi && echo -efi).cfg
[valinwolf@localhost ~]$ sudo ls -l $(sudo readlink -f /boot/grub*/grubenv \
>     /etc/grub2$(test -d /sys/firmware/efi && echo -efi).cfg)
-rwx------. 1 root root 6878 Sep  7 16:26 /boot/efi/EFI/fedora/grub.cfg
[valinwolf@localhost ~]$ sudo grub2-mkconfig -o /etc/grub2$(test -d /sys/firmware/efi && echo -efi).cfg
Generating grub configuration file ...
Adding boot menu entry for EFI firmware configuration
done
1 Like

Something else that might be worth mentioning: I have a GTX 1080. I don’t think it would be a driver issue, but maybe?

edit your grub after that edit ā€œGRUB_ENABLE_BLSCFG=trueā€ line and change true to false
sudo nano etc/default/grub

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=false
after that run 'grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg'
That will show your grub for 5 sec

That changed the output of the grub2-mkconfig but the menu did not show.

You might instead need to change the ā€œGRUB_DISABLE_SUBMENU=trueā€ in /etc/default/grub from true to false.
My system is not dual-boot but I display the grub menu on every boot and mine has the following

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=false
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 resume=/dev/mapper/fedora_eagle-swap rd.lvm.lv=fedora_eagle/root rd.lvm.lv=fedora_eagle/swap rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true

Yours was

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true

after you have made changes run ā€˜grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg’
That should show your grub menu for 5 sec at each boot.

I really would not suspect the driver. I have a GTX 1050 and am using the nvidia drivers from rpmfusion.

So I tried SUBMENU false with BLSCFG both true and false. BLSCFG true it basically inta-booted to fedora, BLSCFG false and it took a solid 15-20 seconds to boot. No menu either way though. :-/

Like I said though, I was grasping at straws with the gfx driver lol. I have to consider all potential reasons.

Try to increase GRUB timeout:

GRUB_TIMEOUT=50

Then check:

  • If GRUB really waits the time specified?
  • Does it show the menu?

Also post the output:

sudo ${SHELL} -c 'ls -l $(readlink -f /boot/grub*/grubenv)'
-rwx------. 1 root root 1024 Sep  9 08:56 /boot/efi/EFI/fedora/grubenv

I’m rebooting now to check the menu timeout.

1 Like

I don’t get it why you not just hold shift button to unhide grub on boot your system when you needed.

1 Like

I use Windows about as much as I use Fedora. That would be EXTREMELY irritating to have to do that every day, sometimes 3-4 times per day.

As for whether grub shows/takes 50s to show boot, using GRUB_DISABLE_SUBMENU=false and GRUB_ENABLE_BLSCFG=true it is a black screen that last just over 1 minute from the end of the MB splash and the Fedora splash.

P.S.: I tried the ā€œhold shiftā€ method and it did the same thing as using config to unhide the menu - noticeable delay on a blank/black screen.

1 Like

@valinwolfwolf

Is there any case where the GRUB menu displays? What about booting from any of the Fedora 32 media (written to a USB stick)? That would help start narrowing down when it does and doesn’t work, and help figure out why. (NOTE: Fedora install media use GRUB on UEFI firmware, but use syslinux on BIOS.)

What I want to establish is if any version of GRUB did once work. Maybe it’s a regression, and hence a bug.

What versions of shim and grub do you have? These are current.

shim-x64-15-8.x86_64
grub2-efi-x64-2.04-21.fc32.x86_64

These are on Fedora 32 install media:

shim-x64-15-8.x86_64
grub2-efi-x64-2.04-12.fc32.x86_64

Have you ever done grub2-install on this system? Don’t do it now, but if you have, that might explain the unexpected behavior because that will install a grubx64.efi that behaves completely different from the one in the grub2-efi-x64 package. To reinstall the bootloader on UEFI systems:

dnf reinstall grub2-efi-x64 shim-x64

I just installed from a fresh version from Fedora Media Writer. The only thing I had to update was the Kernel.
shim-x64-15-8.x86_64
grub2-efi-x64-2.04-21.fc32.x86_64

Nope.

Just for the kicks, I’ll reinstall. Can’t hurt lol

It does show up on the media.

Ok so it’s either configuration related or it’s a regression/bug in GRUB between -12 and -21. Simplest thing to do is just downgrade. If it fixes it, there’s a regression and it needs a bug report and hopefully figure out the first version it breaks in. If it doesn’t fix it, it’s still configuration related, however weird and difficult that’ll be to figure out.

To downgrade to -12:

sudo dnf downgrade grub2-efi-x64

Looks like I get to jump down that rabbit hole… it didn’t fix it…

P.S.: Sorry for the late reply, I pulled a couple extra shifts at work yesterday and was pretty much AFK the whole day. I appreciate all the time everyone has been taking to help me fix this!

1 Like