I'm trying to emulate a EFI environment using QEMU (kmv); virtualbox takes 15 minutes to boot in EFI mode using archboot.
Using legacy BIOS mode, I can boot using this command:
root@citsnmaiko-deb:/home/maiko/uefi/ovmf# qemu-system-x86_64 -kernel ../bzImage -initrd ../rootfs.gz -append "rw root=/dev/ram0 ramdisk_size=40960"
and it works with my custom kernel and file system.
file ../bzImage
../bzImage: Linux kernel x86 boot executable bzImage, version 3.6.1 (root@citsnmaiko-deb) #4 , RO-rootFS, swap_dev 0x3, Normal VGA
it has EFI support too.
I'm trying to do the same with EFI files that I downloaded from here
wget http://ufpr.dl.sourceforge.net/project/edk2/OVMF/OVMF-X64-r11337-alpha.zip -P ovmf
cd ovmf/
unzip -x OVMF-X64-r11337-alpha.zip
# rename the files for QEMU find them
mv OVMF.fd bios.bin
mv CirrusLogic5446.rom vgabios-cirrus.bin
# start QEMU
root@citsnmaiko-deb:/home/maiko/uefi/ovmf# qemu-system-x86_64 -L . -kernel ../bzImage -initrd ../rootfs.gz -append "rw root=/dev/ram0 ramdisk_size=40960"
Could not open option rom 'linuxboot.bin': No such file or directory
pci_add_option_rom: failed to find romfile "pxe-e1000.bin"
And I'm dropped in an EFI shell, not enable to boot.
If I use the the latest Ubuntu release using the same EFI environment
root@citsnmaiko-deb:/home/maiko/uefi/ovmf# qemu-system-x86_64 -L . -boot d -cdrom ../ubuntu-12.10-desktop-amd64.iso
pci_add_option_rom: failed to find romfile "pxe-e1000.bin"
... the boot process works fine.
I've tried to replace the Ubuntu boot files with mine but maybe I don't completely understand its functionality. When I just replace the files after mounting the ISO:
mkdir tmp
bsdtar xf ubuntu-12.10-desktop-amd64.iso -C tmp
cp bzImage tmp/casper/vmlinuz
cp rootfs.gz tmp/casper/initrd.lz
genisoimage -o customUbuntu.iso tmp/
qemu-system-x86_64 -L . -boot d -cdrom customUbuntu.iso
the same EFI Shell appears. Is it ok? initrd.lz and rootfs.gz are interchangeable right? How about bzImage and vmlinuz ?
What am I missing?