Grub 不显示启动菜单

Grub 不显示启动菜单

我有两个硬盘。第一个装有 Ubuntu。第二个,我刚刚安装了 ClearLinux。但是 GRUB 不显示启动菜单,而是立即启动 Ubuntu。

一些信息:

➜  ~ lsblk -l | grep -v snap
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop29   7:29   0 310,8M  1 loop 
sda      8:0    0 232,9G  0 disk 
sda1     8:1    0   149M  0 part 
sda2     8:2    0 232,8G  0 part 
sdb      8:16   0 111,8G  0 disk 
sdb1     8:17   0 111,8G  0 part /
sr0     11:0    1  1024M  0 rom
➜  ~ sudo update-grub                                                                                                         
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Création du fichier de configuration GRUB…
Image Linux trouvée : /boot/vmlinuz-5.4.0-89-generic
Image mémoire initiale trouvée : /boot/initrd.img-5.4.0-89-generic
Image Linux trouvée : /boot/vmlinuz-5.4.0-88-generic
Image mémoire initiale trouvée : /boot/initrd.img-5.4.0-88-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Clear Linux OS trouvé sur /dev/sda2
fait

和 :

➜  ~ cat /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=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
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 以显示启动菜单?其他答案 atlk 关于 a GRUB_HIDDEN_TIMEOUT。但它不在 grub 配置文件中。

注意:我看到有关 EFI 的讨论,但我对 UEFI/EFI 不太了解...

编辑:在计算机启动时按 Shift,我可以显示 grub 启动菜单。但 Grub 列表仅显示 Ubuntu!

谢谢 !

答案1

GRUB_HIDDEN_TIMEOUT 用于旧版本的 grub。

改变

GRUB_TIMEOUT_STYLE=hidden

GRUB_TIMEOUT_STYLE=menu

然后运行update-grub

这与在旧版本的 grub 中注释掉 GRUB_HIDDEN_TIMEOUT 的作用相同。

相关内容