Friday, September 9, 2011


To test out the EFI support of some distributions (especially Fedora), I tried to get qemu-kvm to use provide an EFI interface. This can be achieved by calling qemu with the -L switch, to use an alternate EFi bios file (like the one from tianocore: OVMF), instead of the default bios.

To get qemu-kvm up and running, try the following on a recent Fedora 15 setup:

mkdir efiboot

cd efiboot

# Get ovmf, a binary providing the efi interface
mkdir ovmf
cd ovmf
wget ""

cd ..

# Create a seperate folder with all relevant binaries and replace some of them
mkdir qemu
cd qemu
ln -s /usr/share/qemu/* .
ln -s ../ovmf/OVMF.fd efi.bin
ln -s ../ovmf/CirrusLogic5446.rom vgabios-cirrusefi.bin

cd ..

# Create an image and try the distribution in question ...
qemu-img create -f qed a.img 10G
qemu-kvm -L qemu/ -bios efi.bin -m 1024 -hda a.img \
   -cdrom ../Fedora-16-Alpha-x86_64-DVD.iso
# Expecting this to boot, but after the efi boot manager, the booting after grub (?) stalls ...

It turns out that Fedora won't boot on this qemu-kvm setup, instead Ubuntu worked like a charm - but someone already worked on this a couple of years ago.

The Fedora docs mention that the provided efidisk.img should boot on an EFI based system, but this also did not work as expected. Any hints?

1 comment: