Product SiteDocumentation Site

10.4. Providing and configuring bootloaders for PXE clients

Procedure 10.3. Getting the bootloader files
  1. Get the syslinux bootloader for BIOS clients.
    1. Install the syslinux package.
      # dnf install syslinux
    2. Create a directory for the bootloader files, and make them available there.
      mkdir -p /var/lib/tftpboot/pxelinux.cfg
      cp /usr/share/syslinux/{pxelinux.0,vesamenu.c32,ldlinux.c32,libcom32.c32,libutil.c32} /var/lib/tftpboot/
      
  2. Get the bootloader files for UEFI systems
    1. Install the shim and grub2-efi packages. If your server is a BIOS system, you must install the packages to a temporary install root. Installing them directly on a BIOS machine will attempt to configure the system for UEFI booting and cause problems.
      # dnf install shim grub2-efi --installroot=/tmp/fedora --releasever 25
    2. Create a directory for the bootloader files, and make them available there.
      mkdir -p /var/lib/tftpboot/uefi
      cp /tmp/fedora/boot/efi/EFI/fedora/{shim.efi,grubx64.efi} /var/lib/tftpboot/uefi/
      
Procedure 10.4. Configuring client bootloaders
  1. Create a boot menu for BIOS clients at /var/lib/tftpboot/pxelinux.cfg/default.
    default vesamenu.c32
    prompt 1
    timeout 600
    
    label linux
    menu label ^Install Fedora 25 64-bit
    menu default
    kernel f25/vmlinuz
    append initrd=f25/initrd.img inst.stage2=http://download.fedoraproject.org/pub/fedora/linux/releases/25/Server/x86_64/os/ ip=dhcp
    
    label server
    menu label ^Install Fedora 25 ( Minimal Image )
    menu default
    kernel f25/vmlinuz
    append initrd=f25/initrd.img inst.stage2=http://download.fedoraproject.org/pub/fedora/linux/releases/25/Server/x86_64/os/ ip=dhcp ks=https://example.com/fedora/kickstarts/minimal.ks
    
    label rescue
    menu label ^Rescue installed system
    kernel f25/vmlinuz
    append initrd=f25initrd.img ip=dhcp root=live:http://download.fedoraproject.org/pub/fedora/linux/releases/25/Server/x86_64/os/LiveOS/squashfs.img rescue
    
    label local
    menu label Boot from ^local drive
    localboot 0xffff
    
  2. Create a boot menu for UEFI clients at /var/lib/tftpboot/pxelinux/uefi.
    function load_video {
    insmod efi_gop
    insmod efi_uga
    insmod video_bochs
    insmod video_cirrus
    insmod all_video
    }
    
    load_video
    set gfxpayload=keep
    insmod gzio
    
    menuentry 'Install Fedora 64-bit'  --class fedora --class gnu-linux --class gnu --class os {
    linuxefi f25/vmlinuz ip=dhcp inst.repo=http://download.fedoraproject.org/pub/fedora/linux/releases/25/Server/x86_64/os/
    initrdefi f25/initrd.img
    }
    
    menuentry 'Install Fedora 25 Server'  --class fedora --class gnu-linux --class gnu --class os {
    kernel f25/vmlinuz
    append initrd=f25/initrd.img inst.repo=http://download.fedoraproject.org/pub/fedora/linux/releases/25/Server/x86_64/os/ ip=dhcp ks=https://git.fedorahosted.org/cgit/spin-kickstarts.git/plain/fedora-install-server.ks?h=f21
    }
    
    menuentry 'Rescue installed system'  --class fedora --class gnu-linux --class gnu --class os {
    kernel f25/vmlinuz
    append f25/initrd=initrd.img root=live:http://download.fedoraproject.org/pub/fedora/linux/releases/25/Server/x86_64/os/LiveOS/squashfs.img rescue
    }