DHCP+PXE配置文件
subnet 172.16.0.0 netmask 255.255.255.0 { range 172.16.0.10 172.16.0.253;option routers 172.16.0.1;option subnet-mask 255.255.255.0;}
#配置dhcp服务器
###################################
#放在/etc/dhcpd.conf末尾就可以了option space PXE;option PXE.mtftp-ip code 1 = ip-address;class "pxeclients" { match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";option vendor-class-identifier "PXEClient";vendor-option-space PXE;# At least one of the vendor-specific PXE options must be set in # order for the client boot ROMs to realize that we are a PXE-compliant # server. We set the MCAST IP address to 0.0.0.0 to tell the boot ROM # that we can't provide multicast TFTP (address 0.0.0.0 means no # address)。
option PXE.mtftp-ip 0.0.0.0;# This is the name of the file the boot ROMs should download. filename "pxelinux.0";# This is the name of the server they should get it from. next-server 192.168.1.246; //tftp服务器,可以和dhcp服务器不在同一个机器上}
###################################
#打开tftp chkconfig tftp ——level 345 on vi /etc/xinetd.d/tftp #看看内容,不用改
cd /tftpboot/ mkdir pxelinux.cfg vi default
##################################
#default的内容如下DEFAULT install PROMPT 1 LABEL install FC5-x86 KERNEL vmlinuz APPEND initrd=initrd.img devfs=nomount ramdisk_size=16384
#################################
拷贝光盘的/images/pxeboot/或者FC5/isolinux下面的initrd.img和vmlinuz到/tftpboot下,注意,必须用光盘上的,不能用硬盘的。
cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
#启动tftp服务/etc/init.d/xinetd restart