I stopped dual booting and I don't want to have to choose the OS any more. I want to boot into Ubuntu 12.04 directly without seeing the GRUB menu.

How can I achieve that?

  • If you stopped dual booting, probably you have stopped using the other OS. Why cant you remove the other OS so that ubuntu can boot normally. – karthick87 Mar 8 '12 at 8:37
  • Duplicate of (either) askubuntu.com/questions/124074/… or askubuntu.com/questions/52963/… – david6 Jun 13 '12 at 7:57
  • if any of these answers "answered" your question please accept one of them :) – blade19899 Jul 11 '12 at 16:04
  • @david6: I don't see how either of those are duplicates of this question. I think this is about hiding the grub menu during the timeout. – oKtosiTe Sep 20 '12 at 9:36
  • Sorry, the second link was supposed to be: askubuntu.com/questions/66070/… This includes how to: Hide the Grub2 menu, and use the default menu option – david6 Sep 20 '12 at 9:49

14 Answers 14

You can just change grub settings.

type in terminal

sudo -H gedit /etc/default/grub

you need to change this

Change GRUB_HIDDEN_TIMEOUT_QUIET=false to

GRUB_HIDDEN_TIMEOUT_QUIET=true

Save the file and exit

Type sudo update-grub

If you don't get the result you want, see this bug.

  • 7
    it is currently changed to True but I still see the grub menu... – Alex Poulos Mar 9 '12 at 4:56
  • Im on 12.04 and i tried this but it already said "true" and it still shows up. The only other OS's I have are the failsafe and Memtest - that's it. I've already deleted my Windows Partition and updated grub and the menu still shows. – Alex Poulos Mar 9 '12 at 5:11
  • @AlexPoulos look at this link – hingev Mar 9 '12 at 14:41
  • 2
    Worked for me by changing the timeout to 0 and then make it quiet. Thanks – king_julien Mar 14 '14 at 7:58

I solved this problem by disabling the OS Prober. I did that because in /boot/grub/grub.cfg in the part generated by the template /etc/grub.d/30_os-prober, there was an override of "timeout" to 10 and "style" to menu.

Edit /etc/default/grub and add this line:

GRUB_DISABLE_OS_PROBER=true

Hope you find this useful!

BTW, my full /etc/default/grub is:

GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_DISTRIBUTOR= [...]
GRUB_DISABLE_OS_PROBER=true
GRUB_RECORDFAIL_TIMEOUT=0

Happy coding

  • 2
    that worked for me, but it made dissapear al the other boot options but the default one... – opensas Dec 4 '14 at 2:01
  • 1
    @opensas If the selection menu isn't displayed, how do you even know what boot options "appear" on it? If you want to disable the menu, why would you want non-default boot options? – Kyle Strand Feb 23 '16 at 21:48
  • if you leave out the 'GRUB_TIMEOUT_STYLE=hidden' part, then the countdown is visible, but nothing else, unless you interrupt it. That allows you to get to the menu and change boot settings, even while making it much less obvious. – stonecrusher Oct 4 '16 at 5:45
  • If one wants to be able see the boot menu after holding Shift key, GRUB_TIMEOUT must be set to greater then zero (say, GRUB_TIMEOUT=5). Otherwise, other boot options (say, Windows) can not be activated if needed. – user3804598 Jan 2 '17 at 21:11

I tried all those tips they didnt work, ended up reducing the timeout time to zero as follows:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
  • run sudo update-grub after changing the values – niksmac May 27 '14 at 14:34
  • Same for me. I ran "update-grub" - didn't work. – Robin Winslow Jan 20 '16 at 10:51
  • 1
    This is what my /etc/default/grub but I still get a 10 second countdown with the grub menu showing. – zorkerz Mar 12 '16 at 14:52

You need to edit the file at /etc/default/grub to prevent showing the grub menu.

By default, the entries in that files look like this.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
  • Remove the # mark from second line, and
  • Change the line GRUB_HIDDEN_TIMEOUT_QUIET=false to GRUB_HIDDEN_TIMEOUT_QUIET=true.

After changes, the required portion of the file will look like this


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=""
  • Then run sudo update-grub command in the terminal, and reboot to see the result.
  • 3
    I had this configuration but still the grub menu appears. – YumYumYum Aug 9 '13 at 7:51
  • 1
    With this setting update-grub returns, 'Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported' and I still get a 10 second countdown while showing the grub menu. Setting GRUB_TIMEOUT to 0 returns the same results also. – zorkerz Mar 12 '16 at 14:55
  • @zorkerz which version of ubuntu are you using? – Anwar Mar 12 '16 at 17:11
  • Xenial Xerus but had the same behavior on 15.10 – zorkerz Mar 13 '16 at 17:39

I had the same problem and none of the tips here worked! The only way was to change /boot/grub/grub.cfg manualy. At some point of this file he makes the timeout goes to 10! So, just comment those lines

if [ "${timeout}" = 0 ]; then
  set timeout=10
fi

But, you can never do update-grub again, otherwise it will turn back to the same file, and timeout is going to 10 again! Save the file (in vi you will need to force it even if you are su!). Restart the computer and it will work just fine!

  • Interesting, why not if [ "${timeout}" = 10 ]; then set timeout=0 fi ? Or simply remove the if statement entirely and just leave set timeout=0? – Elder Geek Jun 25 '14 at 3:22
  • This is put there from a template which can be disabled (the OS prober, as mentioned in Agustin's answer). You don't need to manually edit grub.cfg. – Neil Traft Nov 22 '14 at 3:49
  • this worked for me in 14.04 – Kalamalka Kid May 27 '16 at 23:56

if you want to remove a boot entry just type in:

sudo update-grub

If that doesn't work, install the startup manager, like so:

sudo apt-get install startupmanager


with startup-manager you can

  1. choose with entry to boot in,
  2. choose the resolution and, how long to wait before booting,
  3. you can also choose 0 for automatic booting the default boot-entry
  • burg but he is taking about grub – Black Block Mar 8 '12 at 8:38
  • sorry typo. it supposed to be sudo update-grub, i edited the answer – blade19899 Mar 8 '12 at 8:46
  • The only issue with this is that the version of Startup-manager I have doesn't show much options -Imgur – Alex Poulos Mar 9 '12 at 4:50
  • 1
    Im on 12.04 and i tried this but it already said "true" and it still shows up. The only other OS's I have are the failsafe and Memtest - that's it. I've already deleted my Windows Partition and updated grub and the menu still shows – Alex Poulos Mar 9 '12 at 5:11
  • next to "timeout in seconds" there is a box with the number 10 rename it to number 0 – blade19899 Mar 9 '12 at 10:01

Like Agustin, I found that my issue was with the OS Prober. Doing one step better than his solution, I found this gist that will let you have your OSes but still hide the menu. You just need to download those two files, put them into /etc/grub.d, and give them the same permissions as the other templates in that directory.

If you ever want to access your non-default OS, just hold down shift while booting up. That will show the menu.

  • that definitely seems like a bug to me. has anybody reported it??? – opensas Dec 4 '14 at 3:58
  • True... maybe I'll get around to it at some point. No idea if there's one already there. – Neil Traft Dec 7 '14 at 10:01

I've found a simple solution to the problem.

  echo "
  set timeout_style=hidden
  set timeout=2" | sudo tee --append /etc/grub.d/40_custom 

And update grub. It will overwrite timeout settings in grub.cfg, so it doesn't matter what you have in /etc/default/grub. So I have hidden menu that can be invoked by shift for 2 sec.

  • This approach worked for me (grub 2.02~beta3-4ubuntu7 installed by Ubuntu 17.10) when none of the other solutions proposed on this page did (it's really bad luck that I tested this last :/). Thanks! – pchaigno Jul 16 at 8:33

Add the following line to /etc/default/grub:

GRUB_FORCE_HIDDEN_MENU="true"

I've been seeing a lot of people saying that the suggested answers don't work for them. I tried several options and this one worked for me:

Edit /etc/grub.d/00_header, and find:

if [ "\${recordfail}" = 1 ]; then
  set timeout=-1

Change it to...

if [ "\${recordfail}" = 1 ]; then
  set timeout=10

And run update-grub.

for all of you that have word splash in cmd line anything but hardcoding 0 for timeout won't work,,

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=""

Try removing word splash from second last line, update and reboot,, voila, no menu :)

hth, krex

this took me a while but it payed off it was a mix of my own digging and answers above first make sure your /etc/default/grub and /usr/grub/default/grub are the same. then run gksu gedit /etc/grub.d/30_os-prober near the top are the two lines we want but to find them search for styke and change that line to hidden then search for a timeout line it should be like if timeout = 0 set to 10 delete that part from the if to end of file make sure you delete the end of file or your screwed and your grub config should log something like this this is mine just for example:

sets default boot to windows 8.1 pro

GRUB_DEFAULT="Windows 8 (loader) (on /dev/sda1)"

sets a five second window to hit shift so i can boot into Ubuntu

GRUB_HIDDEN_TIMEOUT=5
GRUB_HIDDEN_TIMEOUT_QUIET=true

main fix for error just in case

GRUB_TIMEOUT=0

sets style to hidden

GRUB_TIMEOUT_STYLE=hidden

default Ubuntu stuff

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Attempt this at your own risk and only as a last resort!

I tried editing /etc/default/grub and running sudo update-grub with no results.

Ended up editing /boot/grub/grub.cfg by hand, specifically,

...
### END /etc/grub.d/00_header ###

set timeout=0
saved_entry="Ubuntu"
save_env saved_entry

### BEGIN /etc/grub.d/05_debian_theme ###
...
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=5
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR="lsb_release -i -s 2> /dev/null || echo Debian"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Set this if you hide grubmenu at boot! hidden-timeout has to be 0-10
# NOT recommend with dual-boot systems
# Type ESC/ENTER at boot to make grub-menu visible again! 
# in this case hidden-timeout has to be 3-10
GRUB_DISABLE_OS_PROBER=true

solves the problem! s.grub2 @ubuntuusers! ;-)

Also it's possible to make grub-menu visible again during booting!

IMPORTANT if you have a crash and want to boot an older (and stable) Kernel!

(Tested with Linux Mint 17.3 Rosa which is based on Ubuntu 14.04)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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