UEFI 交互式 shell virtualbox 无法从物理 USB 设备运行 grubx64.efi
我需要从 virtualbox UEFI 交互式 shell 启动 grub。
运行 grubx64.efi 没有任何反应,空白,并且无法启动 grub。USB 设备在物理机上运行正常
[UEFI 交互式 shell virtualbox 无法运行 grubx64.efi][1]
虚拟机配置如下:
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.15-linux">
<Machine uuid="{2aeceaf8-dd57-468a-93e1-c44d5c00b1ba}" name="multiboot" OSType="Other" snapshotFolder="Snapshots" lastStateChange="2022-02-03T16:45:16Z">
<MediaRegistry>
<HardDisks>
<HardDisk uuid="{7b745c5b-4cdb-49d7-a9de-ce4554ca5456}" location="/home/n7rc/Documentos/multiboot.vmdk" format="VMDK" type="Normal"/>
</HardDisks>
<DVDImages>
<Image uuid="{78866b76-b5cb-4b7c-b4bd-882cacc6ad71}" location="/home/n7rc/Documentos/isos/ADRIANE-KNOPPIX_V7.2.0gCD-2013-07-28-EN.iso"/>
</DVDImages>
</MediaRegistry>
<ExtraData>
<ExtraDataItem name="GUI/LastCloseAction" value="PowerOff"/>
<ExtraDataItem name="GUI/LastNormalWindowPosition" value="448,87,512,419"/>
</ExtraData>
<Hardware>
<CPU>
<PAE enabled="true"/>
<LongMode enabled="false"/>
<HardwareVirtExLargePages enabled="false"/>
</CPU>
<Memory RAMSize="2048"/>
<Firmware type="EFI"/>
<Boot>
<Order position="1" device="HardDisk"/>
<Order position="2" device="None"/>
<Order position="3" device="None"/>
<Order position="4" device="None"/>
</Boot>
<Display VRAMSize="4"/>
<VideoCapture screens="1" file="." fps="25"/>
<RemoteDisplay enabled="false"/>
<BIOS>
<SmbiosUuidLittleEndian enabled="true"/>
</BIOS>
<USB>
<Controllers>
<Controller name="OHCI" type="OHCI"/>
<Controller name="EHCI" type="EHCI"/>
</Controllers>
</USB>
<Network>
<Adapter slot="0" enabled="true" MACAddress="08002736A5D1" cable="true" type="Am79C973">
<NAT/>
</Adapter>
</Network>
<AudioAdapter driver="Pulse" enabled="true" enabledIn="false"/>
<Clipboard/>
<GuestProperties>
<GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="es_ES" timestamp="1643906617397912000" flags=""/>
</GuestProperties>
</Hardware>
<StorageControllers>
<StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
<Image uuid="{7b745c5b-4cdb-49d7-a9de-ce4554ca5456}"/>
</AttachedDevice>
</StorageController>
</StorageControllers>
</Machine>
</VirtualBox>
答案1
使用 --uefi-secure-boot 选项修复了为 efi 安装 grub 的问题。
sudo grub-install --target=x86_64-efi --recheck --removable --uefi-secure-boot --efi-directory=/efi_esp_mount --boot-directory=/data_mount/boot/