Setup your PXE server

Install needed packages

yum install nfs-utils tftp-server rsync

Connect the CentOS 7 DVD to your VM
Show VM Details – IDE CDROM – Connect – Select ISO
Mount the DVD

mount /dev/sr0 /mnt -o ro

Create a new directory and copy the DVD data to it

mkdir /centos7_x64
rsync -avP /mnt/ /centos7_x64/

Set your exports file

echo "/centos7_x64 *(sync)" > /etc/exports

Enable the NFS server and reboot

systemctl enable nfs-server

Test your NFS server – output should show what you echoed to your exports file above

showmount -e localhost

Enable tftp server – Set “disable = no” and save

vi /etc/xinetd.d/tftp

Reload xinetd to start up the tftp server

systemctl restart xinetd

Open the needed ports in the firewall

firewall-cmd --add-service nfs --permanent
firewall-cmd --add-service tftp --permanent
firewall-cmd --add-service dhcp --permanent
firewall-cmd --add-service rpc-bind --permanent
firewall-cmd --add-service mountd --permanent

We will create the PXE config files in the next step.

Leave a Reply

Don't like what I say? Leave!