Learn how to use a PXE Kickstart file to install Linux on clients with this detailed guide. Follow step-by-step instructions to automate and streamline your Linux installation process over the network. #centlinux #linux #pxe
Table of Contents
What is Kickstart?
Kickstart is an installation method, used by Red Hat to automatically perform unattended Operating System installation and configuration. With Kickstart, a system administrator can create a single file containing the answers to all the questions that would normally be asked during a typical installation.
In our previous post “Setup a PXE Boot Server in RHEL 7”, we have configured a PXE boot server for network installations of new systems. However, the installation method is manual. Now, in this article, we will combine the Kickstart with PXE boot Server to setup fully automated, unattended and consistent installations for our PXE clients.

Linux Server Specification
We use the same Linux server that we have configured as PXE Boot Server in our previous article. The specifications have been re-mentioned below for convenience of the readers.
- CPU – 2 Core (2.4 Mhz)
- Memory – 2 GB
- Storage – 50 GB
- Operating System – RHEL 7.5
- Hostname – pxe-server.itlab.com
- IP Address – 192.168.116.41/24
Recommended Training: Complete Linux Training Course to Get Your Dream IT Job 2025 from Imran Afzal

Create a PXE Kickstart file to Install Linux
Kickstart file is a text file and can be created using any available text editor. Furthermore, we also have a very handy GUI tool in Linux called Kickstart Configurator. With Kickstart Configurator, we can simply select the options and the Kickstart file will automatically generated by the software.
Kickstart configurator is provided in system-config-kickstart.noarch package. And can be run using command system-config-kickstart (you need an X-Server to display the software interface). Some screenshots of the Kickstart Configurator are as follows:



Kickstart Configurator is quiet handy tool and anyone can create a complicated Kickstart file in just a few clicks.
Alternatively, we can use a system generated Kickstart template, which is created by the Anaconda installer during operating system installation in the home directory of root user (i.e. /root/anaconda-ks.cfg). This file contains the actual user inputs/selections that has been made during the installation of Operating System on that machine. Therefore, we can use this Kickstart template after adjusting the contents according to our requirements.
Copy the anaconda-ks.cfg to our FTP public directory.
cp anaconda-ks.cfg /var/ftp/pub/rhel7/rhel7.cfg
chmod +r /var/ftp/pub/rhel7/rhel7.cfg
Now edit the rhel7.cfg file.
vi /var/ftp/pub/rhel7/rhel7.cfg
The final contents of the rhel7.cfg are:
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Root password
rootpw --iscrypted $1$vyNMLtgd$VmtByshddZSBK..uuFhoH0
# Use network installation
url --url="ftp://192.168.116.41/pub/rhel7"
# System language
lang en_US
# System authorization information
auth --useshadow --passalgo=sha512
# Use graphical install
graphical
firstboot --disable
# SELinux configuration
selinux --enforcing
# Firewall configuration
firewall --enabled --ssh
# Network information
network --bootproto=dhcp --device=eth0
# Reboot after installation
reboot
# System timezone
timezone Asia/Karachi
# System bootloader configuration
bootloader --location=mbr --boot-drive=sda
autopart --type=lvm
# Partition clearing information
clearpart --none --initlabel
%addon com_redhat_kdump --disable --reserve-mb='auto'
%end
# Packages to be installed
%packages
@core
%end
We have successfully created a Kickstart file for automated installations. To make it usable by our PXE boot server, we have to include it in the menu command of tftp.
65W USB C Laptop Charger Replacement for Lenovo Thinkpad/Yoga/Chromebook, ADLX65YDC2A Lenovo Laptop Charger
$16.49 (as of May 30, 2025 17:33 GMT +00:00 – More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Configure PXE boot server to use Kickstart file
Edit the PXE boot menu for BIOS based clients.
vi /var/lib/tftpboot/pxelinux.cfg/default
and append the kickstart directive therein. Contents of this file after editing are:
default menu.c32
prompt 0
timeout 30
menu title Ahmer's PXE Menu
label Install RHEL 7.5
kernel /networkboot/rhel7/vmlinuz
append initrd=/networkboot/rhel7/initrd.img inst.repo=ftp://192.168.116.41/pub/rhel7 ks=ftp://192.168.116.41/pub/rhel7/rhel7.cfg
Similarly, edit the PXE boot menu for UEFI based clients.
vi /var/lib/tftpboot/grub.cfg
and append the kickstart directive therein. Contents of this file after editing are:
set timeout=60
menuentry 'Install RHEL 7.5' {
linuxefi /networkboot/rhel7/vmlinuz inst.repo=ftp://192.168.116.41/pub/rhel7/ inst.ks=ftp://192.168.116.41/pub/rhel7/rhel7.cfg
initrdefi /networkboot/rhel7/initrd.img
}
Test the configurations with BIOS and UEFI based machines. Now, the whole installation is automated, and operating system will be installed and configured as per our PXE Kickstart file.
Frequently Asked Questions (FAQs)
What is a PXE Kickstart file?
A PXE Kickstart file is a configuration script that automates the installation of Linux by providing predefined answers to the installer’s prompts, allowing for hands-off deployment over a network.
What do I need to set up a PXE Kickstart installation?
You need a PXE-enabled server (like DHCP and TFTP), a Linux installation source (e.g., ISO or repository), a properly configured Kickstart file, and a network boot-capable client machine.
Where should the Kickstart file be stored?
The Kickstart file can be stored on a web server, FTP server, or local network share, and it must be accessible to the client during the PXE boot process.
How does the client machine access the Kickstart file?
During PXE boot, the client retrieves the Kickstart file’s location (via DHCP or boot menu) and downloads it over the network to proceed with automated installation.
What are common mistakes when using PXE Kickstart?
Errors often include incorrect file paths, missing dependencies in the Kickstart script, misconfigured DHCP/TFTP settings, or network connectivity issues between the client and server.
Linux Bible
$34.99 (as of May 30, 2025 17:35 GMT +00:00 – More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Final Thoughts
Mastering PXE boot with Kickstart isn’t just a convenience—it’s a game-changer. In today’s fast-paced IT environments, automation isn’t optional; it’s essential. You’ve now seen how a simple configuration can save hours and ensure consistent Linux deployments across multiple machines. Imagine provisioning dozens—or hundreds—of systems without lifting a finger.
Don’t let outdated installation methods slow you down. Embrace PXE and Kickstart now and stay ahead of the curve. Ready to level up your sysadmin skills? Start implementing what you’ve learned today and transform the way you deploy Linux.
Your Linux servers deserve expert care! I provide reliable management and optimization services tailored to your needs. Discover how I can help on Fiverr!
Leave a Reply
You must be logged in to post a comment.