1.3.6 Boot Loader Configuration for UEFI-Based PXE Clients

The grub.cfg file is the default boot loader configuration file for UEFI-based PXE clients and uses GRUB 2 configuration settings:

set default 0
set timeout=10

menuentry 'ol7' {
  echo "Loading efi/vmlinuz"
  linuxefi efi/vmlinuz inst.repo= inst.ks.sendmac \
  echo "Loading efi/initrd.img"
  initrdefi efi/initrd.img
  echo "Booting installation kernel"

The linuxefi directive defines the name of the kernel executable and defines any parameters that should be appended when loading the kernel, such as the location of the installation packages, and how to access these packages. This example uses HTTP to install the packages from the specified URL. The initrdefi directive defines the name of the ram-disk image.

The kernel and ram-disk image file paths are assumed to be relative to the subdirectory that contains the boot loader, for example efi. If you place the vmlinuz and initrd.img files in a subdirectory such as efi/OL7, ensure you have the correct relative paths.

By default, GRUB 2 does not provide any indication that is transferring the kernel and ram-disk images files. The echo statements in the example above provide a simple indication of progress.

To support different types of client, you can create a configuration file named grub2.cfg-client-ID where client-ID is one of the following:

  • A client's MAC address prefixed by 01-, which represents the ARP hardware type for Ethernet, and using dashes to separate each byte value instead of colons (for example, 01-80-00-27-c6-a1-16).


    The file name must use lowercase characters for the MAC address.

  • A client's IP address expressed in hexadecimal without any leading 0x (for example, 0A0000FD represents the IP address

    To reduce the number of configuration files, you can group clients by IP address range, for example 0A0000E represents the IP address range through

Place the configuration files in the same directory as the boot loader files, for example efi.

The boot loader looks for a configuration file in the following order until it finds a matching file name:

  • 01-MAC_address (for example, grub.cfg-01-80-00-27-c6-a1-16)

  • Full 32 bits of the IP address (for example, grub.cfg-0A0000FD)

  • Most significant 28 bits of the IP address (for example, grub.cfg-0A0000F)

  • Most significant 24 bits of the IP address (for example, grub.cfg-0A0000)

  • Most significant 20 bits of the IP address (for example, grub.cfg-0A000)

  • Most significant 16 bits of the IP address (for example, grub.cfg-0A00)

  • Most significant 12 bits of the IP address (for example, grub.cfg-0A0)

  • Most significant 8 bits of the IP address (for example, grub.cfg-0A)

  • Most significant 4 bits of the IP address (for example, grub.cfg-0)

  • grub.cfg (the default configuration file)

If several configuration files have identical content, you can use the ln command to link the files to a master copy, for example:

# ln master-ol7 grub.cfg-0A0000FC
# ln master-ol7 grub.cfg-0A0000FD
# ln master-ol7 grub.cfg-0A0000FE

For more information about GRUB 2, enter the info grub command to access the GRUB 2 manual.

For information about configuring and using kickstart to perform automated installation, see Section 3.2, “Automated Installation Using Kickstart”.