為什麼 grub2 在從 CD 上的 el torito 引導時忽略內核選項?

為什麼 grub2 在從 CD 上的 el torito 引導時忽略內核選項?

我有一個簡單的手動創建的grub.cfg文件,我將其加載到 中grub-mkimage,然後構建到 iso9660 iso 上的 el torito 映像中。

一切實際上都會啟動,但核心選項被完全忽略。

我的grub.cfg

set default=0
set timeout=10

set gfxmode=auto
insmod efi_gop
insmod efi_uda

menuentry "MyOS" {
    search.fs_label SOMELABEL root
    set gfxpayload=keep
    linux /boot/vmlinuz quiet
    initrd /boot/initrd
}

上面顯示了 grub 啟動選單中的一個項目,如果我使用它進行編輯,e我會看到正確的配置。但它絕對不會傳遞quiet到核心。

圖片:

grub-mkimage -O x86_64-efi -o EFI/BOOT/BOOTX64.EFI --config=boot/grub/grub.cfg --compression=xz disk part_msdos part_gpt linux loopback normal configfile search search_label true iso9660 efi_uga efi_gop gfxterm gfxmenu gfxterm_menu fat ls cat tar

以及 EFI 啟動:

dd if=/dev/zero of=efiboot.img bs=4k count=1000
mkfs.vfat efiboot.img
mount efiboot.img /mnt
cp -r EFI/ /mnt
unmount /mnt

和 iso(忽略 MBR 行):

xorriso -as mkisofs -l -J -R -V SOMELABEL \
  -no-emul-boot -boot-load-size 4 -boot-info-table \
  -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
  -ishybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
  -eltorito-alt-boot -e efiboot.img -no-emul-boot -isohybrid-gpt-basdat \
  -o some_output.iso .

以上所有內容作為要點:https://gist.github.com/deitch/260bb94ecf7932cb83bdf7024099fdb5

編輯:是的,我確實輸入了 grub shellc並嘗試手動輸入屬性。沒有運氣。

相關內容