to speed up my boot time, I would like to get rid of the grub timing, but I would like to still be able to choose between different OS. Is there a way to do so? I was thinking to tweak something so the power button boot in one OS, the reset button boot in the other OS (and I do not have any reset button anymore)

Anybody see a possibility to do that?


  • 1
    For the tweak what you could do is install Grub on two USB keys, one that boot by default on one OS, the other key boot by default on the other OS. And whenether you want to load into one OS you plug the right USB key. I don't know if that would work but it could be a way to do what you want. Oct 17 '11 at 3:01
  • the USB stick solution is just less practical than the boot with a grub menu, and not faster, that is not a solution.
    – Memes
    Dec 29 '14 at 8:27

Yes you can. the timing and other attributes can be edited in the file /etc/default/grub.

Just do the following:

  1. sudo nano /etc/default/grub

  2. Change GRUB_TIMEOUT=10 to GRUB_TIMEOUT=0 for fastest loading without waiting for the Grub menu to appear. Now the thing is, if you want to see the menu again, when the pc is starting press ESC like crazy until the Menu appears. The Grub menu will always appear when you press ESC, does not matter if the time is at 0.

  3. After changing the timeout, save it with the command Ctrl+O and you'll be asked for the file name to be saved. Just hit enter which will replace the grub. You can exit the editor by pressing Ctrl+X

  4. Update grub by running (you guessed it): sudo update-grub so the changes can be active after the next boot up.

For the customized power and reset buttons for what I know is not possible "yet" to assign it to the Grub Menu.

  • @Memes haha. I needed a good laugh today. Thanks friend. Dec 29 '14 at 22:58
  • shouldn't you use a timeout of 1 second instead of 0? otherwise, the menu would be gone completely woudn't it?
    – rubo77
    Jan 19 '15 at 14:05
  • 1
    @rubo77 You can still access the menu by leaving SHIFT pressed or ESC (Don't remember which right now). Or tapping at one of those. Jan 19 '15 at 23:00
  • 1
    One more comment here, now, my boot time is not an issue anymore (boot with newer hardware and SSD), I then came back to a timing of 5 seconds and install Burg to get a clean neat OS selection screen.
    – Memes
    Aug 5 '15 at 7:00
  • and if you have UEFI install, Burg won't work but rEFInd will
    – Memes
    Mar 8 '16 at 10:48

and edit /etc/grub.d/40_custom/, append

if keystatus -s ; then


 config grub-mkconfig -o /boot/grub/grub.cfg
if keystatus -s ; then timeout=10 else boot

Note: Make sure to put that fi, on its own line(like above), under the rest; before issuing the commands below:

sudo config grub-mkconfig -o /boot/grub/grub.cfg

and sudo update-grub (...can't hurt)

Make sure you get no errors.

It works; when I hold down Left, or Right shift; before leaving my computers (an HP desktop) BIOS post screen. So, is the first thing GRUB2 "sees".

There are still reports of some computers not working. I'd try this. Best wishes.

FYI: I'm on Debian 7 (Wheezy, and with my added Mate, only.) I have LightDM installed, and text configured to autologin. After post, and before this GRUB2 start, I'm 33 seconds to my Mate desktop; without further optimizing.

Thank you.

  • 1
    although the solution seems elegant, the explanation is not complete (where do I write the if statement?)
    – Memes
    Dec 29 '14 at 8:28

If you want to script this, you can use this to edit the file /etc/default/grub from the script:

# Speed-up Grub boot, but always show the boot menu.
sudo sed -i 's/GRUB_TIMEOUT=[[:digit:]]\+/GRUB_TIMEOUT=1/g' /etc/default/grub
sudo sed -i 's/GRUB_HIDDEN_TIMEOUT/#GRUB_HIDDEN_TIMEOUT/g' /etc/default/grub
sudo update-grub

This will set the grub menu countdown to 1 second

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.