30.2.2. Configuring PXE Boot for EFI


  1. If tftp-server is not yet installed, run yum install tftp-server.
  2. In the tftp-server config file at /etc/xinetd.d/tftp, change the disable parameter from yes to no.
  3. Create a directory within tftpboot for the EFI boot images, and then copy them from your boot directory. In these examples we will name the subdirectory pxelinux, but any other name could be used.
    mkdir /var/lib/tftpboot/pxelinux
    cp /boot/efi/EFI/redhat/grub.efi /var/lib/tftpboot/pxelinux/bootx64.efi
  4. Configure your DHCP server to use the EFI boot images packaged with GRUB. (If you do not have a DHCP server installed, refer to the DHCP Servers chapter in the Red Hat Enterprise Linux Deployment Guide.)
    A sample configuration in /etc/dhcp/dhcpd.conf might look like:
      option space PXE;
      option PXE.mtftp-ip    code 1 = ip-address;
      option PXE.mtftp-cport code 2 = unsigned integer 16;
      option PXE.mtftp-sport code 3 = unsigned integer 16;
      option PXE.mtftp-tmout code 4 = unsigned integer 8;
      option PXE.mtftp-delay code 5 = unsigned integer 8;
      option arch code 93 = unsigned integer 16; # RFC4578
    
      subnet 10.0.0.0 netmask 255.255.255.0 {
              option routers 10.0.0.254;
              range 10.0.0.2 10.0.0.253;
    
              class "pxeclients" {
                      match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
                      next-server 10.0.0.1;
    
                      if option arch = 00:06 {
                              filename "pxelinux/bootia32.efi";
                      } else if option arch = 00:07 {
                              filename "pxelinux/bootx64.efi";
                      } else {
                              filename "pxelinux/pxelinux.0";
                      }
              }
    
              host example-ia32 {
                      hardware ethernet XX:YY:ZZ:11:22:33;
                      fixed-address 10.0.0.2;
              }
      }
    
  5. Add a config file to /var/lib/tftpboot/pxelinux. The file should either be named efidefault or named after the IP address, converted into hexadecimal format without delimiters. For example, if your machine's IP address is 10.0.0.1, the filename would be 0A000001.
    A sample config file at /var/lib/tftpboot/pxelinux/efidefault might look like:
    default=0
    timeout=1
    splashimage=(nd)/splash.xpm.gz
    hiddenmenu
    title RHEL
            root (nd)
            kernel /rhel6/vmlinuz
            initrd /rhel6/initrd.img
    
    For instructions on how to specify the installation source, refer to Section 7.1.3, “Additional Boot Options”
  6. Copy the splash image into your tftp root directory:
    cp /boot/grub/splash.xpm.gz /var/lib/tftpboot/pxelinux/splash.xpm.gz
  7. Copy the boot images into your tftp root directory:
    cp /path/to/x86_64/os/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/rhel6/
  8. Boot the client system, and select the network device as your boot device when prompted.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.