PXE + Kickstart搭建局域网环境(2)

%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

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/350355dc47cb7e724340675b0c8ae2d0.html