Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 QEMU + Ventoy USB: UEFI boot always drops to EFI Shell instead of auto-boot
#1
Post (English – faithful translation)
Hello,
I am trying to boot a Ventoy USB drive in UEFI mode using QEMU with OVMF, but QEMU always drops into the EFI Shell instead of automatically booting Ventoy.
What works
  • The Ventoy USB boots correctly on real hardware in UEFI mode
  • The Ventoy USB boots correctly in QEMU using Legacy/BIOS mode
  • From the EFI Shell, manual boot works:

    fsX:cd EFI\BOOTBOOTX64.EFI
  • After running this, Ventoy starts normally.
What does NOT work
  • Automatic UEFI boot when using QEMU
  • Even when using:
    • startup.nsh
    • placed in the root of the USB
    • Clean or regenerated OVMF VARS files
    • Passing the USB drive directly as a raw block device
      QEMU still always boots into the EFI Shell.
Environment
  • Host OS: Linux
  • QEMU:
    qemu-system-x86_64
  • UEFI firmware:
    OVMF_CODE_4M.fd
  • +
    OVMF_VARS_4M.fd
  • USB drive passed as a raw block device
  • Standard Ventoy layout (GPT with EFI partition)
Minimal QEMU command (manual boot only works)

Code:
sudo qemu-system-x86_64 \
  -m 2048 \
  -drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE_4M.fd \
  -drive if=pflash,format=raw,file=/usr/share/OVMF/OVMF_VARS_4M.fd \
  -drive file=/dev/sdX,format=raw
Question
Is this a known limitation or incompatibility between:
  • QEMU + OVMF
  • and Ventoy UEFI boot from a USB device?
Are there:
  • recommended QEMU settings for Ventoy UEFI boot?
  • known workarounds (other than manual EFI Shell boot)?
  • an explanation of why OVMF does not automatically detect
    BOOTX64.EFI
  • on the Ventoy USB?
Thanks in advance for any clarification.

Written and then translated with the help of chatGPT
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)