;KS文件可以在安装好的linux上使用system-config-kickstart命令生成
- [root@rhel5 ~]# ls /tftpboot/
- boot.cat centos4.8_64 isolinux.bin memtest param.msg pxelinux.cfg rhel5.4_64 splash.lss
- boot.msg general.msg isolinux.cfg options.msg pxelinux.0 rescue.msg rhel6_64 TRANS.TBL
-
- [root@rhel5 ~]# cat /tftpboot/pxelinux.cfg/default
- default rhel5_rescue
- prompt 1
- timeout 600
- display boot.msg
- F1 boot.msg
- F2 options.msg
- F3 general.msg
- F4 param.msg
- F5 rescue.msg
-
- label rhel5_rescue
- kernel rhel5.4_64/vmlinuz
- append ksdevice=eth0 load_ramdisk=1 initrd=rhel5.4_64/initrd.img noipv6
-
-
- label rhel5.4_64
- kernel rhel5.4_64/vmlinuz
- append ksdevice=eth0 load_ramdisk=1 initrd=rhel5.4_64/initrd.img ks=ftp://192.168.50.7/ks/ks5_64.cfg noipv6
-
- label rhel6_64
- kernel rhel6_64/vmlinuz
- append ksdevice=eth0 load_ramdisk=1 initrd=rhel6_64/initrd.img ks=ftp://192.168.50.7/ks/ks6_64.cfg noipv6
-
-
- label centos4.8_64
- kernel centos4.8_64/vmlinuz
- append ksdevice=eth0 load_ramdisk=1 initrd=centos4.8_64/initrd.img ks=ftp://192.168.50.7/ks/ks4.8_64.cfg noipv6
-
- [root@rhel5 ~]# cat /tftpboot/boot.msg
- #To decide install os type and enter command to continue
-
- linux resuce ---> rhel5_rescue rescue
-
- rhel5.4 64bit ---> rhel5.4_64
-
- rhel6.0 64bit ---> rhel6_64
-
- centos4.8 64bit ---> centos4.8_64
四:配置FTP和autofs,这里将利用ftp和autofs为安装提供光盘源镜像
- [root@rhel5 ~]# rpm -qa |egrep ''vsftpd|autofs''
- vsftpd-2.0.5-16.el5_5.1
- autofs-5.0.1-0.rc2.131.el5
-
- [root@rhel5 ~]# tail -1 /etc/auto.master
- /var/ftp/pub /etc/auto.ftp
- [root@rhel5 ~]# cat /etc/auto.ftp
- iso5 -fstype=iso9660,ro,loop :/data/ISO/rhel-server-5.4-x86_64-dvd.iso
- iso4.8 -fstype=iso9660,ro,loop :/data/ISO/CentOS-4.8-x86_64-binDVD.iso
- iso6 -fstype=iso9660,ro,loop :/data/ISO/rhel6.iso
五:启动服务和测试
- [root@rhel5 ~]# service dhcpd restart
- Shutting down dhcpd: [ OK ]
- Starting dhcpd: [ OK ]
-
- [root@rhel5 ~]# service vsftpd restart
- Shutting down vsftpd: [ OK ]
- Starting vsftpd for vsftpd: [ OK ]
-
- [root@rhel5 ~]# service autofs restart
- Mon Jun 13 08:49:48 2011 1 192.168.50.184 0 /pub/iso5/images/updates.img b _ o a rhinstall@ ftp 0 * i
- Mon Jun 13 08:49:48 2011 1 192.168.50.184 0 /pub/iso5/disc1/images/updates.img b _ o a rhinstall@ ftp 0 * i
- Mon Jun 13 08:49:48 2011 1 192.168.50.184 0 /pub/iso5/images/product.img b _ o a rhinstall@ ftp 0 * i
- Mon Jun 13 08:49:48 2011 1 192.168.50.184 0 /pub/iso5/disc1/images/product.img b _ o a rhinstall@ ftp 0 * i
- Mon Jun 13 08:49:56 2011 8 192.168.50.184 91160576 /pub/iso5/images/stage2.img b _ o a rhinstall@ ftp 0 * c
本文出自 “月牙天冲” 博客,谢绝转载!
|