【原创】工控机安装Ubuntu系统,直接断电然后再上电时,系统停留在启动项位置等待选择的处理方法

【原创】工控机安装Ubuntu系统,直接断电然后再上电时,系统停留在启动项位置等待选择的处理方法

>Author: chad 
>Mail: [email protected]

电脑直接断电后再次上电时会停在启动项处等待选择启动项,解决这个问题的方法是:
修改 /boot/grub/grub.cfg 文件:

修改前
if [ "${recordfail}" = 1 ] ; then
  set timeout=-1
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
fi

修改后:
if [ "${recordfail}" = 1 ] ; then
  set timeout=1
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
fi

也就是将recordfail状态时的timeout 由-1 修改为大于等于0 的数值即可。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章