[ipxe-devel] ipxe boot a UEFI local ESP directly (using efi_local.c, file:// URI)?
aaron.young at oracle.com
aaron.young at oracle.com
Wed Nov 21 21:15:53 UTC 2018
Hello, I am investigating the possibility of extending iPXE to directly
boot a local UEFI disk - i.e. boot an OS (i.e. grub.efi) on local EFI
System Partition.
Our configuration is a QEMU VM booted in UEFI boot mode (i.e. using
OVMF) which launches iPXE with an embedded script. The embedded iPXE
script needs to be able to access/boot a local (virtio backed) ESP
directly (in fallback cases).
In searching in the internet, the common advice is to simply do a 'exit
1' command from iPXE to drop back into UEFI to resume its boot order
processing to boot the local ESP, but this will not work for our
application. We to be able to boot directly from iPXE and for iPXE to
remain in control upon boot failure.
In searching the iPXE code, I see efi_local.c code which seems to
attempt to address this situation using the file://<volume name>/<path>
URI, such that the following iPXE command would do exactly what we need:
> sanboot file://disk1/EFI/redhat/grubx64.efi
However, this encounters a number of problems currently and doesn't
work, such as:
1. It appears that OVMF is not, by default, connecting the HDs, thus
the efi_local.c code finds no simple_file_system_protocol handles - thus
finds no HDs.
2. It appears that HDs passed from qemu to OVMF have no VolumeLabel
assigned - thus efi_local.c: efi_local_check_volume_name() cannot match
the <volume name> portion of the URI properly.
3. the efi_block.c:efi_block_hook() code *appears* to assume booting
over SNP - using last_opened_snpdev(). This seems to cause boot failure
(even when the above two issues are circumvented).
My questions are:
1. Is the efi_local.c code supposed to be fully functional in the
configuration I describe above?
2. If not, is there (planned) on-going work in this area (that I
could possibly leverage/contribute to)?
Any other info/advice/suggestions/comments from anyone regarding this
topic would be greatly appreciated.
Thanks in advance!
-Aaron Young
More information about the ipxe-devel
mailing list