pxe server
DESCRIPTION
pxe servidorTRANSCRIPT
Red Hat Certified Professional
Facebook: https://www.facebook.com/groups/redhatpune/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++To Configure PXE server for installation, refer the steps given below.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++PXE Server: IP : 192.168.0.254
Subnet Mask : 225.255.255.0Gateway : 192.168.0.254DNS : 192.168.0.254
On Server : 192.168.0.254
1. Create a local repository first. Refer the attached document for doing the same.
2. Install the tftp-server and dhcp packages.
# yum install tftp-server dhcpd -y
3. In the tftp-server config file at /etc/xinet.d/tftp, change the disabled parameter from yes to no. This will look as follows.
# cat /etc/xinetd.d/tftp # default: off# description: The tftp server serves files using the trivial file transfer \# protocol. The tftp protocol is often used to boot diskless \# workstations, download configuration files to network-aware printers, \# and to start the installation process for some operating systems.service tftp{
socket_type = dgramprotocol = udpwait = yesuser = rootserver = /usr/sbin/in.tftpdserver_args = -s /var/lib/tftpbootdisable = noper_source = 11cps = 100 2flags = IPv4
}
4. Configure the DHCP server to use the boot images packaged with SYSLINUX. Configure DHCP server. Sample will look as follows.
# cat /etc/dhcp/dhcpd.confAllow booting;
Allow bootp;authoritative;subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.254;range 192.168.0.100 192.168.0.200;option domain-name “example.com”;option domain-name-servers 192.168.0.254;default-lease-time 21600;max-lease-time 43200;
class "pxeclients" { match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; next-server 192.168.0.254; filename "pxelinux/pxelinux.0"; }
}
5. Copy some files from mounted DVD iso which we use as local repository
# mkdir /tmp/new# cp -pr /localrepo/Packages/syslinux-4.02-8.el6.x86_64.rpm /tmp/new
6. Extract the package:
# cd /tmp/new# rpm2cpio syslinux-4.02-8.el6.x86_64.rpm | cpio -dimv
7. Create a pxelinux directory within tftpboot and copy pxelinux.0 into it:
# mkdir /var/lib/tftpboot/pxelinux# cp /tmp/new/usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/pxelinux
8. Create a pxelinux.cfg directory within pxelinux:
# mkdir /var/lib/tftpboot/pxelinux/pxelinux.cfg
Then add a configuration file to this directory. The file should either be named default.
# cat /var/lib/tftpboot/pxelinux/pxelinux.cfg/defaultdefault vesamenu.c32prompt 1timeout 600display boot.msg
label linux menu label ^Install RHEL6 using Kickstart menu default kernel vmlinuz append initrd=initrd.img ks=ftp://192.168.0.254/ks.cfg
The file ftp://192.168.0.254/ks.cfg is a kickstart file hosted at 192.168.0.254 using vsftpd service.
9. Copy the splash image into tftp root directory
# cp /boot/grub/splash.xpm.gz /var/lib/tftpboot/pxelinux/splash.xpm.gz
10. Copy the boot images into tftp root directory from localrepo
# cp /localrepo/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/rhel6/
On Client:
Reboot the system, and select the network device as boot device when prompted.