LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is it possible to configure GRUB2 booting time? (http://www.linuxquestions.org/questions/linux-newbie-8/is-it-possible-to-configure-grub2-booting-time-861852/)

darthpinguim 02-10-2011 10:13 AM

Is it possible to configure GRUB2 booting time?
 
Hi folks!
I've been facing this problem since the release of Ubuntu 9.10 (I guess), as GRUB was changed into GRUB2.
In earlier Ubuntu releases it was possible to configure the booting menu loaded from /boot/grub in the "menus.lst" file. In this file it was possible to change the booting menu time, even to "0" (zero), what would make the menu to stay on display.
Now, in GRUB2 there's no "menus.lst" file anymore. There's a file "boot.cfg", which I think would be the "menus.lst" similar in the newer Ubuntu versions. I've made a copy of this file, so that I could try changing it in order to change booting time. I succeeded in increasing the boot menu time, but could not change it so that there would be no time in the menu. Is there anything that can be done to set this time to "0" (zero), so that it won't boot directly to the first OS in the list?

With attention
darthpinguim "May the Linux Force be with you!"

rafatmb 02-10-2011 10:22 AM

To configure that, edit the file: /etc/default/grub.

Change the line GRUB_TIMEOUT=10 to the time you want.

Then run update-grub to apply.

TobiSGD 02-10-2011 10:25 AM

You should not modify the grub.cfg-file. This file is auto-generated, and all your changes will be lost the next time an update issues the update-grub command.
If you want to modify Grub's behavior you should modify /etc/default/grub instead. There is an option named GRUB_TIMEOUT. If you set this to zero the time-out should be disabled.
Remember to do
Code:

sudo update-grub
every time you have modified that file, so that Grub can generate a new grub.cfg.

darthpinguim 02-10-2011 12:54 PM

Hey there! Thanks for the replies.
I have already done that, and that's something I've mentioned above.
I can increase the boot menu time, by increasing the number in "GRUB_TIMEOUT=x". I've done that, and it worked fine.
But my question was about the possiblity of setting off the boot menu time, so that if I turn my computer on and leave for a while (before selecting the OS), when I get back the boot menu will still be on my screen.
If I set the time to zero (GRUB_TIMEOUT=0) then the computer boots directly to the first operating system in the list. Therefore, the menu won't be displayed.

TobiSGD 02-10-2011 01:07 PM

I just had a look at the Grub 2 manual, especially the part about the config-file. The right value for GRUB_TIMEOUT is -1 to disable the time-out.
I hope this will help you.

darthpinguim 02-11-2011 06:32 AM

Thanks TobiSGD!
Now it worked out. Helped a lot!


All times are GMT -5. The time now is 04:23 AM.