为什么我的编译内核没有显示在GRUB引导菜单中?

古里伯94

我正在尝试编译并安装自己的内核(5.2.0-rc7),直到我重新引导以实际引导到它并无法从GRUB引导菜单中选择它为止,一切似乎都可以正常工作。我已经根据Arch Wiki上的说明编写了一个脚本(并手动完成了该脚本),并为我进行了编译和安装一切都编译make modules_install正确将正确的文件放在/ lib / modules文件夹中,并且正确的映像似乎在/ boot目录中。mkinitcpio完成没有错误,当我运行时,grub-mkconfig它似乎找到了新安装的自定义内核,并提供了以下输出:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
Found linux image: /boot/vmlinuz-5.2.0-rc7-test
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.2.0-rc7-test.img
done

当我查看生成的grub.cfg文件时,我看到它确实包含了预期的新安装的内核,如下所示:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  9c56060e-d76c-4cea-8c41-137092164107
else
  search --no-floppy --fs-uuid --set=root 9c56060e-d76c-4cea-8c41-137092164107
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9c56060e-d76c-4cea-8c41-137092164107' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  9c56060e-d76c-4cea-8c41-137092164107
    else
      search --no-floppy --fs-uuid --set=root 9c56060e-d76c-4cea-8c41-137092164107
    fi
    echo    'Loading Linux linux ...'
    linux   /boot/vmlinuz-linux root=UUID=9c56060e-d76c-4cea-8c41-137092164107 rw  quiet
    echo    'Loading initial ramdisk ...'
    initrd  /boot/intel-ucode.img /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-9c56060e-d76c-4cea-8c41-137092164107' {
    menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-9c56060e-d76c-4cea-8c41-137092164107' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  9c56060e-d76c-4cea-8c41-137092164107
        else
          search --no-floppy --fs-uuid --set=root 9c56060e-d76c-4cea-8c41-137092164107
        fi
        echo    'Loading Linux linux ...'
        linux   /boot/vmlinuz-linux root=UUID=9c56060e-d76c-4cea-8c41-137092164107 rw  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/intel-ucode.img /boot/initramfs-linux.img
    }
    menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-9c56060e-d76c-4cea-8c41-137092164107' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  9c56060e-d76c-4cea-8c41-137092164107
        else
          search --no-floppy --fs-uuid --set=root 9c56060e-d76c-4cea-8c41-137092164107
        fi
        echo    'Loading Linux linux ...'
        linux   /boot/vmlinuz-linux root=UUID=9c56060e-d76c-4cea-8c41-137092164107 rw  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initramfs-linux-fallback.img
    }
    menuentry 'Arch Linux, with Linux 5.2.0-rc7-test' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.2.0-rc7-test-advanced-9c56060e-d76c-4cea-8c41-137092164107' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  9c56060e-d76c-4cea-8c41-137092164107
        else
          search --no-floppy --fs-uuid --set=root 9c56060e-d76c-4cea-8c41-137092164107
        fi
        echo    'Loading Linux 5.2.0-rc7-test ...'
        linux   /boot/vmlinuz-5.2.0-rc7-test root=UUID=9c56060e-d76c-4cea-8c41-137092164107 rw  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/intel-ucode.img /boot/initramfs-5.2.0-rc7-test.img
    }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

但是,当我重新启动虚拟机时,我看到Grub菜单没有列出新安装的内核,而仅列出了标准内核。根据Arch Wiki的描述,所有需要做的就是运行grub-mkconfig命令以生成新的grub配置文件,如果它反映在配置文件中,则应该显示出来,但事实并非如此。

我想念什么?如何使新安装的内核显示在Grub引导菜单中?谁能指出我正确的方向?谢谢。

我正在5.1.16-arch1-1-ARCH使用Virtualbox 6.0.4 r128413运行的Arch Linux上执行此操作

弗雷迪

您已经看到您的新内核Arch Linux, with Linux 5.2.0-rc7-test是子菜单中的第三个条目Advanced options for Arch Linux吗?

如果仍然没有显示,请尝试以下操作:

  1. c在命令行的grub菜单中
  2. 输入echo $prefix Enter,这应该显示您的分区和路径/boot/grub验证这是正确的分区。
  3. 输入cat $prefix/grub.cfg Enter,这应该显示您的当前状态grub.cfg如果这是一个不同的文件,则说明grub安装有问题。


说明文件:

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

如何使GRUB顶层菜单中显示的引导备用内核选项?

来自分类Dev

为什么我的引导卡没有彼此相邻显示?

来自分类Dev

为什么我的“菜单”栏没有显示在我的JFrame“窗口”对象中?

来自分类Dev

为什么我的自定义菜单没有显示在Wordpress中?

来自分类Dev

为什么我没有弹出菜单显示在Eclipse中?

来自分类Dev

为什么我的自定义帖子类型没有显示在管理菜单中?

来自分类Dev

为什么菜单没有显示?-Tkinter

来自分类Dev

grub中没有内核

来自分类Dev

我删除的内核中的Grub引导

来自分类Dev

为什么我的文字没有显示在我的DIV中?

来自分类Dev

我没有GRUB菜单

来自分类Dev

当我输入一段代码时,为什么下拉菜单中没有显示文本

来自分类常见问题

为什么图片没有显示在我的HTML中?

来自分类Dev

为什么我的图像没有显示在jsp中?[困惑]

来自分类Dev

为什么我的照片在画廊中没有显示?

来自分类Dev

为什么我的微调器没有显示在Turbolinks中?

来自分类Dev

为什么我的图像没有显示在Microsoft Edge中?

来自分类Dev

为什么我的组件模板没有显示在Vue中?

来自分类Dev

为什么标签没有显示在我的QuickAccessToolbar中?

来自分类Dev

为什么我的Opera窗口没有显示在Unity中?

来自分类Dev

为什么我的对象没有显示在JavaFX中?

来自分类Dev

为什么我的图像没有显示在html中?

来自分类Dev

为什么我的范围没有显示在指令中?

来自分类Dev

为什么我的列表没有显示在Android Studio中?

来自分类Dev

为什么我的 recyclerview 没有在片段中显示数据?

来自分类Dev

为什么我的布局没有显示在 Android Studio 中?

来自分类Dev

为什么我的数据没有显示在 recyclerview 中?

来自分类Dev

为什么我的图像没有显示在 UIImageView 中?

来自分类Dev

为什么我的字形图标没有显示在导航栏上(引导程序)?

Related 相关文章

  1. 1

    如何使GRUB顶层菜单中显示的引导备用内核选项?

  2. 2

    为什么我的引导卡没有彼此相邻显示?

  3. 3

    为什么我的“菜单”栏没有显示在我的JFrame“窗口”对象中?

  4. 4

    为什么我的自定义菜单没有显示在Wordpress中?

  5. 5

    为什么我没有弹出菜单显示在Eclipse中?

  6. 6

    为什么我的自定义帖子类型没有显示在管理菜单中?

  7. 7

    为什么菜单没有显示?-Tkinter

  8. 8

    grub中没有内核

  9. 9

    我删除的内核中的Grub引导

  10. 10

    为什么我的文字没有显示在我的DIV中?

  11. 11

    我没有GRUB菜单

  12. 12

    当我输入一段代码时,为什么下拉菜单中没有显示文本

  13. 13

    为什么图片没有显示在我的HTML中?

  14. 14

    为什么我的图像没有显示在jsp中?[困惑]

  15. 15

    为什么我的照片在画廊中没有显示?

  16. 16

    为什么我的微调器没有显示在Turbolinks中?

  17. 17

    为什么我的图像没有显示在Microsoft Edge中?

  18. 18

    为什么我的组件模板没有显示在Vue中?

  19. 19

    为什么标签没有显示在我的QuickAccessToolbar中?

  20. 20

    为什么我的Opera窗口没有显示在Unity中?

  21. 21

    为什么我的对象没有显示在JavaFX中?

  22. 22

    为什么我的图像没有显示在html中?

  23. 23

    为什么我的范围没有显示在指令中?

  24. 24

    为什么我的列表没有显示在Android Studio中?

  25. 25

    为什么我的 recyclerview 没有在片段中显示数据?

  26. 26

    为什么我的布局没有显示在 Android Studio 中?

  27. 27

    为什么我的数据没有显示在 recyclerview 中?

  28. 28

    为什么我的图像没有显示在 UIImageView 中?

  29. 29

    为什么我的字形图标没有显示在导航栏上(引导程序)?

热门标签

归档