在 Ubuntu 14.04中,grub2 Grub更新警告

分享于 

3分钟阅读

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.



这个警告究竟想改变什么?

这是/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=""




答案1

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

你可以注释掉不需要的行。

例如:


#GRUB_HIDDEN_TIMEOUT=0



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


答案2

简短回答:


#GRUB_HIDDEN_TIMEOUT=0


#GRUB_HIDDEN_TIMEOUT_QUIET=true


GRUB_TIMEOUT_STYLE=hidden



或者只删除上面的条目中的前两行,并用


GRUB_TIMEOUT_STYLE=[menu|countdown|hidden]



说明:

你可以使用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.




答案3

改变

 
GRUB_TIMEOUT="10"



 
GRUB_TIMEOUT="0"



然后

 
sudo update-grub





Ubuntu  WAR  warning  GRUB  
相关文章