GRUB 不显示所有内核

GRUB 不显示所有内核

我在 14.04 上安装了 16.04。

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:    16.04
Codename:   xenial

问题是加载了旧内核

uname -a
Linux bendyna-ub 4.2.0-38-generic #45~14.04.1-Ubuntu SMP Thu Jun 9 09:27:51 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

但是内核 4.4.0 也安装了。它位于 /boot/grub/grub.cfg 中

 menuentry 'Ubuntu, with Linux 4.4.0-97-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-97-generic-advanced-e8bffb7c-4340-4424-be72-119b53843aa4' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod ext2
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  e8bffb7c-4340-4424-be72-119b53843aa4
    else
      search --no-floppy --fs-uuid --set=root e8bffb7c-4340-4424-be72-119b53843aa4
    fi
    echo    'Loading Linux 4.4.0-97-generic ...'
    linux   /boot/vmlinuz-4.4.0-97-generic root=UUID=e8bffb7c-4340-4424-be72-119b53843aa4 ro  
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-4.4.0-97-generic
}

重启后我在 GRUB 菜单中看不到它。grub.cfg 菜单中有 7 个项目

menuentry 'Ubuntu, with Linux 4.4.0-97-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-97-generic-advanced-e8bffb7c-4340-4424-be72-119b53843aa4' {
menuentry 'Ubuntu, with Linux 4.4.0-97-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-97-generic-init-upstart-e8bffb7c-4340-4424-be72-119b53843aa4' {
menuentry 'Ubuntu, with Linux 4.4.0-97-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-97-generic-recovery-e8bffb7c-4340-4424-be72-119b53843aa4' {
menuentry 'Ubuntu, with Linux 4.2.0-38-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-38-generic-advanced-e8bffb7c-4340-4424-be72-119b53843aa4' {
menuentry 'Ubuntu, with Linux 4.2.0-38-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-38-generic-init-upstart-e8bffb7c-4340-4424-be72-119b53843aa4' {
menuentry 'Ubuntu, with Linux 4.2.0-38-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-38-generic-recovery-e8bffb7c-4340-4424-be72-119b53843aa4' {
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {

在 GRUB 菜单中,我只看到 Ubuntu 和“高级选项”。在“高级选项”子菜单中,只有 2 个项目“Ubuntu,带有 Linux 4.2.0-38-generic”和“Ubuntu,带有 Linux 4.2.0-38-generic(恢复模式)”

奇怪的是菜单中的 GRUB 版本是 2.02~beta2-36ubuntu3.2。而 grub-install --version 是 grub-install (GRUB) 2.02~beta2-36ubuntu3.12

答案1

我解决了问题 - 需要在 EFI 中重新安装 grub

这对我有帮助https://wiki.archlinux.org/index.php/GRUB#UEFI_systems

相关内容