EFI Netboot To Kickstart Install

Home » CentOS » EFI Netboot To Kickstart Install
CentOS 4 Comments

Hello All

Up until now we have been using standard PXE boot to do kick start installs of CentOS boxes. With recent machines however they come by default as EFI boot. We can set them to legacy but I would like to solve this before this option goes away.

Just wondering if anyone has any experience setting up a net boot server that can be used to kickstart EFI machines?

Thanks

Grant

4 thoughts on - EFI Netboot To Kickstart Install

  • Hi Grant,

    As a guess it is due to the partition scheme you are using in your kickstart (this was the issue for me at least)
    Try something like

    part /boot –fstype=”xfs” –fsoptions=”nodev,noexec,nosuid” –sizeP0
    –ondisk=sda part /boot/efi –fstype=”efi” –size 0 –ondisk=sda

    Along with your other mount points etc.

    Tris

    *************************************************************
    This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify postmaster@bgfl.org

    The views expressed within this email are those of the individual, and not necessarily those of the organisation
    *************************************************************

  • In my experience, getting our HP workstations to PXE boot from the UEFI ipv4 network boot took some extra work. I have dnsmasq installed on the PXE/TFTP server.

    Our PXE server is not the DHCP server for the environment. The central DHCP system is configured to have our PXE server’s IP as the
    “next-server”, and the file name as “/uefi/bootx64.efi”. I set up TFTP to serve out the bootx64.efi (which is just the GRUB2 EFI
    executable).

    The tricky part is that for whatever reason, our UEFI PXE boot firmware requires that the next-server that handles the TFTP requests also answer Proxy DHCP requests. I ended up having a dnsmasq configuration that looked like this:

    # Limit DHCP server to only handle proxy-dhcp dhcp-range=,proxy dhcp-alternate-port@11,4011
    log-dhcp dhcp-boot=pxelinux.0
    dhcp-match=set:efi-x86_64,option:client-arch,7
    dhcp-boot=tag:efi-x86_64,/uefi/bootx64.efi
    #disable DNS
    port=0

    Then I have a /grub/grub.cfg installed at the root of my TFTP
    directory, which the bootx64.efi reads from once it has been downloaded and executed.

    I’m not certain *why* uefi requires proxy-dhcp, it might be an artifact of how our DHCP service runs or it might be a requirement for UEFI netbooting on our hardware. Also, in my experience, it doesn’t actually care what my dnsmasq server says for dhcp-boot (I’ve tried alternate executables), because it uses the filename from the original DHCP request. But it wouldn’t boot without getting an answer from the proxy-dhcp server.

  • Yep.

    In ISC dhcpd.conf, use:

    next-server config.example.com;
    if option architecture-type = 00:07 {
    filename “shim.efi”;
    } else {
    filename “pxelinux.0”;
    }

    Then, in your TFTP server you’ll need 3 files from the shim and grub2-efi packages. I used this script: