Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I am running Ubuntu 12.04.

I cannot for the life of me get the grub menu (with options) to go away.

I would like it to auto-boot into the first option. I've edited /etc/default/grub so that it looks like the following:

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

After this, I ran sudo update-grub. Then I realized that I had grub 2, so I ran sudo update-grub2 (both make it look like they create the grub.cfg file successfully.

I restart my computer and it goes back to the grub menu and just sits there until I make a choice. This is not desirable if the power goes out... :-)

I also tried reinstalling grub using sudo grub-install /dev/sda - also unsuccessful

share|improve this question
Do you by any chance have another partition that you installed Ubuntu to after setting up the current partition that you now wish to boot into automatically? –  fabricator4 Oct 18 '12 at 2:48
I'm not sure what you mean, I'm kind of new to linux. I did install over a previous Ubuntu installation, but I did not upgrade. Clean install. I may have mucked something up partition-wise... that's possible, any ideas on fixing it? –  Eric Oct 18 '12 at 4:20
sudo update-grub and sudo update-grub2 runs the same command. So, don't worry about that part. –  saji89 Oct 18 '12 at 6:01
Please you post the output of cat /boot/grub/grub.cfg via pastebin and share the link here. This is to see the actual grub.cfg generated. –  saji89 Oct 18 '12 at 6:03
Here's the pastebin: of grub.cfg. Thanks for all your help! –  Eric Oct 18 '12 at 13:39

4 Answers 4

As other answers point out, you may be a victim of the recordfail situation. Editing /boot/grub/grub.cfg manually should be out of the question as is automatically generated. Another suggestion seen around is to edit the /etc/grub.d/00_header but then it could prompt for user intervention on updates.

The easiest solution is to define the undocumented GRUB_RECORDFAIL_TIMEOUT variable in /etc/default/grub. For example:



See this answer for more details.

share|improve this answer
Thank you very much, this is exactly what I was looking for! –  Avio Oct 17 '13 at 11:59


grub-editenv create

This will clear grub environment file and should boot clearly the next time.

share|improve this answer
+1 for elegant solution –  Coc Jan 10 '14 at 13:27

I had the problem that the grub menu appeared always after I used the AUFS (unionfs) to put the root filesystem readonly. I had phisically to hit the enter key at the server after every boot. I followed the instructions here : disable grub 2 menu. Since, I had no problems at all.

Edit the /boot/grub/grub.cfg and change:

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


if [ ${recordfail} = 1 ]; then
  set timeout=1
  set timeout=10
share|improve this answer
The before and after in your solution are exactly the same. –  RawwrBag Dec 18 '14 at 1:38
set timeout=-1 is not the same as set timeout=1. The former is "wait forever", and the latter is "wait for one second". –  Jeff McJunkin Jul 22 at 18:36

change the GRUB_TIMEOUT=10 to zero

This is my Configuration file:

GRUB_DEFAULT="Ubuntu, with Linux 3.2.0-30-generic-pae"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

First, write the name of the OS that you want to boot to directly. Mine is Ubuntu. So you will write it as in the GRUB_DEFAULT="Ubuntu, with Linux x.x.x-xx-generic-pae"

then I used 1 second in the GRUB_TIMEOUT= to give me 1 second before selecting the default OS (if I need to boot to another OS for example Xubuntu)

as for GRUB_CMDLINE_LINUX_DEFAULT="" if you remove quite splash it will show you texts instead of the Ubuntu logo during the booting process (I like it this way :P )

There is another solution:

There is a program called boot-repair which helps in configuring with a GUI.

enter image description here

enter image description here

as you can see from the image. there is a box called Unhide boot menu. Just uncheck the box and press appy. You can access this by clicking on the advanced options arrow.

to install boot repair

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install -y boot-repair

and then run boot-reapir either from the terminal or from the dash.

3rd solution:

ou can use an easy to use GUI app called grub-customizer to make your life a little easy. As the name suggests, you can do much more than just reordering Grub menu entries with it.

You can install it by:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

enter image description here

as you can see from the menu there is show menu option. Unhceck and see if it works

share|improve this answer
No change. :-/ I thought GRUB_DEFAULT was supposed to be a numeric # according to the list in the menu? Changing GRUB_TIMEOUT to 0 didn't help. –  Eric Oct 18 '12 at 13:28
@Eric you can use 2 ways: if you know the place of your OS in the grub list you can use a number. But for me I have 4 Linux distros and 1 Windows plus the memTest and the recovery. So its hard for me to memorize their places :) just to make sure(I know you may have done it but just to make sure :P ). Did you run the grub-update after changing the values ? –  Suhaib Oct 18 '12 at 20:20
I did run grub-update after changing the values. :-/ –  Eric Oct 18 '12 at 22:38
I installed and used the boot-repair app you provided, it works on the first reboot. After that, the GRUB menu is back and it sits there until I press a key. Thank you for all your help, I really appreciate it. Not sure where to go from here... –  Eric Oct 19 '12 at 0:23
@Eric ok I found a 3rd solution check it –  Suhaib Oct 21 '12 at 20:25

Your Answer


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.