I solved this problem by disabling the OS Prober. I did that because in /boot/grub/grub.cfg in the part generated by the template /etc/grub.d/30_os-prober, there was an override of "timeout" to 10 and "style" to menu.
I had the same problem and none of the tips here worked! The only way was to change /boot/grub/grub.cfg manualy.
At some point of this file he makes the timeout goes to 10! So, just comment those lines
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
But, you can never do update-grub again, otherwise it will turn back to the same file, and timeout is going to 10 again!
Save the file (in vi you will need to force it even if you are su!). Restart the computer and it will work just fine!
echo "
set timeout_style=hidden
set timeout=2" | sudo tee --append /etc/grub.d/40_custom
And update grub. It will overwrite timeout settings in grub.cfg, so it doesn't matter what you have in /etc/default/grub.
So I have hidden menu that can be invoked by shift for 2 sec.
Like Agustin, I found that my issue was with the OS Prober. Doing one step better than his solution, I found this gist that will let you have your OSes but still hide the menu. You just need to download those two files, put them into /etc/grub.d, and give them the same permissions as the other templates in that directory.
If you ever want to access your non-default OS, just hold down shift while booting up. That will show the menu.
into /etc/default/grub and be done with it. Unfortunately, at least on Manjaro, the file /etc/grub.d/30_os-prober overrides these settings. We could disable that file, but here's a better solution: create /etc/grub.d/99_quiet with these contents:
#!/bin/sh
cat <<EOF
set timeout_style=hidden
set timeout=0
EOF
(With this file, we don't even need to modify /etc/default/grub at all.) Make it executable and run sudo update-grub (or sudo grub-mkconfig -o /boot/grub/grub.cfg if on Arch).
Reboot and GRUB will not display the menu or introduce any delay during boot. But, you can still get the menu if you hold down Shift after the hardware has turned on but before GRUB has started.
To understand what is happening here we must understand how GRUB configuration works. There is a /boot/grub/grub.cfg file in a special DSL that is read by GRUB during boot. This can be written manually but it is preferred to generate it using update-grub (i.e. grub-mkconfig). That command uses /etc/default/grub and /etc/grub.d to generate the grub.cfg. The /etc/default/grub is sourced first, to set the configuration parameters for update-grub to generate the file. Then, each file in /etc/grub.d that is executable is executed, and its output is concatenated to the end of the grub.cfg.
For some docs, see here, but see also the actual shell scripts in /etc/grub.d and the resulting GRUB configuration /boot/grub/grub.cfg.
You can just change grub settings.
type in terminal
Change
GRUB_HIDDEN_TIMEOUT_QUIET=false
toSave the file and exit
Type
sudo update-grub
If you don't get the result you want, see this bug.
I solved this problem by disabling the OS Prober. I did that because in
/boot/grub/grub.cfg
in the part generated by the template/etc/grub.d/30_os-prober
, there was an override of "timeout" to 10 and "style" to menu.Edit
/etc/default/grub
and add this line:Hope you find this useful!
BTW, my full /etc/default/grub is:
Happy coding
I tried all those tips they didnt work, ended up reducing the timeout time to zero as follows:
You need to edit the file at
/etc/default/grub
to prevent showing the grub menu.By default, the entries in that files look like this.
#
mark from second line, andGRUB_HIDDEN_TIMEOUT_QUIET=false
toGRUB_HIDDEN_TIMEOUT_QUIET=true
.After changes, the required portion of the file will look like this
sudo update-grub
command in the terminal, and reboot to see the result.I had the same problem and none of the tips here worked! The only way was to change /boot/grub/grub.cfg manualy. At some point of this file he makes the timeout goes to 10! So, just comment those lines
But, you can never do update-grub again, otherwise it will turn back to the same file, and timeout is going to 10 again! Save the file (in vi you will need to force it even if you are su!). Restart the computer and it will work just fine!
I've found a simple solution to the problem.
And update grub. It will overwrite timeout settings in grub.cfg, so it doesn't matter what you have in /etc/default/grub. So I have hidden menu that can be invoked by shift for 2 sec.
Like Agustin, I found that my issue was with the OS Prober. Doing one step better than his solution, I found this gist that will let you have your OSes but still hide the menu. You just need to download those two files, put them into
/etc/grub.d
, and give them the same permissions as the other templates in that directory.If you ever want to access your non-default OS, just hold down shift while booting up. That will show the menu.
Ideally, we could just put
into
/etc/default/grub
and be done with it. Unfortunately, at least on Manjaro, the file/etc/grub.d/30_os-prober
overrides these settings. We could disable that file, but here's a better solution: create/etc/grub.d/99_quiet
with these contents:(With this file, we don't even need to modify
/etc/default/grub
at all.) Make it executable and runsudo update-grub
(orsudo grub-mkconfig -o /boot/grub/grub.cfg
if on Arch).Reboot and GRUB will not display the menu or introduce any delay during boot. But, you can still get the menu if you hold down Shift after the hardware has turned on but before GRUB has started.
To understand what is happening here we must understand how GRUB configuration works. There is a
/boot/grub/grub.cfg
file in a special DSL that is read by GRUB during boot. This can be written manually but it is preferred to generate it usingupdate-grub
(i.e.grub-mkconfig
). That command uses/etc/default/grub
and/etc/grub.d
to generate thegrub.cfg
. The/etc/default/grub
is sourced first, to set the configuration parameters forupdate-grub
to generate the file. Then, each file in/etc/grub.d
that is executable is executed, and its output is concatenated to the end of thegrub.cfg
.For some docs, see here, but see also the actual shell scripts in
/etc/grub.d
and the resulting GRUB configuration/boot/grub/grub.cfg
.if you want to remove a boot entry just type in:
If that doesn't work, install the startup manager, like so:
with startup-manager you can
for all of you that have word splash in cmd line anything but hardcoding 0 for timeout won't work,,
Try removing word splash from second last line, update and reboot,, voila, no menu :)
hth, krex