Hide grub menu to access directly to Fedora unless ESC pressed - Fedora 44

I apologize in advance, I’ve seen lots of questions looking the same, I applied the solutions I found but still can’t get rid of this boot menu.
Well, it HAS worked actually, untill I once alt+clicked on Fedora’s restart button: in the reboot confirm form, alt-key changes “reboot” button to “reboot options”, I did that, it rebooted to grub menu, since then I can’t get rid of the menu.

Following all answers I found here, here is how my /etc/default/grub looks like:

# cat /etc/default/grub
GRUB_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=0
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true

I did run grub2-mkconfig -o /boot/grub2/grub.cfg

I also saw problems bound to /boot/grub2/grub.cfg vs /boot/efi/EFI/fedora/grub.cfg, here’s how the latter looks like:

# cat /boot/efi/EFI/fedora/grub.cfg
search --no-floppy --root-dev-only --fs-uuid --set=dev aaef6578-66af-46df-af00-bf4bae33f64f
set prefix=($dev)/grub2
export $prefix
configfile $prefix/grub.cfg

What’s up Doc?
What more can I try?
What have I done wrong?

It looks like this default/grub did not output the correct conf, or that this /boot/grub2/grub.cfg is ignored.
Is there a way to know which grub.cfg is actually used?


TLDR:
Check sudo grub2-editenv list

  • if menu_auto_hide=1 missing → sudo grub2-editenv - set menu_auto_hide=1

  • if menu_show_once=1 present → sudo grub2-editenv - unset menu_show_once

You need to do this as well:

sudo grub2-editenv - set menu_auto_hide=1

If you want to see the menu you have to delete menu_auto_hide, setting to 0 does not work.

Thanks for the quick reply.
I did

sudo grub2-editenv - set menu_auto_hide=1

→ no change, menu still there on reboot
I also tried:

sudo grub2-editenv - set menu_auto_hide=1
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

still no change.

Where can I find a grub log? I could get some hints there maybe?
[edit:] cat /var/log/boot.log | grep grub doesn’t give anything

grub runs before any file-systems is mounted, so it’s somewhat limited in what it can log, as there’s not really anywhere applicable to log it.

You can set it to log to the serial port, but that requires another machine, a serial cable and enough interest to debug it via that method.

that sounds quite a few levels above my own ;-D

@Barry: Your grub2-editenv brought me to have a look at /boot/grub2/grubenv :

cat /boot/grub2/grubenv
# GRUB Environment Block
# WARNING: Do not edit this file by tools other than grub-editenv!!!
env_block=512+1
saved_entry=2a33bf588ed44a22a31342e0fec9eff2-6.19.10-300.fc44.x86_64
menu_auto_hide=1
boot_success=1
menu_show_once_timeout=60
menu_show_once=1

What’s this menu_show_once? I don’t find much doc on googling this term.
Should I set it to 0? I suppose using smthg like sudo grub2-editenv - set menu_show_once=0?
Or remove it, but how?

It’s a grub environment variable.

udo grub2-editenv list

Ok, maybe I shouldn’t have asked “what’s this” and directly ask the next question, it’s the one that actually mattered: what should I do with it ? :slight_smile:
So I DID set it to zero, it didn’t prevent the menu showing up.
Then I DID remove it and then, tadaaaaam, it worked.

sudo grub2-editenv - unset menu_show_once

So apparently the “alt+click” on reboot confirmation button brings Fedora to add a menu_show_once variable, which doesn’t show the menu once but rather forever…

Do you by any chance store /boot on a btrfs file system?

The env_block=512+1 should be automatically be removed if /boot lives in the default ext4 file system. That is, unless you never updated the system after initial install.

This is probably not related to your problem, though, but you should use grub2-editenv - list to show the contents.

No, it was just because of this menu_show_once environment variable.
It’s solved now.
I’m new here, shall I add a [solved] mention in the title or do anything else to close the case?

Tick box at the bottom of every post - tick it for the post that solves the issue.