我正在运行 Ubuntu 22.04.2 LTS 并具有双启动 Windows 11。我试图在启动时隐藏 grub 菜单并自动启动 ubuntu,因为我已经看到可以通过在 /etc/default/grub 中将 GRUB_TIMEOUT 更改为 0 并运行 sudo update-grub 来实现,但 grub 不会隐藏并将时间设置为 10 秒。我能够将计时器更改为不同的值,甚至 -1,但无论出于何种原因,0 都不起作用。我还遇到了在 /etc/grub.d/40_custom 中的解决方案,我应该在文件末尾添加: set default="0" set timeout=0 。虽然这有效,但我担心当发生某些错误时,我将无法进入 ubuntu 高级选项,因为它会在启动时禁用 grub 菜单,所以我决定不使用它。
这是我的 /etc/default/grub:
# If you change this file, run 'update-grub' afterwards to update
# /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=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash loglevel=0"
GRUB_CMDLINE_LINUX=""
# 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"
GRUB_DISABLE_OS_PROBER=false
我将非常感激任何关于为什么我的 grub 菜单无法隐藏的建议。提前谢谢