How to Configure PXE boot Server

Assume the followings
1. Hostname :
2. IPaddress :
3. DNS Configured (Not required for PXE boot, you can use ip address instead of hostname)
4. Path of YUM using -vg option with ftp server (i.e.baseurl= )
5. NFS server installed

6. Lan Card (NIC) PXE boot enabled Here are the packages to be installed:

  •      system-config-netboot
  •      tftp
  •      tftp-server
  •      dhcpd

Step 1:Configuration of the NFS server

Add the following line in /etc/exports:
[root@server ~]# echo "/var/ftp/rhel5 *(rw,sync)" >> /etc/exports 

Then run 
[root@server ~]# exportfs -va
exporting *:/var/ftp/rhel5

Then run
[root@server ~]# service nfs restart
Shutting down NFS mountd:                             [  OK  ]
Shutting down NFS daemon:                             [  OK  ]
Shutting down NFS services:                           [  OK  ]
Starting NFS services:                                [  OK  ]
Starting NFS daemon:                                  [  OK  ]
Starting NFS mountd:                                  [  OK  ]
root@server ~]# showmount -e
Export list for
/var/ftp/rhel5 *

Step 2:Configuration of the tftp Server 

[root@server ~]# yum install tftp-server  tftp  alchemist  -y

Download the file system-config-netboot-0.1.41-1.FC6.noarch.rpm!TsBbGo%24

[root@server ~]#rpm -ivh system-config-netboot-0.1.41-1.FC6.noarch.rpm

Run system-config-netboot and configure a network installation:

[root@server ~]# system-config-netboot

Click on Network Installation and select the following entries

* Oprating system identifier: RHEL5
* Description: Red Hat Enterprise Linux 5
* Select protocol for installation: choose NFS
* Kickstart: if you have a kickstart file, put the path to it here, if not, leave empty
* Server IP address :* Location: /var/ftp/rhel5

Click OK. This creates a directory /tftpboot/linux-install/RHEL5 with files like initrd.img and vmlinuz downloaded from your nfsserver (/var/ftp/rhel5/images/pxeboot/).

Create a New PXE configuration file:

* Hostname of IP Address/subnet:

* Operating system: RHEL5 should be there. It is auto-populated from the previous step.

Click OK. A file named default is created in /tftpboot/linux-install/pxelinux.cfg.

Edit the file /etc/xinetd.d/tftp and change the line containing server_args and disable 

[root@server ~]# vim /etc/xinetd.conf
service tftp
 socket_type      = dgram
 protocol         = udp
wait              = yes
user              = root
server            = /usr/sbin/in.tftpd
server_args       = -s /tftpboot -v -v    //changes in this line
disable           = no                   //changes in this line
per_source        = 11
cps               = 100 2
 flags            = IPv4

[root@server ~]# chkconfig tftp on
and the start the server xinetd:

[root@server ~]# service xinetd restart
You can test your tftp server with the tftp client from your home directory:

[root@server ~]# tftp
tftp> get linux-install/pxelinux.0
You should have the file pxelinux.0 in your home directory.

Step 3:Configuration of the dhcp Server

Edit the file /etc/dhcpd.conf and add the following lines:
subnet netmask 
allow booting;
allow bootp;
class "pxeclients"
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
filename "linux-install/pxelinux.0";
Even if you have a running dhcp server somewhere, this will work.
Start the dhcp server:
[root@server ~]# service dhcpd restart

Restart now your client (target) pc to boot over the network.If it does not 
work, either disable the firewall (system-config-firewall) or allow port
69 to be accessible to any hosts accessing the tftp server.

About Alex Hunt

Hi All I am Manish Kumar Jha aka Alex Hunt. I am currently working in VMware Software India Pvt Ltd as Operations System Engineer (vCloud Air Operations). I have around 5 Years of IT experience and have exposure on VMware vSphere, vCloud Director, RHEL and modern data center technologies like Cisco UCS and Cisco Nexus 1000v and NSX. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.
This entry was posted in Server Configuration. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s