1

Only Ubuntu 19.10 is installed on my computer. I just don't need the grub menu. I tried all the options I found for /etc/default/grub . It seems as if all my settings are being redefined elsewhere. Always a standard 30 seconds countdown. How to disable its display or adjust the countdown to the minimum value?

Dines
  • 53
  • 5

2 Answers2

2

Try this...

sudo -H gedit /etc/default/grub

and change:

#GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT=10

to:

#GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT=0

sudo -H gedit /etc/grub.d/30_os-prober # find line 23

and change:

quick_boot="1"

to:

quick_boot="0"

sudo update-grub

reboot

heynnema
  • 70,711
  • Well ... I don’t know how, but your advice helped. But I need to clarify. I'm not sure, but quick_boot setup helped. After the first reboot, I noticed that the countdown changed from 30 to 5. It turned out to be the GRUB_RECORDFAIL_TIMEOUT setting that I added in previous attempts (But it just didn’t work until that moment). Trying to understand what helped, I even changed the quick_boot setting several times back, but for some reason, the GRUB_RECORDFAIL_TIMEOUT setting started working regardless of other settings. Well, that was strange. – Dines Feb 17 '20 at 20:28
  • @Dines I can't speak to other modifications that you've made. However, it sounds like my instructions achieved your goal, yes? If so, please remember to accept my answer by clicking the checkmark and up-arrow icons that appear just to the left of my answer. Thanks! – heynnema Feb 17 '20 at 20:30
  • Already. And yes setting GRUB_RECORDFAIL_TIMEOUT for 0 seconds to completely disable the grub menu – Dines Feb 17 '20 at 20:32
  • @Dines Did you add GRUB_RECORDFAIL_TIMEOUT somewhere, or change an existing instance (and where)? 00_header? – heynnema Feb 17 '20 at 20:53
  • I don’t think that I defined GRUB_RECORDFAIL_TIMEOUT somewhere else. I also heard about the 00_header file only now only from you. – Dines Feb 18 '20 at 10:11
0

You can't set a grub timeout of 0 but you can set a timeout of 0.1 which is hardly noticeable difference from 0. First use sudo -H gedit /etc/default/grub. Then locate these lines:

#GRUB_HIDDEN_TIMEOUT_QUIET=false
#GRUB_TIMEOUT_STYLE=countdown
#GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT=0.1

Placing a # at front makes them a comment. Leave the rest of the line the same in case you need it again.

The last line is the timeout. Leave that as a regular command (no #) but change the value to 0.1.

Finally run sudo update-grub to compile the configuration file into a new grub boot script.


Bug in grub 2.04

You might be effected by a bug in Grub 2.04 but I couldn't find a reference with google search. If unable to fix you can downgrade to Grub 2.02 as described in this Q&A:

  • No, it does not work. It seems that this bug is only in Ubuntu 19.10. Whatever I do, the countdown is always fixed for 30 seconds. – Dines Feb 17 '20 at 13:52
  • @Dines What does grub-install --version return? – WinEunuuchs2Unix Feb 17 '20 at 13:55
  • grub-install (GRUB) 2.04-1ubuntu12.1 – Dines Feb 17 '20 at 14:09
  • Per info -f grub -n 'Simple configuration' - 'GRUB_TIMEOUT' ... The default is '5'. Set to '0' to boot immediately without displaying the menu, or to '-1' to wait indefinitely. – Jarad Downing Feb 17 '20 at 14:14
  • @JaradDowning Yes that is a new feature in Grub 2.04, most of the Ubuntu world is using Grub 2.02 right now. – WinEunuuchs2Unix Feb 17 '20 at 14:24
  • Well ... And what do I need to do now to achieve the desired result? – Dines Feb 17 '20 at 14:36
  • @Dines It appears to be related to this: https://superuser.com/questions/124992/how-to-enable-boot-timeout-in-grub2 Can you update your question with the results from: grub-editenv list? If recordfail appears that means the timeout boot is automatically reset to 30 seconds. – WinEunuuchs2Unix Feb 17 '20 at 14:50
  • @WinEunuuchs2Unix Empty output. – Dines Feb 17 '20 at 15:02
  • And although I already marked the answer @heynnema I wanted to say why maybe grub-editenv list did not return anything. https://ubuntuforums.org/showthread.php?t=2412153 (last post) I have exactly the same system (one OS, UEFI and LVM). Moreover, the answer was given back in 2007. Although I still can’t understand why GRUB_RECORDFAIL_TIMEOUT had not acted before. – Dines Feb 17 '20 at 20:48
  • @heynnema has been underrated for years. I'm glad you accepted his answer and I'll upvote it too. 30-os-prober was also on my radar but it's good he got there and saved everyone some time. Please answer his query about 00_header though as it may help others. I was the first to upvote your question as I think it may be important for the future. – WinEunuuchs2Unix Feb 18 '20 at 00:39
  • @WinEunuuchs2Unix Very kind words. Thank you. – heynnema Feb 18 '20 at 15:00