Before studying this article I would like to be able to use the Kickstart automatic installation system, this article is in the context of my previous article modified to complete.
Implementation purpose: Kickstart can select other versions of the system when fully automatic installation.
For example: Centos66.x86 and centos66.x86_64
1. New centos66_64 and centos66_32 under Tftpboot directory
[Email protected] tftpboot]# mkdir centos66_64 centos66_32
Move the copied initrd.img Vmlinuz in the 64-bit image to the centos66_64 directory, 32-bit the same, and finally the following:
[e-mail protected] kickstart]# tree tftpboot/tftpboot/├──boot.msg #选择系统前提示信息保存文件 and will speak later ├──centos66_32 ├──centos66_64│├──initrd.img│└──vmlinuz├──pxelinux.0└──pxelinux.cfg└──defa ULT3 directories, 5 files
1.1 Modifying the default file
[[email protected] pxelinux.cfg]# less default default 1 #默认安装系统, 1 for the back of the label 1prompt 1 #打开提示timeout 120 # Automatically press defaultdisplay boot.msg after this event is not entered #提示文件F1 boot.msgF2 options.msgF3 general.msgf4 param.msgf5 rescue.msglabel 1kernel centos66_64/vmlinuz append ks=nfs:192.168.2.11:/kickstart/centosinstall/centos66_64/ks.cfg ksdevice= Eth0 initrd=centos65_64/initrd.imglabel 2kernel centos66_32/vmlinuzappend ks=nfs : 192.168.2.11:/kickstart/centosinstall/centos66_32/ks.cfg ksdevice=eth0 initrd=centos66_32/ Initrd.img
It is recommended to change the label to a simple number for easy input.
1.2 Hint file boot.msg, for reference, not supported in Chinese
[email protected] kickstart]# cat tftpboot/boot.msg ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++ Welcome to use System Install Center ++++++++++++++++++++++++++++++please input num++++++++++++++++++++++++++++++ ++++default system centos66.x86_64+++++++++++++ centos66.x86_64-------------------------------->1 centos66.x86- ------------------------------->2+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ok,tftpboot modification completed.
2, modify the storage System directory
[email protected] kickstart]# ls centosinstall/centos66_32 centos66_64
Copy the 64-bit system files to centos66_64, each system directory has a ks.cfg file, and the NFS-specified path is different:
NFS--server=192.168.2.11--dir=/kickstart/centosinstall/centos66_64
3. NFS Modification
[Email protected] kickstart]# cat/etc/exports/kickstart/centosinstall/centos66_64 * (rw,sync)/kickstart/ CENTOSINSTALL/CENTOS66_32 * (Rw,sync)
4. Restart the service:
You can write a simple shell script:
[email protected] kickstart]# cat kickstart.sh #!/bin/shcase instatus)/etc/init.d/xinetd STATUS/ETC/INIT.D/DHCPD Status/etc/init.d/nfs status;; Start)/etc/init.d/xinetd START/ETC/INIT.D/DHCPD Start/etc/init.d/nfs start; Stop)/etc/init.d/xinetd STOP/ETC/INIT.D/DHCPD stop/etc/init.d/nfs stop;; Restart)/etc/init.d/xinetd RESTART/ETC/INIT.D/DHCPD restart/etc/init.d/nfs Restart; Esac
./kickstart.sh Restart
5. Testing
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/58/8E/wKioL1S0g_LzLXVdAAMVMnAJj_g723.jpg "title=" Qq20150113102923.jpg "alt=" Wkiol1s0g_lzlxvdaamvmnajj_g723.jpg "/>
Boot after input: "1" return
Start installing 64-bit CentOS ... (I moved the CENTOS65 directly over).
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/58/91/wKiom1S0gz_xtB4cAALpTvFpfjQ011.jpg "title=" Qq20150113102941.jpg "alt=" Wkiom1s0gz_xtb4caalptvfpfjq011.jpg "/>
Kickstart installation method of multi-system