22

I am setting up a dual boot install for my wife's computer. I would like to disable the timeout for selecting OS that defaults to Ubuntu so the computer wont boot without making a selection. (IE. GRUB_TIMEOUT=INFINITE) Is it just a simple case of leaving it blank or #out the line in /etc/default/grub ? I want it so my wife can choose OS easily on her newly Dual booting PC.

I would also like to know if updating Burg after this would keep the change - as the big graphics of the OS's are a little more noob friendly.

4 Answers 4

28

Edit /etc/default/grub (with root privileges), change GRUB_TIMEOUT value from 10 to -1, save the file and then run sudo update-grub. Reboot and now you have infinite time to choose the OS.

While this works in GRUB, it doesn't work with BURG, and you'll have to change GRUB_TIMEOUT value to some large number like 120 seconds to wait before booting into any OS and run sudo update-burg to reflect the changes. Also note that this change must be made to file /etc/default/burg as BURG doesn't consider options set in /etc/default/grub

2
  • Excellent answer. Thank you very much. I set it to 600 seconds with Burg and it's awesome.
    – Lasher
    May 12, 2012 at 19:50
  • Which versions of Ubuntu does this apply to?
    – Flimm
    Oct 2, 2022 at 5:51
7

Setting timeout to -1 will make GRUB wait infinitely.

By that I mean that you will be required to manually select an entry and hit Enter before launching any OS.

2

When running update-grub a warning says that setting grubtimeout to a non zero number is no longer supported. No matter what I changed the grub timeout value to timeout stayed at 10. If you are having this problem the workaround is editing the grub.cfg file located in /boot/grub. Near the end the script says IF TIMEOUT = 0 then timeout= 10. Change 10 to -1. No more countdown.

  1. gksu gedit /boot/grub/grub.cfg

  2. Find the part of the script around the end that says IF TIMEOUT = 0 then timeout= 10. Change 10 to -1.

This is a workaround it will be reverted if update-grub is ever run. Not permanent unless update-grub is not manually run.

(Works on 14.04.)

1
  1. Edit /etc/grub.d/30_os-prober file:
    sudo gedit /etc/grub.d/30_os-prober
    
  2. Find
    if [ "\${timeout}" = 0 ]; then
      set timeout=10
    fi
    
    and replace set timeout=10 with set timeout=0
  3. Save and update grub config:
    sudo update-grub
    

It worked for me, on Ubuntu 19.10

2
  • It is not recommended to edit the generated script. Use the grub-mkconfig -o /boot/grub/grub.cfg or the update-grub script after editing the /etc/default/grub configuration file. Just add GRUB_TIMEOUT=-1 to it. Feb 28, 2021 at 16:47
  • 1
    @BalázsBörcsök, files stored in the /etc/grub.d/ directory are not generated files. On the contrary, these are source scripts used to generate /boor/grub/grub.cfg. You can read the contents of /etc/grub.d/README. The problem there is that script called 30_os-prober is written in such a way that it effectively forces GRUB timeout of 10 seconds if another OS is found. See the second code excerpt from Maxim Mazurok - the timeout variable is set in global scope of the grub.cfg script AFTER setting the timeout variable globally to value defined with GRUB_TIMEOUT in /etc/default/grub. Apr 20, 2023 at 8:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .