[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] OVMF Network Boot


I'm volunteering some information about performing an EFI->iPXE->Ubuntu 14.04 
network boot in an hvm with bios = 
"ovmf".  I couldn't find much information about getting this working so perhaps 
it could be useful for other 
people.  There are some manual steps required but I think a startup.nsh script 
could solve those.

Existing problems with Xen/OVMF:
 * The emulated network card does not have an EFI compliant ROM.  (I tried 
passing romfile= to the qemu process 
but that didn't work so I believe in the same way that hvmloader copies the 
ovmf image to memory it would need 
to do the same for the option rom.)

Existing problems with iPXE (git 15a8800a984239553cbbb6629e076e98a3be7537):
 * http download doesn't seem to work from a menu entry even if the menu is 
fetched via http
 * a file downloaded for the initrd doesn't seem to be available to the linux 

From the iPXE git tree I built an EFI ROM for the e1000 network card:
 # make bin-x86_64-efi/8086100e.efirom

My xen configuration contains:
 vif = [
 disk = [
 bios = "ovmf"

The esp.img file is a file with a gpt containing one partition of type ef00 
formatted with mkfs.vfat -F32.  
The 8086100e.efirom file has been copied in to the ESP.

I have configured a tftp server and built a combined kernel and ramdisk using 
https://github.com/haraldh/mkrescue-uefi/blob/master/mkrescue-uefi.sh as a 
hint.  This is a workaround for ipxe 
not passing the ramdisk to the kernel.
 # objcopy \
    --add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \
    --add-section .cmdline="cmdline.txt" --change-section-vma .cmdline=0x30000 \
    --add-section .linux="vmlinuz.efi" --change-section-vma .linux=0x40000 \
    --add-section .initrd="initrd.lz" --change-section-vma .initrd=0x3000000 \
    linuxx64.efi.stub combined.efi

The iPXE menu entry is:
kernel tftp://<boot_server_ip>/combined.efi
imgargs combined.efi root=/dev/nfs boot=casper netboot=nfs 
nfsroot=<boot_server_ip:/nfs/mount locale=en_GB.UTF-8 keyb=gb mirror/country=GB 
ip=dhcp BOOTIF=01-${net0/mac:hexhyp}

The ipxe imgargs seems to overwrite the values added in cmdline.txt if 

When the domU is started it should not find any bootable device and therefore 
it will launch the UEFI shell.  
Change to fs0: and loadpcirom 8086100e.efirom then exit.  Going to the boot 
manager in the EFI menu should now 
show an EFI Network entry, select this and it should be a normal ipxe 
experience after that.


Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.