I'm trying to PXE boot UEFI clients. My current setup for BIOS clients uses pxelinux.0 with a pxelinux.cfg/default like this:

DEFAULT vmlinuz-3.8.0-25-generic
APPEND initrd=initrd.img-3.8.0-25-generic root=/dev/nfs nfsroot= ip=dhcp ro nomodeset

But I'm struggling to do the same with UEFI, party because there are so many different approaches that can be taken, and there is so little good documentation out there.

Following this guide to PXE booting the netboot mini.iso on UEFI, I was able to PXE boot into the installer, but thus far I haven't figured out how to adapt those instructions to my use case.

So there are few things I'm after:

  1. What boot loader is recommended for PXE booting UEFI clients?

  2. Can you point me to a working example of using said boot loader to PXE boot a UEFI client whose rootfs is exported over NFS?

  3. I've seen many tutorials referencing the pxe and pxecmd grub modules, but those aren't present on Ubuntu 13.04... are they deprecated, and if so, what replaces them?

Options I'm considering:

In this sea of options, I'm hoping to find a low risk solution that will continue to be well supported by Ubuntu.

  • Use grub2 by all means. grub doesn't support new network cards.
    – Braiam
    Jul 25, 2013 at 16:19
  • Looks like you can boot directly to a .efi file from the TFTP server. fedoraproject.org/wiki/QA:Testcase_UEFI_pxeboot It's just that you need to create a valid bootloader image for your UEFI machines.
    – gertvdijk
    Jul 25, 2013 at 20:11
  • @jderose - how many clients are there, and which installations are running on them ? Jul 27, 2013 at 1:23

2 Answers 2


How to netboot using ELILO

How to get EFI to netboot?

You do not need any additional software to get EFI to start a netboot session. Any EFI machine can be configured to start a PXE/DHCP session IF it has a network adapter that has support for the UNDI/PXE protocol. Most modern cards do have such support.

To enable netbooting, you need to go into the EFI boot manager maintenance menu and 'Add a boot option'. On the screen you see the list of devices to boot from. At least one of them should be of the form:

Load File [Acpi(PNP0A03,0)/Pci(5|0)/Mac(00D0B7A6FC25)]

which represent Ethernet card (Mac address). If you don't have such option, it means that you either do not have a network adapter in your machine or it does not have the UNDI/PXE support in its option ROM.

You need to select this option and give it a logical name such as 'netboot', for instance. Next, you leave the maintenance menu and go back to the main menu. You now have a new boot menu option. If you select 'netboot' then EFI will start the PXE/DCHP discovery request and look for a server to get an IP address.

On the server side, you can use a standard DHCP server.

Netbooting using PXE

EFI has builtin support for PXE. In fact it first tries PXE and then default to DHCP when it does not find a valid PXE server.

There is a PXE server package available from Linux/ia32 however this package does not have the necessary extensions to talk to the EFI side.

There is no need for special options or compile time flags to get elilo to work with PXE instead of standard DHCP. When netbooted, elilo will automatically detect if it has been downloaded via PXE or DHCP and it will adujst how subsequent files are requested.

You need a special version of the DHCPD server developed by the Internet Software Consortium (http://www.isc.org) with a special patch to add the PXE extensions. Unfortunately as of version 3.0xx, the patch has not yet made it into the official tree. It is supposed to show up in version 3.1 of the dhcpd server.

In any case, the elilo package contains a simple example of how you can configure the /etc/dhcpd.conf file for a PXE-aware DHCP server using the extensions provided in the patch. You can look in examples/dhcpd-pxe.conf. The syntax is very different from a standard dhcpd server.

The key elements to keep in mind are the PXE layers used by elilo to request the different files:

Layer 0 : to get the name of the boot loader (elilo.efi)
Layer 1 : to get the name of the elilo config file
Layer 2 : to get the name of the kernel image

There is an IMPORTANT distinction between those layers. The first two (0,1) and requested systematically whereas the last one is used only when the configuration file is not found, i.e., what is the default kernel to boot. The actual files are STILL downloaded via TFTP. Therefore the TFTP server must also be configured (see previous section for more on this).

Getting the config file

In this mode, elilo use the PXE layer 1 to get the config file to use. Therefore this must be set on the server side. Elilo will use the following sequence when looking for a config file:

- use the name provide by the PXE server Layer 1 or

- elilo-ia64.conf/elilo-ia32.conf/elilo-x86_64 or

- elilo.conf

Sample elilo.conf file





    description="Install [Expert mode]"
    append="priority=low --"

    append="rescue/enable=true --"

Another one




Also take a look at elilo.conf, and Managing EFI Boot Loaders for Linux: Using ELILO

Elilo stops at the first match. With PXE, elilo does not try to download a config file named after the assigned IP address as it does for DHCP because there is enough flexibility in the PXE server configuration to do this.

Getting the kernel image

When there is no config file, elilo will use the kernel name returned by PXE layer 2. If it is not specified there, then it default to 'vmlinux'.

Getting the initial ramdisk

The filename for the ramdisk MUST come from the config file. Elilo does not use a PXE layer to ask for a default name.

Getting IP address information

When elilo is netbooted, the network filesystem module initializes some elilo variables with the information it received from the DHCP server. At a minimum, it received the IP address.

The following information is stored in the variables indicated below:

assigned IP address -> %I
assigned netmask    -> %M
assigned domainname -> %D
assigned gateway    -> %G

These variables can be used to dynamically adjust the command line arguments passed to the kernel.

For more information See PXE Linux and Implementing PXE Boot


  • This still doesn't answer my question, as what I'm really looking for is a working elilo.conf example, assuming elilo is the best thing to use here. Also, the newer ISC DHCP server isn't strictly needed for PXE booting UEFI clients... it's only needed if you need to support both UEFI and legacy BIOS clients from the same DNS server.
    – jderose
    Jul 31, 2013 at 22:17
  • Take a look at the added info. Hope that it helps.
    – Mitch
    Aug 1, 2013 at 0:12

Only meant as "awakening" questions :

Is UEFI on these clients compulsorily necessary ? -

You cannot disable UEFI on each client and enable only EFI on them ? -

Probably then it would be easier to boot all installations with grub2.

You can consider adjusting BIOS-settings to EFI-boot instead of UEFI-boot - because dual-boot with UEFI is not quite reliable concerning e.g. Windows 7 or Windows 8. I know of some installations, that Ubuntu with UEFI-dual-boot Win7 crashed often back into gdm.

  • @jderose - thought only this: 10 trainees would within one week switch BIOS-settings of each client ( 2000 clients on the whole ? ) from UEFI to EFI. - Then it would be easy to install grub2 - and in the end to perform update-grub2 - this would be the "lazy variant" as final solution. Jul 29, 2013 at 16:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .