Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do you have the grub appear on a key combination, but have windows boot default.

I'm running ubuntu 11.10 and grub 2.0.

Here is my current /etc/default/grub

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=" quiet vga=769"

Thanks!

And here is my /boot/grub/grub.cfg http://pastebin.com/HbDBe8xz

share|improve this question
    
You mean like <press shift> after BIOS post will launch grub menu? –  Bruno Pereira Oct 23 '11 at 1:48
    
Yeah any key combo will do. –  Logan Williams Oct 23 '11 at 1:51
    
it already exists, if your using grub press shift right after post and keep it pressed. –  Bruno Pereira Oct 23 '11 at 2:52
    
have a look here. –  Bruno Pereira Oct 23 '11 at 4:05
2  
@brunopereira81 I'm trying to hide the menu so the user has no idea that the grub is installed and use a key combo to display it. Unfortunately the grub always seems to flicker briefly no matter what values I set in /etc/default/grub –  Logan Williams Oct 23 '11 at 4:19

1 Answer 1

I think you can do it with the config variables in /etc/default/grub. Don't forget to run update-grub after updating the file.

GRUB_DEFAULT= 3 #Assuming Windows is the third menu entry
GRUB_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT=0

As per the documentation for each option:

`GRUB_DEFAULT'
     The default menu entry.  This may be a number, in which case it
     identifies the Nth entry in the generated menu counted from zero,
     or the title of a menu entry, or the special string `saved'.
     Using the title may be useful if you want to set a menu entry as
     the default even though there may be a variable number of entries
     before it.

     For example, if you have:

     menuentry 'Example GNU/Linux distribution' --class gnu-linux {
        ...
     }

     then you can make this the default using:

          GRUB_DEFAULT='Example GNU/Linux distribution'

     If you set this to `saved', then the default menu entry will be
     that saved by `GRUB_SAVEDEFAULT', `grub-set-default', or
     `grub-reboot'.

     The default is `0'.
`GRUB_TIMEOUT'
     Boot the default entry this many seconds after the menu is
     displayed, unless a key is pressed.  The default is `5'.  Set to
     `0' to boot immediately without displaying the menu, or to `-1' to
     wait indefinitely.

`GRUB_HIDDEN_TIMEOUT'
     Wait this many seconds for a key to be pressed before displaying
     the menu.  If no key is pressed during that time, boot
     immediately.  Unset by default.
share|improve this answer
    
... the OP mentioned that Grub2 still displays briefly even with these values defined... Any ideas how to stop this? –  fossfreedom Jan 31 '12 at 21:17
    
Um, he seems to have GRUB_TIMEOUT=10, maybe changing it to 0 could help. –  roadmr Jan 31 '12 at 22:09
    
I think that setting GRUB_DEFAULT to saved is preferable for two reasons: 1) It remembers the last selection; and 2) it doesn't break if the number of menu entries ever changes (which does happen sometimes. –  Scott Severance Jan 31 '12 at 22:55
    
@roadmr No, 0 does not help. It flashes the GRUB background and no matter what is pressed, it does not bring up the GRUB menu. i.e. It goes to the default OS. –  Oxwivi Feb 1 '12 at 12:34
    
set GRUB_TIMEOUT=5, but edit gksu gedit /etc/grub.d/05_debian_theme , set GRUB background color to black and menu_color_normal to black, so only highlighted items will be visible –  Denis Feb 4 '12 at 23:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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