System administrator

Grub2: Boot in recovery mode, Like a boss!

There are 1000 things that can go wrong ultimately leading to server crash/freeze. Some of the most common reason are : network problems, system overload, configuration errors, hardware issues, out of disk space etc.

When things go wrong we restart server in recover mode. Sometimes by default on reboot, grubs menu shows up with no timeout. This can prevent you from automatically rebooting your servers (as grub will infinitely wait for a user input).

You certainly in most of the cases want to avoid such situation. This can easily be done in a few steps.

Open the file /etc/default/grub with an editor and add the variable GRUB_RECORDFAIL_TIMEOUT as following:


where N =  desired timeout in seconds. This will make the grub wait for N secs and then continue with default choice.

In case you do not want any timeout at all, set it to -1.


If you want to completely disable the menu (even for failed startup), set it to 0


Now save the file and update grub by:

sudo update-grub

This will apply your changes to the grub as desired.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s