This documents how to setup a PXE boot server for Linux.
a) The first thing to note is that you need to setup your own mini-network that is completely disconnected from the network, since part of this process requires setting up a DHCP server which could conflict with the corporate DHCP server if they were both running on the same network simultaneously. So get yourself a switch from IT up front. You do *NOT* need the switch immediately, so just put it aside.
b) Next you'll need to install the following packages using yum server
tftp-server
dhcp
httpd
syslinux
root@vijay~]# yum install tftp-server dhcp httpd syslinux
c) Now you need to setup the DHCP server. With the FC4 RPM for dhcp, all you need to do is create /etc/dhcpd.conf with the following contents:
root@vijay~]# vim /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.63;
option subnet-mask 255.255.255.0;
option domain-name "";
option time-offset -18000;
range dynamic-bootp 192.168.0.160 192.168.0.191;
default-lease-time 21600;
max-lease-time 43200;
filename "/pxelinux.0"; (add these two line in dhcpd.conf file)
next-server 192.168.0.1;
}
d) Next you need to activate tftp within xinetd. All that is neccesary is to change disable=yes to disable=no in /etc/xinetd.d/tftp . Then restart xinetd.
root@vijay~]# vim /etc/xinetd.d/tftp
disable=no
e) Next you need to copy the files from the given locaton.
root@vijay~]# cp -r /usr/share/doc/syslinux-3.11/sample/* /tftpboot/
root@vijay~]# mkdir /tftpboot/pxelinux.cfg
f) Now Mount the DVD into /mnt and copy the content.
root@vijay~]# mount /dev/cdrom /mnt
root@vijay~]# cp -r /mnt/images/pxeboot/* /tftpboot
root@vijay~]# cp -r /mnt/isolinux/* /tftpboot
root@vijay~]# cp /mnt/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
root@vijay~]# cp -r /usr/lib/syslinux/pxelinux.0 /tftpboot
root@vijay~]# cp -r /usr/lib/syslinux/menu.c32 /tftpboot/pxelinux.cfg
root@vijay~]# cp -r /usr/lib/syslinux/* /tftpboot
g) Now install Kickstart Package and configure it according to Requirement. and save the file into /var/ftp/pub (if your are using FTP service).
root@vijay~]# yum install *kickstart*
root@vijay~]# system-config-kickstart
h) Now create the default pxelinux configuration inside the new file.
root@vijay~]# vim /tftpboot/pxelinux.cfg/default
default kickstart
prompt 0
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
MENU title network installation pxe
label linux
kernel vmlinuz
append initrd=initrd.img
label kickstart
kernel vmlinuz
append initrd=initrd.img ks=ftp://192.168.0.11/dump/ks.cfg
label ks
kernel vmlinuz
append ks initrd=initr
i) Now start dhcpd & vsftpd and activate tftp by running the following:
root@vijay~]#/etc/init.d/dhcpd start
root@vijay~]#/etc/init.d/xinetd restart
root@vijay~]#/etc/init.d/vsftpd start
##################################################
Now Boot Client Machine with PXE
##################################################
No comments:
Post a Comment