Setup PXE Boot server – CentOs 7 – PfSense (DHCP)

Setup PXE Boot server – CentOs 7

Preboot Execution Environment (PXE) is a handy tool. if you have XX computers/servers
and you will install Centos on them all (Just and example) the you can use one
PXE Boot server to load the image to the computers/servers through the network card
instead of havin XX USB sticks with the image on.

NOTICE: I am going to use a Pfsense as DHCP Server

Step 1. Preparation

The first thing to do is to disable your Firewall and SELinux

To disable SELinux then open the config file and change SELINUX=enforcing
to SELINUX=disabled

The next thing to do is to install the required packages

Step 2 Configure and setup TFTP

Open TFTP’s configuration file

Change disable = yes to disable = no

Step 3. Download CentOS

You can find the latest version of Centos 7 here,
choose the nearest mirror to you and find CentOS-7-x86_64–Minimal.iso and copy the link location

You are going to mount the ISO and then make the content available through a ftp session

copy vmlinuz and initrd.img to ftpboot

Step 5. Configure PXE Server

Insert the following lines in the configuration file you just created.
REMEMBER to insert your servers IP

Enabled and restart services

You are almost finished now we just need to enable the services and restart them to see the changes.

Restart the services

Setup Pfsense DHCP Server on Pfsense

Go to Services -> DHCP Server

Choose the interface where your server is

Scroll down to TFTP server and enter your FQDN or IP. the TFTP IP is the same as your PXE Boot server
Enable network bonding and enter the PXE IP in next-server type pxelinux.0 in default bios name and at last enter the ftp://your_ip_again/pub
remember to save and apply.

You should have a full functional PXE Server now and be ready to start your computers/servers up and use PXE Boot.