Linux from Scratch-此系统不支持 EFI 变量

Linux from Scratch-此系统不支持 EFI 变量

我正在学习的书籍是 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

像您一样,我使用 USB 棒在 chrooted 环境中使用 grub-install 安装 Gentoo,并遇到了同样的错误:

(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似乎可以纠正错误。

相关内容