Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several ubuntu guests inside a Mac OS X virtualbox host. When I start them, about half of the time they correctly boot and get to their login screens/start all their services. The other half of the time, they sit waiting for me to choose an OS. This is fine when I'm sitting in front of them, but I'd like the VMs to automatically boot when the machine starts.

It's worth noting that the same problem doesn't seem to happen if I do a reboot from within the guest OS.

What I've tried:

I've tried uncommenting GRUB_HIDDEN_TIMEOUT and running update-grub, this makes the guest OS boot correctly more often, but doesn't fix the problem. Booting them headlessly doesn't help either.

Where they get stuck:

what I see about half the time


# 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_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

# Uncomment to disable graphical terminal (grub-pc only)

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

# Uncomment to disable generation of recovery mode menu entries

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"


Grub 1.99-21ubuntu3.9
Ubuntu Server LTS
Virtualbox 4.2.10
share|improve this question
Comment out the init tune and try again. – schaiba Mar 20 '13 at 21:50
I changed that, re-ran update-grub, and same problem. – Nick ODell Mar 20 '13 at 22:07

To expand on @nick's answer, this is indeed the record failure feature.

However, rather than modifying /etc/grub.d/00_header, you can add the follwing line to /etc/default/grub


(Or however long you want the timeout to be) and then run sudo update-grub

share|improve this answer
Thank you. works like charm. – risyasin Sep 8 '14 at 6:51
up vote 3 down vote accepted

So, it turns out this is a documented feature of grub. If your computer shuts down abnormally, it won't boot into an OS automatically. This is why the problem never happened when I rebooted from within the OS.

How to disable

Just in case that link goes dead:

Disable Grub2's recordfail feature

For most people, this new feature of Grub 2 is certainly a good thing. But for those plagued by one of the bugs or who would like to disable it for other reasons:

Open the file /etc/grub.d/00_header via

sudo nano /etc/grub.d/00_header

Look for

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

Change it to

set timeout=5

Save the file and run

sudo update-grub
share|improve this answer
You should shutdown properly your VM's instead ;). – Braiam Oct 23 '13 at 16:40

Have you tried modifying /boot/grub/menu.lst and setting timeout to 0?

share|improve this answer
Nope. I don't have that file on my system. – Nick ODell Mar 20 '13 at 23:04
@NickODell It's probably /boot/grub/grub.conf – Michael Mrozek Mar 21 '13 at 3:17
@MichaelMrozek I don't have that file either. EDIT: I do, however, have grub.cfg – Nick ODell Mar 25 '13 at 20:30

What you need is to set GRUB_TIMEOUT to zero in /etc/default/grub. For more information run: info -f grub -n "Simple configuration"

vi /etc/default/grub


sudo update-grub

and now reboot

share|improve this answer
I've solved this already. Turns out the problem was grub's recordfail feature. – Nick ODell Oct 23 '13 at 19:38

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.