Product SiteDocumentation Site

13.5.2. PXE Boot Configuration

The next step is to copy the files necessary to start the installation to the tftp server so they can be found when the client requests them. The tftp server is usually the same server as the network server exporting the installation tree.
BIOS and EFI configuration differs for this procedure.

13.5.2.1. Configuring for BIOS

  1. If tftp-server is not yet installed, run yum install tftp-server.
  2. In the tftp-server config file at /etc/xinet.d/tftp, change the disabled parameter from yes to no.
  3. Start the xinetd service, and enable it to persist across reboots:
    systemctl start xinetd
    systemctl enable xinetd
    systemctl status xinetd
  4. Configure your DHCP server to use the boot images packaged with SYSLINUX. (If you do not have a DHCP server installed, refer to the DHCP Servers chapter in the Fedora System Administrators Guide.)
    A sample configuration in /etc/dhcp/dhcpd.conf might look like:
      option space pxelinux;
      option pxelinux.magic code 208 = string;
      option pxelinux.configfile code 209 = text;
      option pxelinux.pathprefix code 210 = text;
      option pxelinux.reboottime code 211 = unsigned integer 32;
    
      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. You now need the pxelinux.0 file from the SYSLINUX package installed with Fedora. Create a pxelinux directory within tftpboot and copy pxelinux.0 and vesamenu.c32into it:
    mkdir /var/lib/tftpboot/pxelinux
    cp /usr/share/syslinux/{pxelinux.0, vesamenu.c32} /var/lib/tftpboot/pxelinux
  6. Create a pxelinux.cfg directory within pxelinux:
    mkdir /var/lib/tftpboot/pxelinux/pxelinux.cfg
  7. Add a config file to this directory. The file should either be named default or named after the IP address. 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/pxelinux.cfg/default might look like:
    default vesamenu.c32
    prompt 1
    timeout 600
    
    display boot.msg
    
    label linux
      menu label ^Install or upgrade an existing system
      menu default
      kernel vmlinuz
      append initrd=initrd.img repo=http://dl.fedoraproject.org/pub/fedora/linux/releases
          /20/Fedora/x86_64/os/
    label vesa
      menu label Install system with ^basic video driver
      kernel vmlinuz
      append initrd=initrd.img xdriver=vesa nomodeset repo=http://dl.fedoraproject.org
          /pub/fedora/linux/releases/20/Fedora/x86_64/os/
    label rescue
      menu label ^Rescue installed system
      kernel vmlinuz
      append initrd=initrd.img root=live:http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/x86_64/os/LiveOS/squashfs.img rescue
    label local
      menu label Boot from ^local drive
      localboot 0xffff
    label memtest86
      menu label ^Memory test
      kernel memtest
      append -
    
    If both the stage 2 installer image and the package repositories you intend to download from are on the same server, use the repo= boot option. If they are on separate servers, use stage2= instead.
    For instructions on how to specify the installation source, refer to Chapter 8, Configuring Installation Source
  8. Copy the boot images into your tftp root directory:
     cp /path/to/x86_64/os/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/
  9. Reboot the system, and select the network device as your boot device when prompted.