How do I test bootable USB created with UEFI GPT partition scheme
5,187
Solution 1
sudo apt-get install ovmf qemu-efi qemu
qemu-system-x86_64 --bios /usr/share/qemu/OVMF.fd -m 4096 -enable-kvm -cdrom debian-9.2.1-amd64-DVD-1.iso -display sdl -vga virtio
You can specify also an HD (virtual or physical)
Solution 2
You could try VirtualBox. VirtualBox supports UEFI (you will have to enable it in the settings.) VirtualBox also supports USB passtrough, so there may be a good chance you will be able to boot from the USB drive.
Related videos on Youtube
Author by
Ohto Nordberg
Updated on September 18, 2022Comments
-
Ohto Nordberg over 1 year
I am frequently testing bootable USB devices with different operating systems. Now I have to boot the whole computer just to test one USB device. How can I test the devices without booting? QEMU works sometimes, but not with UEFI GPT devices. Command
sudo qemu-system-x86_64 /dev/sde1
just hangs with "Booting from Hard Disk ...". -
Ohto Nordberg over 7 yearsI tried this but it did not work, no uefi support I guess askubuntu.com/questions/693719/…
-
Ohto Nordberg over 7 yearsNeither did this. virten.net/2014/12/howto-usb-boot-a-vm-in-vmware-workstation-11
-
Johan Myréen over 7 yearsVirtualBox does support EFI, I know because I have used it to boot Arch Linux with systemd-boot and an efistub kernel. You just have to enable EFI in Settings -> System -> Enable EFI (Special OSes only). (I don't know why it says that.) The real problem seems to be that VirtualBox does not allow booting from a USB drive. You could try trick mentioned last on the page you linked to, i.e. copy the contents of the USB drive to a disk file. That's not exaclty the same thing as booting from a real USB drive, though.
-
Ohto Nordberg over 7 yearsYes, VirtualBox supports EFI, but Plop Boot Manager doesn't.