我已经在 QEMU 中设置了环境,但在启动到 UEFI 控制台时遇到一些问题。我正在运行 QEMU v 5.0.1,并在 UEFI 环境中使用 edk2 运行 Ubuntu 16.04,并MdeModulePkg/MdeModulePkg.dsc
作为 OVMF 构建的平台。我使用以下命令来启动 QEMU 系统:
sudo qemu/x86_64-softmmu/qemu-system-x86_64 -m 1G -enable-kvm \
-machine q35,smm=on \
-smp cores=4,sockets=1 \
-global ICH9-LPC.disable_s3=1 \
-kernel linux-stable/arch/x86/boot/bzImage \
-vga qxl \
-display gtk,show-cursor=on \
-drive if=pflash,format=raw,readonly,file=OVMF_CODE.fd \
-drive if=pflash,format=raw,file=copy_OVMF_VARS.fd \
-hda images/example.qcow2 --append "root=/dev/sda1 console=ttyS0" \
-hdc qemu-img.img \
-debugcon file:debug.log -global isa-debugcon.iobase=0x402 \
-monitor telnet:127.0.0.1:55555,server,nowait -device e1000,netdev=net0 \
-netdev user,id=net0
Run Code Online (Sandbox Code Playgroud)
运行后,它会直接进入 Ubuntu(请参阅此处),但我一直在尝试启动到 UEFI shell,以便我可以查看内存映射地址,但我无法在 Ubuntu 启动之前启动到此。我尝试在启动时输入Esc,Enter和每个F1-键,但都不起作用。F12我尝试过跑步,systemctl reboot --firmware-setup
但这会返回Cannot indicate to EFI to boot into setup mode: No such file or directory
。我不确定还可以尝试什么。最初启动时是否可以通过 qemu 选项进入 EFI shell,而不是启动到 Ubuntu?
归档时间: |
|
查看次数: |
8409 次 |
最近记录: |