Server IP Address - 192.168.1.100
DHCP Server - 192.168.1.100
----------------------------------------
Step-1 --> Set up DHCP Server on 192.168.1.100
# vi /etc/dhcpd.conf
ddns-update-style none;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.200;
option routers 192.168.1.100;
option subnet-mask 255.255.255.0;
option domain-name "example.com";
option domain-name-servers 192.168.1.100;
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.1.100;
option root-path "/tftpboot/";
filename "pxelinux.0";
}
:wq (Save this file)
# service dhcpd restart
# chkconfig dhcpd on
Step-2 --> Now Setup PEX boot.
# mkdir /tftpboot
# cp /root/pxelinux.0 /tftpboot/.
# cp /root/memdisk/ /tftpboot/.
Note: Pl scrap your mail Id's for -- ("pxelinux.0", "memdisk") files.
Step-3 --> Configure 'tftp' server
# chkconfig tftp on ( This will enable tftp from /etc/xinetd.d/tftp file )
# service xinetd restart
# /etc/init.d/dhcpd restart
Step-4 --> Setup PXE file's from the RedHat 1st cd. Insert RedHat 1st disk and copy the 'initrd.img' and 'vmlinuz' to /root directory.
# cd /root
# cp initrd.img /tftpboot/.
# cp vmlinuz /tftpboot/.
also copy and rename to
# cp initrd.img /tftpboot/fc2-initrd.img
# cp vmlinuz /tftpboot/fc2-vmlinuz
# cd /tftpboot
# mkdir pxelinux.cfg
# cd pxelinux.cfg
# touch default
# vi default
default install
# Always prompt
prompt 1
display pxeboot.msg
# Boot automatically after 30 seconds in tenths of a second
timeout 300
label local
localboot 0
label install
kernel vmlinuz
append initrd=initrd.img
:wq ( save this file )
Step-5 --> Now mount the ISO
Let's copt the RedHat ISO to /tmp directory ( ISO Name ->RHEL5.0_1.iso)
# mount -o loop -t iso9660 /tpm/RHEL5.0_1.iso /media/cdrom
# mount /dev/cdrom /media/cdrom
Step-6 --> Make NFS Share
# vi /etc/exportS
/media/cdrom *(rw,sync)
:wq (Save the file)
# service nfs restart
# chkconfig nfs on
# service dhcpd restart
Step-7 --> Now just set your client to boot from network(F12)
boot: PRESS Enter.....
----------------------------------------
No comments:
Post a Comment