Update GRUB2 menu timeout on RHEL 7 Linux

The default settings for the GRUB2 timeout menu selection during the system boot is 5 seconds. To change this value open /etc/default/grub grub default config file. The content of the file looks similar the the one shown below:

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/root crashkernel=auto  \ 
rd.lvm.lv=rhel/swap vconsole.font=latarcyrheb-sun16 vconsole.keymap=us rhgb quiet"
GRUB_DISABLE_RECOVERY="true"



To change the timeout settings simply updated the GRUB_TIMEOUT GRUB2 directive the to desired number of seconds your wish GRUB2 wait until you make your boot menu selection. For example to make GRUB 2 wait 20 seconds change this value to:

GRUB_TIMEOUT=20

In case that you do not wish GRUB 2 menu to appear / disable change the value to 0 seconds:

GRUB_TIMEOUT=0

Once you have updated your settings update GRUB2 settings using grub2-mkconfig command to create a new updated GRUB2 config file:

[root@rhel7 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-123.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-123.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-75387b56d72b48b380810499805ec28a
Found initrd image: /boot/initramfs-0-rescue-75387b56d72b48b380810499805ec28a.img
done