Ubuntu 16.04中的Grub更新警告

在尝试更新Grub时遇到了警告,警告指出设置GRUB_TIMEOUT为非零值且GRUB_HIDDEN_TIMEOUT已设置不再被支持。解决方案是取消GRUB_HIDDEN_TIMEOUT的设置,或者将GRUB_TIMEOUT_STYLE设为'hidden'。通过修改/etc/default/grub文件并重新运行update-grub可以消除警告。

zhuanzi: Ubuntu 14.04中的Grub更新警告 - Ubuntu问答

问题描述

我试图更新Grub所以我运行:

sudo update-grub

Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.

这个警告究竟想要改变什么? (我之前从12.04升级到14.04)

这是我的/etc/default/grub文件:

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

最佳解决思路

您不能同时使用GRUB_HIDDEN_TIMEOUT设置和GRUB_TIMEOUT设置。即使隐藏超时设置为0也是如此。

您可以注释掉您不想要的行。

例如:

#GRUB_HIDDEN_TIMEOUT=0

保存更改后,再次运行sudo update-grub

次佳解决思路

简短回答:

#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT_STYLE=hidden

或者只删除上面条目中的前两行并替换为

GRUB_TIMEOUT_STYLE=[menu|countdown|hidden]

说明:

截至目前(2016年),GRUB_HIDDEN_TIMEOUTGRUB_HIDDEN_TIMEOUT_QUIET选项已被弃用。所以不要再使用它们了。相反,您可以使用GRUB_TIMEOUT_STYLE

根据info -f grub -n 'Simple configuration',你有这个:

'GRUB_TIMEOUT_STYLE'

 If this option is unset or set to 'menu', then GRUB will display
 the menu and then wait for the timeout set by 'GRUB_TIMEOUT' to
 expire before booting the default entry.  Pressing a key interrupts
 the timeout.

 If this option is set to 'countdown' or 'hidden', then, before
 displaying the menu, GRUB will wait for the timeout set by
 'GRUB_TIMEOUT' to expire.  If <ESC> is pressed during that time, it
 will display the menu and wait for input.  If a hotkey associated
 with a menu entry is pressed, it will boot the associated menu
 entry immediately.  If the timeout expires before either of these
 happens, it will boot the default entry.  In the 'countdown' case,
 it will show a one-line indication of the remaining time.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值