Setting up a ‘PXE Network Boot Server’ for Multiple Linux Distribution Installations in RHEL/CentOS 7

PXE Server – Preboot eXecution Environment – instructs a client computer to boot, run or install an operating system directly form a network interface, eliminating the need to burn a CD/DVD or use a physical medium, or, can ease the job of installing Linux distributions on your network infrastructure on multiple machines the same time.

Setting PXE Network Boot in CentOS
Setting PXE Network Boot in RHEL/CentOS 7

Requirements

  1. CentOS 7 Minimal Installation Procedure
  2. RHEL 7 Minimal Installation Procedure
  3. Configure Static IP Address in RHEL/CentOS 7
  4. Remove Unwanted Services in RHEL/CentOS 7
  5. Install NTP Server to Set Correct System Time in RHEL/CentOS 7

This article will explain how you can install and configure a PXE Server on RHEL/CentOS 7 x64-bit with mirrored local installation repositories, sources provided by CentOS 7 DVD ISO image, with the help of DNSMASQ Server.

Which provides DNS and DHCP services, Syslinux package which provides bootloaders for network booting, TFTP-Server, which makes bootable images available to be downloaded via network using Trivial File Transfer Protocol (TFTP) and VSFTPD Server which will host the local mounted mirrored DVD image – which will act as an official RHEL/CentOS 7 mirror installation repository from where the installer will extract its required packages.

Step 1: Install and configure DNSMASQ Server

1. No need to remind you that is absolutely demanding that one of your network card interface, in case your server poses more NICs, must be configured with a static IP address from the same IP range that belongs to the network segment that will provide PXE services.

So, after you have configured your static IP Address, updated your system and performed other initial settings, use the following command to install DNSMASQ daemon.

# yum install dnsmasq
Install dnsmasq in CentOS
Install dnsmasq Package

2. DNSMASQ main default configuration file located in /etc directory is self-explanatory but intends to be quite difficult to edit, do to its highly commented explanations.

First make sure you backup this file in case you need to review it later and, then, create a new blank configuration file using your favorite text editor by issuing the following commands.

# mv /etc/dnsmasq.conf  /etc/dnsmasq.conf.backup
# nano /etc/dnsmasq.conf

3. Now, copy and paste the following configurations on dnsmasq.conf file and assure that you change the below explained statements to match your network settings accordingly.

interface=eno16777736,lo
#bind-interfaces
domain=centos7.lan
# DHCP range-leases
dhcp-range= eno16777736,192.168.1.3,192.168.1.253,255.255.255.0,1h
# PXE
dhcp-boot=pxelinux.0,pxeserver,192.168.1.20
# Gateway
dhcp-option=3,192.168.1.1
# DNS
dhcp-option=6,92.168.1.1, 8.8.8.8
server=8.8.4.4
# Broadcast Address
dhcp-option=28,10.0.0.255
# NTP Server
dhcp-option=42,0.0.0.0

pxe-prompt="Press F8 for menu.", 60
pxe-service=x86PC, "Install CentOS 7 from network server 192.168.1.20", pxelinux
enable-tftp
tftp-root=/var/lib/tftpboot
Dnsmasq Configuration in CentOS
Dnsmasq Configuration

The statements that you need to change are follows:

  1. interface – Interfaces that the server should listen and provide services.
  2. bind-interfaces – Uncomment to bind only on this interface.
  3. domain – Replace it with your domain name.
  4. dhcp-range – Replace it with IP range defined by your network mask on this segment.
  5. dhcp-boot – Replace the IP statement with your interface IP Address.
  6. dhcp-option=3,192.168.1.1 – Replace the IP Address with your network segment Gateway.
  7. dhcp-option=6,92.168.1.1 – Replace the IP Address with your DNS Server IP – several DNS IPs can be defined.
  8. server=8.8.4.4 – Put your DNS forwarders IPs Addresses.
  9. dhcp-option=28,10.0.0.255 – Replace the IP Address with network broadcast address –optionally.
  10. dhcp-option=42,0.0.0.0 – Put your network time servers – optionally (0.0.0.0 Address is for self-reference).
  11. pxe-prompt – Leave it as default – means to hit F8 key for entering menu 60 with seconds wait time..
  12. pxe=service – Use x86PC for 32-bit/64-bit architectures and enter a menu description prompt under string quotes. Other values types can be: PC98, IA64_EFI, Alpha, Arc_x86, Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI.
  13. enable-tftp – Enables the build-in TFTP server.
  14. tftp-root – Use /var/lib/tftpboot – the location for all netbooting files.

For other advanced options concerning configuration file feel free to read dnsmasq manual.

Step 2: Install SYSLINUX Bootloaders

4. After you have edited and saved DNSMASQ main configuration file, go ahead and install Syslinx PXE bootloader package by issuing the following command.

# yum install syslinux
Install Syslinux Bootloaders in CentOS
Install Syslinux Bootloaders

5. The PXE bootloaders files reside in /usr/share/syslinux absolute system path, so you can check it by listing this path content. This step is optional, but you might need to be aware of this path because on the next step, we will copy of all its content to TFTP Server path.

# ls /usr/share/syslinux
Syslinux Files
Syslinux Files

Step 3: Install TFTP-Server and Populate it with SYSLINUX Bootloaders

6. Now, let’s move to next step and install TFTP-Server and, then, copy all bootloders files provided by Syslinux package from the above listed location to /var/lib/tftpboot path by issuing the following commands.

# yum install tftp-server
# cp -r /usr/share/syslinux/* /var/lib/tftpboot
Install TFTP Server In CentOS
Install TFTP Server

Step 4: Setup PXE Server Configuration File

7. Typically the PXE Server reads its configuration from a group of specific files (GUID files – first, MAC files – next, Default file – last) hosted in a folder called pxelinux.cfg, which must be located in the directory specified in tftp-root statement from DNSMASQ main configuration file.

Create the required directory pxelinux.cfg and populate it with a default file by issuing the following commands.

# mkdir /var/lib/tftpboot/pxelinux.cfg
# touch /var/lib/tftpboot/pxelinux.cfg/default

8. Now it’s time to edit PXE Server configuration file with valid Linux distributions installation options. Also note that all paths used in this file must be relative to the /var/lib/tftpboot directory.

Below you can see an example configuration file that you can use it, but modify the installation images (kernel and initrd files), protocols (FTP, HTTP, HTTPS, NFS) and IPs to reflect your network installation source repositories and paths accordingly.

# nano /var/lib/tftpboot/pxelinux.cfg/default

Add the following whole excerpt to the file.

default menu.c32
prompt 0
timeout 300
ONTIMEOUT local

menu title ########## PXE Boot Menu ##########

label 1
menu label ^1) Install CentOS 7 x64 with Local Repo
kernel centos7/vmlinuz
append initrd=centos7/initrd.img method=ftp://192.168.1.20/pub devfs=nomount

label 2
menu label ^2) Install CentOS 7 x64 with http://mirror.centos.org Repo
kernel centos7/vmlinuz
append initrd=centos7/initrd.img method=http://mirror.centos.org/centos/7/os/x86_64/ devfs=nomount ip=dhcp

label 3
menu label ^3) Install CentOS 7 x64 with Local Repo using VNC
kernel centos7/vmlinuz
append  initrd=centos7/initrd.img method=ftp://192.168.1.20/pub devfs=nomount inst.vnc inst.vncpassword=password

label 4
menu label ^4) Boot from local drive
Configure PXE Server
Configure PXE Server

As you can see CentOS 7 boot images (kernel and initrd) reside in a directory named centos7 relative to /var/lib/tftpboot (on an absolute system path this would mean /var/lib/tftpboot/centos7) and the installer repositories can be reached by using FTP protocol on 192.168.1.20/pub network location – in this case the repos are hosted locally because the IP address is the same as the PXE server address).

Also menu label 3 specifies that the client installation should be done from a remote location via VNC (here replace VNC password with a strong password) in case you install on a headless client and the menu label 2 specifies as
installation sources a CentOS 7 official Internet mirror (this case requires an Internet connection available on client through DHCP and NAT).

Important: As you see in the above configuration, we’ve used CentOS 7 for demonstration purpose, but you can also define RHEL 7 images, and following whole instructions and configurations are based on CentOS 7 only, so be careful while choosing distribution.

Step 5: Add CentOS 7 Boot Images to PXE Server

9. For this step CentOS kernel and initrd files are required. To get those files you need the CentOS 7 DVD ISO Image. So, go ahead and download CentOS DVD Image, put it in your DVD drive and mount the image to /mnt system path by issuing the below command.

The reason for using the DVD and not a Minimal CD Image is the fact that later this DVD content would be used to create the
locally installer repositories for FTP sources.

# mount -o loop /dev/cdrom  /mnt
# ls /mnt
Mount CentOS DVD
Mount CentOS DVD

If your machine has no DVD drive you can also download CentOS 7 DVD ISO locally using wget or curl utilities from a CentOS mirror and mount it.

# wget http://mirrors.xservers.ro/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso
# mount -o loop /path/to/centos-dvd.iso  /mnt

10. After the DVD content is made available, create the centos7 directory and copy CentOS 7 bootable kernel and initrd images from the DVD mounted location to centos7 folder structure.

# mkdir /var/lib/tftpboot/centos7
# cp /mnt/images/pxeboot/vmlinuz  /var/lib/tftpboot/centos7
# cp /mnt/images/pxeboot/initrd.img  /var/lib/tftpboot/centos7
Copy CentOS Bootable Files
Copy CentOS Bootable Files

The reason for using this approach is that, later you can create new separate directories in /var/lib/tftpboot path and add other Linux distributions to PXE menu without messing up the entire directory structure.

Step 6: Create CentOS 7 Local Mirror Installation Source

11. Although you can setup Installation Source Mirrors via a variety of protocols such as HTTP, HTTPS or NFS, for this guide, I have chosen FTP protocol because is very reliable and easy to setup with the help of vsftpd server.

Further install vsftpd daemon, copy all DVD mounted content to vsftpd default server path (/var/ftp/pub) – this can take a while depending on your system resources and append readable permissions to this path by issuing the following commands.

# yum install vsftpd
# cp -r /mnt/*  /var/ftp/pub/ 
# chmod -R 755 /var/ftp/pub
Install Vsftpd in CentOS
Install Vsftpd Server
Copy Files to FTP Path
Copy Files to FTP Path
Set Permissions on FTP Path
Set Permissions on FTP Path

Step 7: Start and Enable Daemons System-Wide

12. Now that the PXE server configuration is finally finished, start DNSMASQ and VSFTPD servers, verify their status and enable it system-wide, to automatically start after every system reboot, by running the below commands.

# systemctl start dnsmasq
# systemctl status dnsmasq
# systemctl start vsftpd
# systemctl status vsftpd
# systemctl enable dnsmasq
# systemctl enable vsftpd
Start Dnsmasq Service
Start Dnsmasq Service
Start Vsftpd Service
Start Vsftpd Service

Step 8: Open Firewall and Test FTP Installation Source

13. To get a list of all ports that needs to be open on your Firewall in order for client machines to reach and boot from PXE server, run netstat command and add CentOS 7 Firewalld rules accordingly to dnsmasq and vsftpd listening ports.

# netstat -tulpn
# firewall-cmd --add-service=ftp --permanent  	## Port 21
# firewall-cmd --add-service=dns --permanent  	## Port 53
# firewall-cmd --add-service=dhcp --permanent  	## Port 67
# firewall-cmd --add-port=69/udp --permanent  	## Port for TFTP
# firewall-cmd --add-port=4011/udp --permanent  ## Port for ProxyDHCP
# firewall-cmd --reload  ## Apply rules
Check Listening Ports
Check Listening Ports
Open Ports in Firewall in CentOS
Open Ports in Firewall

14. To test FTP Installation Source network path open a browser locally (lynx should do it) or on a different computer and type the IP Address of your PXE server with
FTP protocol followed by /pub network location on URL filed and the result should be as presented in the below screenshot.

ftp://192.168.1.20/pub
Access FTP Files via Browser
Access FTP Files via Browser

15. To debug PXE server for eventual misconfigurations or other information and diagnostics in live mode run the following command.

# tailf /var/log/messages
Check PXE Logs for Errors
Check PXE Logs for Errors

16. Finally, the last required step that you need to do is to unmount CentOS 7 DVD and remove the physical medium.

# umount /mnt

Step 9: Configure Clients to Boot from Network

17. Now your clients can boot and install CentOS 7 on their machines by configuring Network Boot as primary boot device from their systems BIOS or by hitting a specified key during BIOS POST operations as specified in motherboard manual.

In order to choose network booting. After first PXE prompt appears, press F8 key to enter presentation and then hit Enter key to proceed forward to PXE menu.

PXE Network Boot
PXE Network Boot
PXE Network OS Boot
PXE Network OS Boot

18. Once you have reached PXE menu, choose your CentOS 7 installation type, hit Enter key and continue with the installation procedure the same way as you might install it from a local media boot device.

Please note down that using variant 2 from this menu requires an active Internet connection on the target client. Also, on below
screenshots you can see an example of a client remote installation via VNC.

PXE Menu
PXE Menu
Remote Linux Installation via VNC
Remote Linux Installation via VNC
Remote Installation of CentOS
Remote Installation of CentOS

That’s all for setting up a minimal PXE Server on CentOS 7. On my next article from this series, I will discuss other issues concerning this PXE server configuration such as how to setup automated installations of CentOS 7 using Kickstart files and adding other Linux distributions to PXE menu – Ubuntu Server and Debian 7.

Matei Cezar
I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

68 thoughts on “Setting up a ‘PXE Network Boot Server’ for Multiple Linux Distribution Installations in RHEL/CentOS 7”

  1. There are quite many languages and I know the DOMINANCE of PHP PYTHON and PERL over TCP/UDP is a quark when it comes to PXE. I find it very appealing that you can even put a LEMP or LAMP &amp into a microservice that includes the httpd or DAEMON that persists in a mild matter and I keep all the good stuff and handy.

    manpages is a good point and just for the sole DOCUMENTATION of every help file needed to run a shell … ./controlpanels and just to name a few.

    Reply
  2. Nice article, I want to try it in my ubuntu laptop to help other laptops installing operating systems without a USB drive or optical drive.

    Reply
    • You can add UEFI support for this PXE boot. Only need some steps more and using one config file for Legacy (BIOS) and other for UEFI. I did it that way because my installations are on servers and some of those not have a Legacy boot.

      Reply
  3. My Dell client stops after starting the PXE client and successfully finishes the NBP file (two times) but then says “No bootable devices”

    Reply
  4. I am able to connect using VNC but on client machine it is stuck at vncconfig screen showing message as attempting to start vncconfig.

    It is required to setup VNC as well? If yes, please share the steps.

    Reply
    • I have my instance working using CENTOS 8 using:

      kernel centos8/vmlinuz
      append initrd=centos8/initrd.img method=http://10.0.0.100/centos8 devfs=nomount inst.vnc inst.vncpassword=password

      The “inst.vnc” is crucial. Maybe that syntax will help you.

      Reply
  5. Wow, finally i managed to get this thing working, but i think i made a mistake, what ports use besides you have mentioned? it works just with firewall disabled in my case.

    firewall-cmd services and ports
    dhcpv6-client http ssh https ntp ftp dns dhcp
    69,4011/udp

    Thank you!

    Reply
  6. What would you change if you were setting this up in an already established environment with Windows AD controlling DNS/DHCP?

    I’m aware that you can set option 66 and 67, but I’m not sure what else dnsmasq was doing for this server.

    Reply
  7. Hi I reached until step 17 after that I am getting PXE-E78: Could not locate boot server, PXE-M)F: Exiting Intel PXE ROM, Operating system not found.

    Reply
  8. Hi,

    I read your article and its very easy for function. thank you, but my PC client on the boot process show me message:

    “Failed to start Switch Root.”

    And stops with options for repair installation, but I am installing nothing.

    Help-me please.

    Reply
  9. Hi,

    Followed all of the steps to a T but it’s not working. It’s most probably the network. I’m not a network expert so I’m at a wit’s end on why my PXE setup is not working. I might have setup the wrong gateway as well. I’m confused what should the default gateway be on this VM.

    I have a PXE server (Centos 7) on a VirtualBox VM (guest VM) provisioned via Vagrant. Its adapter 1 is NAT, adapter 2 is Host-only adapter (vboxnet0). I have configured it with a static IP of 172.31.0.205.

    $ ip route show
    default via 10.0.2.2 dev eth0 proto static metric 100
    10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 metric 100
    169.254.0.0/16 dev eth1 scope link metric 1003
    172.31.0.0/24 dev eth1 proto kernel scope link src 172.31.0.205

    $ ip addr
    1: lo: mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
    2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:9f:bd:fd brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic eth0
    valid_lft 69737sec preferred_lft 69737sec
    inet6 fe80::5054:ff:fe9f:bdfd/64 scope link
    valid_lft forever preferred_lft forever
    3: eth1: mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:67:ee:68 brd ff:ff:ff:ff:ff:ff
    inet 172.31.0.205/24 brd 172.31.0.255 scope global eth1
    valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe67:ee68/64 scope link
    valid_lft forever preferred_lft forever

    $ sudo cat /etc/dnsmasq.conf
    interface=eth1,lo
    #bind-interfaces
    domain=home
    #dchp range-leases
    dhcp-range=eth0,172.31.0.210,172.31.0.215,255.255.255.0,1h
    #PXE
    dhcp-boot=pxelinux.0,pxeserver,172.31.0.205
    #gateway
    dhcp-option=3,172.31.0.1
    #DNS
    dhcp-option=6,172.31.0.1
    dhcp-option=6,8.8.8.8
    server=8.8.4.4
    #broadcast address
    dhcp-option=28,10.0.0.255
    #ntp server
    dhcp-option=42,0.0.0.0
    pxe-prompt=”Press F8 for menu.”, 60
    pxe-service=x86PC, “Install CentOS 7 from network server 172.31.0.205”, pxelinux
    enable-tftp
    tftp-root=/var/lib/tftpboot

    $ sudo cat /var/lib/tftpboot/pxelinux.cfg/default
    default menu.c32
    prompt 0
    timeout 300
    ONTIMEOUT local
    menu title ########## PXE Boot Menu ##########
    label 1
    menu label ^1) Install CentOS 7 x64 with Local Repo
    kernel centos7/vmlinuz
    append initrd=centos7/initrd.img method=ftp://172.31.0.205/pub devfs=nomount
    label 2
    menu label ^2) Install CentOS 7 x64 with http://mirror.centos.org Repo
    kernel centos7/vmlinuz
    append initrd=centos7/initrd.img method=http://mirror.centos.org/centos/7/os/x86_64/ devfs=nomount ip=dhcp
    label 3
    menu label ^3) Install CentOS 7 x64 with Local Repo using VNC
    kernel centos7/vmlinuz
    append initrd=centos7/initrd.img method=ftp://172.31.0.205/pub devfs=nomount inst.vnc inst.vncpassword=password
    label 4
    menu label ^4) Install Centos 7 x64 with http://172.31.0.205 Repo
    kernel centos7/vmlinuz
    append initrd=centos7/initrd.img method=http://172.31.0.205/centos7 devfs=nomount
    label 5
    menu label ^5) Boot from local drive

    From my host machine, I can access the following (PXE options) successfully: ftp://172.31.0.205/pub and http://172.31.0.205/centos7

    When I’m trying to boot a VM to install Centos 7 via PXE boot with its network adapter 1 set on Host-based adapter (vboxnet0), I am able to see that this new guest VM is able to get an IP (172.31.0.213) from the DHCP server (172.31.0.205). I’m able to see the PXE boot menu and able to choose from the options, but it’s failing to download and complete the PXE install. However, if this VM’s network setting is set to other than Host-based adapter, this VM doesn’t see the DHCP server (172.31.0.205) so I have it set to Host-based (vboxnet0). The installation eventually fails and goes to “/dev/root does not exist”.

    Appreciate any help.

    Reply
  10. For me, I also had to open port 4011/udp on the PXE/DHCP server to make everything work successfully.
    My system failed with PXE-E78 error until I configured this port on my firewall

    Reply
  11. Hello sir

    I have successfully installed the PXE boot server, but have a question Can I add Ubuntu or Linux Mint image to PXE server as a CentOS?

    Reply
  12. My advice to you all is don’t waste your time with this post, there are couple things missing:

    no tftp config / enabled

    no test commands showing each individual protocol ftp, tftp is working and a test file transfer is successful.

    there are some issue with the file requests while pixing booting the machine.

    Reply
    • Tftp service is enabled in dnsmasq service. The configuration works without a flaw if you follow all steps.

      Reply
  13. Hello,

    Great topic and very special and into the point description, every thing worked great with me except one thing, while installing the the centos from the FTP i face many failures and cannot find the root cause for it as the following:

    Then the installation stop and provide a prompt /#

    thanks for your support

    Reply
    • Make sure the content of CentOS ISO image has been completely copied to /var/ftp/pub/. Verify from CLI with ls command ( ls /var/ftp/pub/liveos/) or from a browser ftp://serverip/pub/liveos/. If it was completely copied you should see squashfs file on that directory.

      Reply
  14. Hello,

    Great tutorial, it almost work for me but… I try to boot a VM (for testing) and the boot failed when reading/launching centos7/initrd.img. After about 5 minutes I have the message “Boot failed: press a key to retry”

    The number of dot after loading is 3 (Loading centos7/initrd.img…)

    tftpboot is running, vsftpd too. I ran isc-dhcp on another server, but this part for fine.

    Did someone experimented the same problem and have a solution.

    Thanks in advance for your tutorial and eventual help.

    Reply
  15. Check initrd.img and vmlinuz files from tftp server path: /var/lib/tftpboot. Also, check the Local Mirror Installation Source from FTP path and the permissions on those files and Kickstart file.

    Reply
    • Yes you can. Make sure you also install tftp-hpa server and remove dnsmasq server is it’s already installed on your system. Instruct isc-dhcp server to pxelinux.0 file: filename “pxelinux.0”;

      Reply
  16. Is there any possibility to restrict IP allocation based on MAC address and avoid the ip range under /etc/dnsmasq.conf, my concern is if any VM boots off the same VLAN with PXE will pickup the IP.

    How can we avoid this?

    Reply
  17. HI i would like to ask how to set up Centos6.4 under RHEL7. I used to do with Centos6.4 it work properly, but under RHEL7 can;t work.
    label 1
    menu label ^1) Install CentOS 6.4 x64
    root (nd)
    kernel /kernel/centos6.4/vmlinuz ip=dhcp method=nfs:192.168.2.1:/install/nfs_share/centos6.4
    initrd /kernel/centos6.4/initrd.img

    why is this not working under RHEL7. It will told me mount error.

    Reply
    • I haven’t used nfs method so far! Check on the nfs server if the required ports are opened and the permissions set for nfs share.

      Reply
  18. Hi,
    I wonder why we need to install both tftp-server and vsftpd server. Is it because that the vmlinuz and initrd can only be downloaded using tftp and repo files can be download using vstftp server?

    David

    Reply
  19. Hello,

    I did everthing like in the post but DHCP does not give IP address to new computer on the network.
    Can any one help me please?

    THX

    Reply
    • On the server side: verify the firewall configuration, both input and output to see if it blocks dhcp transactions! Check dhcp log messages to see if a dhcp requests (discover, offer, request and ack) is made from client MAC address with the command: tailf /var/log/messages
      On the client side: make sure the NIC is instructed to obtain TCP/IP configurations through dhcp.

      Reply
  20. I allready have a DNS resolver running on a Pfsensebox and i was wondering if it possible to use the Pfsense DNS instead of DNSmasq

    Reply
    • If Pfsense DNS resolver and DHCP server has advanced options and can support adding entries for PXE and Tftp then you can go with it!

      Reply
  21. Excellent! I now have PXE boot with kickstart option on my centos7 server, and I’m going to write a small script to enable/disable vsftpd & dnsmasq when kickstart isn’t in use. Either that or I write a script to append then remove the necessary iptables to close those ports.

    One minor detail, the step above where you enter “chmod -R 755 /var/lib/tftpboot/” is missing, and only has a picture for it.

    Reply
  22. You mounted ISO into /var/ftp/pub and then you instruct to save/edit ks.cfg into same /var/ftp/but, BUT it couldn’t be done since this location is READ-ONLY, because ISO is mounted RO. Pls advise… Thanks

    Reply
  23. Awesome tut, but i’m running into an issue. dnsmasq doesn’t seem to be listening or handing out ip addresses. I have triple checked the firewall rules, and even went as far as disabling the firewall and iptables, with no luck. While looking at /var/log/messages, I don’t see any indication of DHCP listening for clients.

    Any ideas?

    Reply
  24. It is not necessary to install TFTP-Server. dnsmasq already has build-in tftp server and you did enabled it in dnsmasq.conf .

    enable-tftp
    tftp-root=/var/lib/tftpboot

    Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.