2

I wish to hide the grub menu, but with the right settings in /etc/default/grub, the grub menu is still displayed at boot. I run sudo update-grub after each edited. Bellow my grub file:

cat /etc/default/grub
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=2
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

With the following settings, I still have the menu display while it should not:

GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0

Same issue with:

GRUB_HIDDEN_TIMEOUT=5
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=0

In fact, I have the same effect that the following:

#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10

Using Ubuntu 18.04 LTS with dual-boot windows. Ubuntu is the default entry in grub. I edit the file with sudo nano /etc/default/grub then I run sudo update-grub with success. Could you help me to really hide the grub menu please?

Edit: Following the answer from abu_bua, the issue was solved with add GRUB_DISABLE_OS_PROBER=true here my new grub file:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=0
GRUB_DISABLE_OS_PROBER=true
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
NicolasSmith
  • 1,031
  • @Melebius: No, my ask is different and it's not about timeout but menu always displayed. – NicolasSmith Jun 11 '18 at 18:43
  • weird. even with this exact config, I see a short countdown in the upper right corner: "2" ... "1" ... "0" before it actually boots. – Michael May 08 '20 at 07:44

1 Answers1

6

Add without space between

GRUB_DISABLE_OS_PROBER= true   # WRONG
GRUB_DISABLE_OS_PROBER=true    # correct setting of variable

to your grub file and then update your grub by running

sudo update-grub
abu_bua
  • 10,783
  • 1
    Good answer, I made a minor edit to make it look like a more authoritative answer (removed "did you try..."). – pomsky Jun 13 '18 at 12:49
  • True. The "os prober" module seems to be forcing timeout = 10, for whatever reason. It comes from /etc/grub.d/30_os-prober here in Ubuntu 22. – Douglas Silva Oct 04 '23 at 04:29
  • The GRUB_TIMEOUT parameter defines the time waiting in the grub menu before it starts the default distro. I set it to 3s, since I have several distros and it is also very handy if it is necessary to boot the rescue (old) kernel. – abu_bua Oct 04 '23 at 08:04