Centos Redhat Change Grub 2 Boot Timeout value


Accessing server console using IPMI remotely can add considerable delay and if you reboot the server there are chances you will never see grub load and boot kernel selection screen. If you want to select different kernel or want to make changes in boot procedure for example enabling emergency mode then you cannot do it.

Its because default grub timeout is 5 sec and by the time you see anything on console with IPMI kernel is already selected with server booted with default settings.

1) Centos 6 using Grub

In order to increase grub timeout value login to server as root and open /etc/grub.conf using vi or nano.

You need to change timeout=5 parameter in /etc/grub.conf

It take value in seconds and default is 5 secs, you should setup it to about 15 seconds to be safe.

Change Centos Grub Timeout

Change Centos Grub Timeout

2) Centos 7 using Grub2

If server is using Grub 2 which is default with centos 7 then you need to edit following grub2.cfg file

File is located at /boot/grub2/grub.cfg
You can load it using nano /boot/grub2/grub.cfg

symlink should also be there in /etc so it can be loaded from /etc/grub2.cfg

You have to look for “set timeout” parameter in grub2.cfg which will be under “terminal_output console” section. Simply change
set timeout=5
To
set timeout=25

set timeout also take value in seconds so you can modify accordingly.

Check attach screenshot of grub2.cfg which show set timeout code.

grub2 set timeout

grub2 set timeout

Leave a comment

Your email address will not be published. Required fields are marked *