http://www.linuxprobe.com/chapter-19.html
yum install dhcp -y
cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak
cat >>/etc/dhcp/dhcpd.conf<<a
allow booting;
allow bootp;
ddns-update-style interim;
ignore client-updates;
subnet 192.168.14.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.14.140;
range dynamic-bootp 192.168.14.10 192.168.14.20;
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.14.10;
filename "pxelinux.0";
}
a
/etc/init.d/dhcpd start
chkconfig dhcpd on
yum install tftp-server -y
vim /etc/xinetd.d/tftp
disable = yes
/etc/init.d/xinetd restart
yum install syslinux -y
cd /var/lib/tftpboot
cp /usr/share/syslinux/pxelinux.0 .
挂载iso
cp /media/images/pxeboot/{vmlinuz,initrd.img} .
cp /media/isolinux/{vesamenu.c32,boot.msg} .
mkdir pxelinux.cfg
cp /media/isolinux/isolinux.cfg pxelinux.cfg/default
这步和c7不一样
[[email protected] tftpboot]# vim pxelinux.cfg/default
//将第1行修改为:
default linux
//将第64行修改为:
append initrd=initrd.img inst.stage2=ftp://192.168.10.10 ks=ftp://192.168.10.10/pub/ks.cfg quiet
//将第70行修改为:
append initrd=initrd.img inst.stage2=ftp://192.168.10.10 rd.live.check ks=ftp://192.168.10.10/pub/ks.cfg quiet
......后略