centos7更改引导项等待时间

本人使用centos7操作系统,有许多开机自启动服务,从存储服务器挂载了一块盘,由于每次启动机器的时候存储服务器启动的时间较长,导致机器启动后硬盘挂载不成功,部分服务无法启动,于是查阅了延长centos7开机等待时间的方法,记录以备忘。

centos7已经不用grub,改用grub2。

[ root]# vi /boot/grub2/grub.cfg

找到并更改启动时间(timeout)

#将开机时的菜单选择时间由5秒缩短为600秒
#将set timeout=5修改为set timeout=2即可
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=600
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=2
fi

重启CentOS7,OK!

原文地址:https://www.cnblogs.com/hello_word/p/11557944.html