Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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've got a bunch of headless servers installed in random (remote) locations all running Ubuntu 11.04. Sometimes the boxes go down and never come back up, eventually someone goes out to check on them to find them sitting at a GRUB screen.

On a normal boot, the machines scream through GRUB with no issue, but it seems like there is some sort of "failsafe" built in that if the machine doesn't boot up properly, the next time the box comes up, it stops at GRUB.

I realize this is for my safety, but due to how the machines are setup, I'd prefer it didn't happen (or at least timeout after a minute or two and try to boot again). Is there anyways to disable this feature?

share|improve this question
up vote 9 down vote accepted

Ubuntu has a "cute" (read: annoying) feature where it records a boot failure and sets a grub timeout of -1, disabling auto-boot. You aren't the only one that doesn't like it, see here.

You should be able to work around this by editing /etc/grub.d/00_header, find the section that reads..

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

..and change it to something sane, like..

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

..then run update-grub.

This file might get reset to default on you during an upgrade of the grub2 package (or the OS), so be careful of that.

share|improve this answer
Note in the bug report linked to in this comment, there is a fix released which is back-ported to 12.04 and 11.10. It requires configuration for it to work as described in comments #13 and #14 of that launchpad bug. – Alex Oct 8 '13 at 6:22

Since Ubuntu 12.10 (and possibly backported to Ubuntu 12.04) the following will work on Ubuntu:

$ echo GRUB_RECORDFAIL_TIMEOUT=20 | sudo tee -a /etc/default/grub
$ sudo update-grub
$ sudo env DEBIAN_FRONTEND=noninteractive dpkg-reconfigure grub-pc

The above was mentioned by Alex in Oct 2013 in response to Shane Madden's answer of Jan 2012. See comments #13 and #14 on this page:

share|improve this answer

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.