Operations 12 min read

Build a PXE Boot Server with Kickstart for Automated Linux Installation

This guide walks you through setting up a PXE server—including DHCP, syslinux, TFTP, and FTP components—configuring static networking, creating Kickstart files, and enabling both BIOS and UEFI boot menus for unattended Red Hat Enterprise Linux 8 installations.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Build a PXE Boot Server with Kickstart for Automated Linux Installation

PXE (Preboot eXecution Environment) allows a client to download a system image from a server over the network and install it, while a Kickstart configuration file enables unattended installation and OS customization.

PXE server components:

DHCP – assigns IP addresses and points clients to the boot file.

syslinux – pre‑boot loader.

TFTP – client fetches the boot file.

FTP – client downloads the full system image.

Initialize the server

Configure a static IP address for the PXE server and disable the firewall.

[it@pxesvr ~]$ sudo vim /etc/sysconfig/network-scripts/ifcfg-ens192
[sudo] password for it:
[it@pxesvr ~]$ cat /etc/sysconfig/network-scripts/ifcfg-ens192
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens192
UUID=6346f97a-42c5-4fff-ad62-93bdfd90f417
DEVICE=ens192
ONBOOT=yes
IPADDR=10.10.10.53
PREFIX=24
GATEWAY=10.10.10.1
DNS1=10.10.10.1
IPV6_PRIVACY=no
[it@pxesvr ~]$ sudo systemctl stop firewalld.service
[it@pxesvr ~]$ sudo systemctl disable firewalld.service
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

DHCP

Install and configure the DHCP server.

[it@pxesvr ~]$ sudo yum install dhcp-server -y
... (installation output omitted) ...
[it@pxesvr ~]$ sudo vim /etc/dhcp/dhcpd.conf
... (edit file) ...
allow bootp;
allow booting;

default-lease-time 600;
max-lease-time 7200;

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;
option architecture-type code 93 = unsigned integer 16;

subnet 10.10.10.0 netmask 255.255.255.0 {
  option routers 10.10.10.1;
  range 10.10.10.100 10.10.10.199;

  class "pxeclients" {
    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
    next-server 10.10.10.53; # pxe server IP
    if option architecture-type = 00:07 {
      filename "uefi/BOOTX64.EFI"; # UEFI boot
    } else {
      filename "/pxelinux.0"; # BIOS boot
    }
  }
}
[it@pxesvr ~]$ sudo systemctl enable --now dhcpd.service
Created symlink /etc/systemd/system/multi-user.target.wants/dhcpd.service → /usr/lib/systemd/system/dhcpd.service.

syslinux

Install syslinux‑tftpboot and set up the boot menu.

[it@pxesvr ~]$ sudo yum install syslinux-tftpboot -y
... (installation output omitted) ...

Create the configuration directory and copy the default menu.

[it@pxesvr ~]$ sudo mkdir /tftpboot/pxelinux.cfg
[it@pxesvr ~]$ sudo cp /os/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
[it@pxesvr ~]$ sudo vim /tftpboot/pxelinux.cfg/default
... (example content) ...
default vesamenu.c32
timeout 600
menu title Red Hat Enterprise Linux 8.0
label linux
  menu label ^Install Red Hat Enterprise Linux 8.0
  kernel vmlinuz
  append initrd=initrd.img inst.stage2=ftp://10.10.10.53/dvd quiet
label local
  menu label ^Boot from local drive
  menu default
  localboot 0xffff

Copy boot files to the TFTP root.

[it@pxesvr ~]$ sudo cp /os/isolinux/{boot.msg,vesamenu.c32} /tftpboot/
[it@pxesvr ~]$ sudo cp /os/images/pxeboot/{vmlinuz,initrd.img} /tftpboot/

TFTP

Install and configure the TFTP server.

[it@pxesvr ~]$ sudo yum install tftp-server -y
... (installation output omitted) ...
[it@pxesvr ~]$ sudo vim /usr/lib/systemd/system/tftp.service
[Unit]
Description=Tftp Server
Requires=tftp.socket
Documentation=man:in.tftpd

[Service]
ExecStart=/usr/sbin/in.tftpd -s /tftpboot
StandardInput=socket

[Install]
Also=tftp.socket
[it@pxesvr ~]$ sudo systemctl enable --now tftp
Created symlink /etc/systemd/system/sockets.target.wants/tftp.socket → /usr/lib/systemd/system/tftp.socket.

FTP

Install vsftpd, enable anonymous access, and point it to the OS image directory.

[it@pxesvr ~]$ sudo yum install vsftpd -y
... (installation output omitted) ...
[it@pxesvr ~]$ sudo vim /etc/vsftpd/vsftpd.conf
anonymous_enable=YES
anon_root=/var/ftp
[it@pxesvr ~]$ sudo systemctl enable --now vsftpd.service
Created symlink /etc/systemd/system/multi-user.target.wants/vsftpd.service → /usr/lib/systemd/system/vsftpd.service.

Create the FTP directory and copy the installation media.

[it@pxesvr ~]$ sudo mkdir /var/ftp/dvd
[it@pxesvr ~]$ sudo cp -r /run/media/it/RHEL-8-0-0-BaseOS-x86_64/* /var/ftp/dvd/

Test boot via BIOS

Boot a client machine in Legacy BIOS mode to verify network installation.

Configure UEFI boot

Create the UEFI directory, copy EFI files, and set up a GRUB configuration.

[it@pxesvr ~]$ sudo mkdir /tftpboot/uefi
[it@pxesvr ~]$ sudo cp -r /os/EFI/BOOT/* /tftpboot/uefi/
[it@pxesvr ~]$ sudo vim /tftpboot/uefi/grub.cfg
set default="1"
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set timeout=60
search --no-floppy --set=root -l 'RHEL-8-0-0-BaseOS-x86_64'
menuentry 'Install Red Hat Enterprise Linux 8.0' --class fedora --class gnu-linux --class gnu --class os {
  linuxefi vmlinuz inst.stage2=ftp://10.10.10.53/dvd quiet
  initrdefi initrd.img
}
menuentry 'Test this media & install Red Hat Enterprise Linux 8.0' --class fedora --class gnu-linux --class gnu --class os {
  linuxefi vmlinuz inst.stage2=ftp://10.10.10.53/dvd quiet
  initrdefi initrd.img
}

Restart services and test UEFI boot.

[it@pxesvr ~]$ sudo systemctl restart dhcpd.service
[it@pxesvr ~]$ sudo systemctl restart tftp.socket
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxUEFIPXEKickstartDHCPFTPTFTPSyslinux
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.