转载至http://liyaoyi.blog.51cto.com/442933/934018#comment
此文章,经博主测试,可以制作安装盘;
需要注意的地方:
1:ks文件,网卡名,dell服务器默认是emX,其他服务器显示的ethX;
2:安装提示“unable to read group information from repositories。This is problem with the generation of your install tree.” 是没生产MD5效验码,也就是忘记执行博文的第9步操作;
3:博主测试用的CentOS 6.2
在这里感谢hpsfpcca博主 这篇文档可以帮助我在工作中节省很多时间;
CentOS 6.3定制自动安装
之前有折腾过CentOS5.x版本,今天在论坛中看到有哥们提问关于最新版本的定制光盘,按照这之前的方法不成功。我特意下载一个CentOS 6.3 进行测试并记录过程一起分享,发现其实方法和之前的区别不大。由于水平有限,环境有限,所以不能保证这是十分的正确的。
#!/bin/bash SRC_RPMS=/mnt/cdrom/Packages DST_RPMS=/data/OS/Packages packages_list=/root/packages.list number_of_packages=`cat $packages_list | wc -l` i=1 while [ $i -le $number_of_packages ] ; do name=`head -n $i $packages_list | tail -n -1` echo "cp $SRC_RPMS/$name* $DST_RPMS/" cp $SRC_RPMS/$name* $DST_RPMS/ i=`expr $i + 1` done
# platform= x86, AMD64, or Intel EM64T # Firewall configuration firewall --disabled # Install OS instead of upgrade install # Use CDROM installation media cdrom # Root password default is "redhat" rootpw --iscrypted $1$36bsCbH1$UDJ6eCqPi2Nm1KsgajvHs1 # System authorization information auth --useshadow --passalgo= md5 # Use text mode install text firstboot --disable # System keyboard keyboard us # System language lang en_US # SE Linux configuration se linux --disabled # Do not configure the X Window System skipx # Installation logging level logging --level= info # Reboot after installation reboot # System timezone timezone Asia/Shanghai # Network information network --bootproto= dhcp --device= eth0 --onboot=on –noipv6 # System bootloader configuration bootloader --location= mbr # Clear the Master Boot Record zerombr # Partition clearing information clearpart --all --initlabel # Disk partitioning information part /boot --fstype= "ext4" --size= 100 part / --fstype= "ext4" --size= 5120 part swap --size= 1024 part /data --fstype= "ext4" --grow --size= 1 %packages @base @core @development @server-policy sgpio ntp