单系统中Grub2 Shift键失效的解决

Published: Tags: LINUX

终端命令:sudo gedit /boot/grub/grub.cfg

找到类似于### BEGIN /etc/grub.d/30_os-prober ###的行,其下面数行的内容为:

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

if keystatus --shift; then下面的set timeout=-1改为set timeout=10,保存即可。