我正在使用Linux 20肉桂,我试图隐藏GRUB菜单。我也安装了Windows 10。
根据官方的GRUB文档,如果将GRUB_TIMEOUT_STYLE设置为隐藏,则不应该出现GRUB菜单。
“GRUB_TIMEOUT_STYLE”如果该选项未设置或设置为“菜单”,则GRUB将显示该菜单,然后等待“GRUB_TIMEOUT”设置的超时过期,然后启动默认条目。按下键会中断超时。如果此选项设置为“倒计时”或“隐藏”,则在显示菜单之前,GRUB将等待“GRUB_TIMEOUT”设置的超时过期。如果ESC在此期间按下,它将显示菜单并等待输入。如果按下与菜单项关联的热键,它将立即启动相关的菜单项。如果超时在这两种情况中的任何一种发生之前过期,它将启动默认条目。在“倒计时”的情况下,它将显示出剩余时间的单行指示。
默认情况下,我的/etc/ default /grub文件的配置设置为GRUB_TIMEOUT_STYLE,但仍然没有隐藏。我尝试添加GRUB_HIDDEN_TIMEOUT=0和GRUB_HIDDEN_TIMEOUT_QUIET=true,但正如预期的那样,没有效果。
我的/etc/缺省/grub文件如下所示
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_BACKGROUND="/home/aniketsharma00411/Volume/Aniket/Wallpaper/abstract-laser.jpg"
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# 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_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"我知道一个简单的解决方案是将超时设置为0,但这将使我无法在需要时进入菜单。我只想问一下,根据GRUB文档,为什么GRUB_TIMEOUT_STYLE=hidden在很大程度上不能工作。
P.S.:是的,我是在修改后使用更新-grub。
发布于 2021-03-03 09:03:11
将这一行添加到/etc/default/grub:
GRUB_RECORDFAIL_TIMEOUT=0更新和重新启动:
sudo update-grub
sudo reboothttps://unix.stackexchange.com/questions/614290
复制相似问题