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

Re: UEFI PXE step by step instructions?



On Tue, 2015-05-26 at 09:30 +0000, Andrew M.A. Cater wrote:
> I can't find any references for how to PXE boot UEFI: I find lots of
> posts complaining that pxelinux.0 is not compatible with UEFI and not
> much more.

I've struggled a bit with this recently for work and am still figuring
some stuff out. AFAICT network boot is not a generally well solved
problem in the UEFI world.

There does seem to be a pxelinux.efi in the world, but I was using ARM
so I've not tried it. It seems that some folks (e.g. Ubuntu and the
product team at work, so not a huge sample set) prefer to use grub.efi
in any case, even on x86.

I ended up building a grub.efi to use in place of pxelinux.0, with
something like:

grub-mkimage -O "$platform" \
             -o pxegrub-$arch.efi -p "$grubpfx" \
             search configfile normal efinet tftp net

where $platform is the grub platform name (x86_64-efi, arm64-efi etc),
$arch is the Debian arch, and $grubpfx is a path (relative to tftproot)
which contains a grub/grub.cfg which in turn contains:

----
set stage1=yes
configfile /grub.cfg-'$net_default_mac'
----

IOW it just loads a new config file based on the mac address of the
device used to pxe (a bit like how pxelinux finds pxelinux.cfg). Adjust
paths to suit etc.

To use this you need to arrange for the DHCP next-binary option to point
to the pxegrub-$arch.efi. I did this by raising a ticket with IT people,
YMMV :-) I saw various things online like
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-netboot-pxe-config-efi.html which seem to try and configure a sane default based on who is asking. I don't think we bothered, we just put it in the per-machine stanza.

http://lists.xen.org/archives/html/xen-devel/2015-05/msg03087.html is
the encoding of the setup stages of this into our test system, I doubt
that'll be very useful for you though, I've tried to reproduce the
pertinent bits above.

HTH at least a little,

Ian.


Reply to: