Grub 自动启动超时

Grub 自动启动超时

在 Ubuntu 10.4 LTS 上,我希望 Grub 在 5 秒后启动默认操作系统。我想查看启动脚本的输出。

目前 grub 一直等待,直到我按下回车键,启动脚本的输出才可见。有人能告诉我如何配置/etc/default/grub或任何其他设置吗?

我尝试玩了GRUB_TIMEOUT一下,然后GRUB_DEFAULT做了一下sudo update-grub,但什么都没有改变。

有任何想法吗?

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_SAVEDEFAULT=true

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
# GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

答案1

要显示初始化脚本的结果,请删除quiet如下选项:

GRUB_CMDLINE_LINUX_DEFAULT="splash"

要解决永远等待的问题,请尝试编辑文件/etc/grub.d/00_header并替换

if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=${GRUB_TIMEOUT}
fi

set timeout=${GRUB_TIMEOUT}

然后启动sudo update-grub

相关内容