How to disable Grub's menu from showing up after failed boot

I am performing a test in which I hard-reboot a machine with Ubuntu during its boot sequence (just before login prompt appears).

After the reboot, GRUB's menu shows up with no timeout (not its rescue-mode, but the usual menu), as opposed to before reboot where GRUB had a timeout and started to boot Ubuntu.

I am using a fresh installation of Ubuntu 12.04 LTS Server for my tests.

Although it is a nice feature for recovery, I would like GRUB to continue the "usual boot" sequence with the default timeout, instead of the "fail-safe" mode where it waits for input, even if previous boot failed.

How is it possible?


Solution 1:

As I had the same problem and figured out the following solution:

  1. Open /etc/default/grub with an editor

  2. Add a line with this assignment: GRUB_RECORDFAIL_TIMEOUT=N

    Set N to the desired timeout in case of a previously failed boot

  3. Update Grub: sudo update-grub

Solution 2:

I had a similar issue just with Ubuntu 11.10, the following steps worked for me, maybe give it a try and see if this solves your problem:

  1. Run Gedit as root (gksu gedit).

  2. Open /etc/default/grub and locate the following lines:

    GRUB_HIDDEN_TIMEOUT=0
    GRUB_HIDDEN_TIMEOUT_QUIET=true
    
  3. Change the values as follows:

    GRUB_HIDDEN_TIMEOUT=10
    GRUB_HIDDEN_TIMEOUT_QUIET=false
    
  4. Save and run sudo update-grub from your terminal and reboot.

Now GRUB menu should always be shown. Another option is to show GRUB menu only as needed. To do this just hold down the SHIFT button when BIOS load screen appears.

Good luck!