Self-made disc guided automated installation
First of all we need to understand which documents are needed, and we list the following
① need a folder to store the files, in the future to package this directory into an ISO
② Preparing the Kickstart file (ks.cfg)
③ ready to start the File Start menu
It's pretty much the same. Start making
Production process
1) Create a folder
mkdir data###
2) for the convenience of management we create a directory of Kickstart files in the data directory and copy the ks.cfg files to this directory
mkdir data/ksdir# Create directory CD data/ksdir# go to Directory cp-a/root/ks.cfg. #复制root目录下的ks. cfg file to the current directory
Note: Because I have a ready-made ks.cfg file, it is used, the previous article describes how to make kickstart file
3) Copy the Isolinux directory to the data directory (there is this directory in the disc image file, all copies from the CD)
Note: Here MISC/CD is the disc directory, a magical folder, need to open AutoFS service
4) Change the Isolinux.cfg file (displayed menu)
Default vesamenu.c32# This is the menu background plugin that displays the timeout 600# this is the Countdown time menu title CentOS 7# Main Title label Linux menu label ^auto Install CentOS 7 kernel vmlinuz append initrd=initrd.img ks=cdrom:/ksdir/ks.cfg# above this line ks= is the path we just deposited the kickstart file, Because it is an ISO disc, all here is Cdromlabel check menu label Test This ^maedia install CentOS 7 kernel vmlinuz append initrd= Initrd.img repo=http://192.168.1.116/centos/7/os/x86_64/#上面这个repo = is our own mounted Yum Source address installation package label local menu label Boot From ^local Drive localboot 0xFFFF
5) package The data directory into an ISO file
Mkisofs-r-j-t-V--no-emul-boot--boot-load-size 4--boot-info-table-v "CentOS 7 x86_64 Boot"-B isolinux/isolinux.bin -C Isolinux/boot.cat-o/root/cebtos7.boot.iso/root/data/#上面路径都是相对路径
6) completed, the SZ command is sent to win can be used.
Note: Suitable for fixed environment, set up the Yum source installation warehouse, sometimes to some computer room installation system, and the room environment is not set up the Yum source installation, this time you need to make a complete package of ISO image production made into a U disk to install.
Create a complete ISO installation file
First, list the required files.
Since ① is the complete ISO, we have to prepare CENTOS6 or 7 ISO images.
② Create a directory to store files, the pre-prepared ISO files copy all over
③ because we are going to make our own and then burn the disc, all to delete the Trans.tbl file
④ Delete all files in the Repodata directory, regenerate (this file is stored in Yum source data, installation package and other information)
⑤ Copy the Ks.cfg file to the directory and modify it on line
⑥ Modifying the boot menu isolinux.cfg
⑦ generate the ISO file and use
OK, basically, let's get down to work.
Production process
1) The first step is to mount, not much to say
2) We still use the data directory, which has the Create command, copy the file to the directory
Cp-r/misc/cd/*. # # #
Note: This copy is all the files in the ISO.
3) Delete the Trans.tbl file
Find-name TRANS. tbl# first See if there is find-name TRANS. tbl-exec rm {} \; #再删除
4) Delete all files from the Repodata directory and regenerate
Let's take a look at all the files under Repodata.
This is CENTOS7, the red box marked the file will be used.
Delete Files as follows
RM-RF repodata/* #删除 #
Regenerate the following
Createrepo-g/misc/cd/repodata/d87379a47bc2060f833000b9cef7f9670195fe197271d37fce5791e669265e8b-c7-x86_64- Comps.xml. # #生成文件到当前目录, the premise now repodata the directory
Note: The above command is to regenerate package group information
5) Copy the Ks.cfg file to the data directory, before the ks.cfg file is stored in the Ksdir directory, all the Ksdir directories can be copied.
Cp-r ksdir/data/##
The corresponding modification under this file vim ks.cfg
6) Modify the Isolinx.cfg file
Similar to the above Isolinx.cfg file, the above manual installation repo=http://192.168.1.116/centos/7/os/x86_64/removed can be
7) Create ISO file ibid.
OK to complete this, you can use, find a virtual machine to test.
Note: If there is insufficient space in the test, put the memory up a bit, find a U disk burning tool to burn the USB drive to start the installation.
Create ISO image USB drive to install Linux system automatically