
Linux from Scratch 11.1,非 system-d 版本,是我正在關注的書。我遵循了一個名叫 Kernotex 的人的指示。我關注了他關於如何在 Windows 電腦上雙重啟動 LFS 的影片。所以我在第 10.4 章中,他正在使用與書上的指令不同的指令來設定 grub。它向我顯示了一個錯誤。
我運行的命令:grub-install --bootloader-id=LFS --recheck --debug & grub-log
有關所有詳細信息,您可以在此處找到日誌:https://pastebin.com/SVX0iW7x
對於那些不想查看日誌的人來說,主要錯誤是:EFI variables are not supported on this system.
另外,如果我必須重新啟動,請給我一個指南,或請幫我完成整個過程。
編輯:它在 8GB USB 驅動器上的 Debian 11 Live 系統上運行。
答案1
和你一樣,我在 chroot 環境中使用 USB 棒來安裝 Gentoo,並使用 grub-install 並得到相同的錯誤:
(chroot) > grub-install --target=x86_64-efi --efi-directory=/boot
Installing for x86_64-efi platform.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry:
No such file or directory.
請依照 Gentoo 手冊引導程式步驟: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader
解決方案在這裡,在手冊的下方:
某些主機板製造商似乎只支援 EFI 系統分區 (ESP) 中 .EFI 檔案的 /efi/boot/ 目錄位置。 GRUB 安裝程式可以使用此--removable
選項自動執行此操作。在執行以下命令之前驗證 ESP 是否已安裝。假設 ESP 安裝在 /boot(如前所述),執行:
(chroot) > grub-install --target=x86_64-efi --efi-directory=/boot --removable
Installing for x86_64-efi platform.
Installation finished. No error reported.
這解決了EFI not supported
問題。這表明錯誤的根源與 USB 記憶棒、主機板的 USB UEFI 設定以及 grub-install 試圖在不存在此類支援的地方執行此操作有關。
告訴grub-install
我們正在使用帶有該標誌的 USB 記憶棒--removable
似乎可以糾正錯誤。