Preboot Execution Environment (PXE) Configuration in RHEL5
PXE stands for Preboot Execution Environment. PXE configuration is used to install the operating system automatically from linux redhat server without CD ROM. By using this single person can able to handle more number of operating system installation.
To use this PXE service, our system should be DHCP server( Server which assigns IP address when computer restarts / fresh OS installed in a network)
Requirements: DHCP Server
Package Name: tftp
An operating system copy of linux redhat version 5 should be copied to the directory /var/ftp/pub
By installing this tftp package, tftpboot directory will be created in /
#yum install tftp*
#cd /tftpboot
#mkdir linux-install
#cd linux-install
#mkdir msgs
#cd msgs
Copy all .msg extension files into the directory tftpboot/linux-install/msgs, make sure that OS files are copied to /var/ftp/pub
#cp /var/ftp/pub/isolinux/*.msg /tftpboot/linux-install/msgs
Copy initrd.msg file in Pxeboot into linux-install directory
#cp /var/ftp/pub/images/Pxeboot/initrd.img /tftpboot/linux-install
Copy vmlinz file in Pxeboot into linux-install directory
#cp /var/ftp/pub/images/Pxeboot/vmlinz /tftpboot/linux-install
FIND Pxelinux.0 file
#find l -name Pxelinux.0
—>> /usr/lib/syslinux/Pxelinux.0
Copy Pxelinux.0 file into linux-install directory
#cp /usr/lib/syslinux/Pxelinux.0 /tftpboot/linux-install
#mkdir Pxelinux.cfg
#cd Pxelinux.cfg
Make sure that linux-install directory having following
- initrd.img
- msgs
- pxelinux.0
- pxelinux.cfg
- vmlinuz
Create a file, name – dafault
pxelinux.cfg] # vim default
Type the following in the default file
default linux
prompt 1
timeout 100
label linux
kernel vmlinuz
append initrd=initrd.img
GO TO DHCP Server Configuration file
#vim /etc/dhcpd.conf
host ns{
……….
….
}
allow booting;
allow bootp;
class “pxeclients” {
match if substring (option vendor-class-identifier, 0, 9) = “PXEClient”;
next-server 192.168.1.254;
filename “linux-install/Pxelinux.0″;
}
Restart the Services
#service dhcpd restart
#chkconfig dhcpd on
#service xinetd restart
#chkconfig xinetd on
#service vsftpd restart
#chkconfig vsftpd on
#chkconfig tftp on






