%post --interpreter=/bin/bash
mkdir /var/cache/yum/x86_64/6Server/ -p
cat >>/etc/yum.repos.d/dvd.repo <<mine
[rhel6]
name=rhel6
baseurl=https://www.linuxidc.com/ftp:/192.168.0.210/pub/rhel6/
gpgcheck=0
[client6]
name=client6
baseurl=ftp://192.168.0.210/pub/client6/
gpgcheck=0
mine
yum clean all
%end
%packages
@base
yum-plugin-security
-abrt-plugin-mailx
-abrt-plugin-sosreport
%end
修改pxelinux.cfg/default
[root@server ~]# cd /var/lib/tftpboot/pxelinux.cfg/
[root@server pxelinux.cfg]# vim default
default vesamenu.c32
#prompt 1
timeout 600
display boot.msg
menu background splash.jpg
menu title Welcome to Red Hat Enterprise Linux 6.2!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000
label rhel6
menu label ^rhel6 install (text mode)
menu default
kernel /vmlinuz
append initrd=/initrd.img ks=http://192.168.0.210/ks.cfg
label rescue
menu label ^Rescue installed system
kernel vmlinuz
append initrd=initrd.img rescue