分类: LINUX
2008-12-09 22:51:43
1. Preparing the boot server (dhcp, tftp)
A. Installing DHCP server
#yum install dhcp
#vi /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
allow booting;
allow bootp;
class "pxeclients"{
match if substring(option vendor-class-identifier,0,9) = "PXEClient";
filename "centos5u2/pxelinux.0";
next-server 192.168.75.11;
}
subnet 192.168.75.0 netmask 255.255.255.0 {
option routers 192.168.75.2;
option subnet-mask 255.255.255.0;
option domain-name "";
option domain-name-servers 192.168.75.2;
option time-offset -18000;
range dynamic-bootp 192.168.75.1 192.168.75.254;
default-lease-time 21600;
max-lease-time 43200;
}
#service dhcpd restart
B. Installing TFTP server
#yum install xinetd
#yum install tftp-server
#vi /etc/xinetd.d/tftp
service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot disable = no }
#mkdir /mnt/iso
#mount -o loop centos.5.2.iso /mnt/iso
#mkdir -p /tftpboot/centos5u2#mkdir -p /tftpboot/centos5u2/pxelinux.cfg#cp /usr/lib/syslinux/pxelinux.0 /tftpboot/centos5u2/#cp /mnt/iso/isolinux/*.msg /tftpboot/centos5u2/#cp /mnt/iso/images/pxeboot/initrd.img /tftpboot/centos5u2/#cp /mnt/iso/images/pxeboot/vmlinuz /tftpboot/centos5u2/#cp /mnt/iso/isolinux/isolinux.cfg /tftpboot/centos5u2/pxelinux.cfg/default#vi /tftpboot/centos5u2/pxelinux.cfg/defaultdefault autoinstall
prompt 1
timeout 100
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux
kernel vmlinuz
append initrd=initrd.img
label text
kernel vmlinuz
append initrd=initrd.img text
label ks
kernel vmlinuz
append ks initrd=initrd.img
label local
localboot 1
label memtest86
kernel memtest
append -label autoinstall
kernel vmlinuz
append ks= initrd=initrd.img#service xinetd restart2. Preparing the installation server (HTTP, NFS, FTP)
Please refer to RHCT Lab1
3. Preparing the ks.cfg file
Please refer to RHCE Lab1
4. Installing the CentOS5 client with PXE
Set BIOS to boot from Network PXE
boot:autoinstall