Installation system, the common way is through the U disk, CD-ROM, kickstart network automation installation, network Automation installation is good, but sometimes in the field to do the project there is no kickstart environment, even the basic network construction are not ready, at this time how to install the system? Through the U-disk or CD-ROM, manual installation needs a lot of options to fill out, then we can be automated KS environment to do the system image inside, the answer is very definite, next we will introduce the CentOS 7.1 automatic installation CD-ROM production
The first step is to mount the original disc image, if the mount point is/mnt/cdrom, then do the following:
cp-ar/mnt/cdrom/*/tmp/martin/
cp-ar/mnt/cdrom/.treeinfo/tmp/martin/
cp-ar/mnt/cdrom/.discinfo/tmp/martin/
createrepo-g/tmp/martin/repodata/*-comps.xml/tmp/martin/
[Email protected] isolinux]# pwd
/tmp/martin/isolinux
[[email protected] isolinux]# ls
Boot.cat grub.conf isolinux.bin ks_a.cfg ks_raid_ab.cfg memtest TRANS. TBL VESAMENU.C32
Boot.msg initrd.img isolinux.cfg ks_b.cfg ks_raid_bc.cfg splash.png upgrade.img vmlinuz
Under this directory to create a new four KS files, in fact, as long as one can, here to make four is for the hard disk different partition scheme,
Here we only introduce a ks_raid_ab.cfg configuration, which is actually a partition that defines the soft raid
# platform=x86, AMD64, or Intel EM64T
# Use text mode install
#text
# Use graphical Install
Graphical
# Install OS instead of upgrade
Install
# Use CDROM Media
CDRom
# Use NFS installation media
#nfs--server=172.16.15.10--dir=/centosinstall
# Use HTTP installation media
#url--url ftp://172.16.15.10/Public/iso/7.1-x64/
# Use FTP installation media
#url--url ftp://<username>:<password>@<server>/<dir>
#url--url ftp://172.16.15.10/
# System Language
Lang en_US. UTF-8
# System Keyboard
Keyboard US
# Network Information
Network--bootproto=dhcp--hostname Martin--onboot=on
#Root Password
ROOTPW 123456
#firewall--enabled--ssh
Firewall--disable
# System Authorization Information
Authconfig--useshadow--ENABLEMD5
# SELinux Configuration
SELinux--disabled
# System TimeZone
TimeZone Asia/shanghai
# System Bootloader Configuration
Bootloader--LOCATION=MBR
# Partition Clearing Information
#clearpart--all--initlabel--DRIVES=SDA
#part/boot--fstype= "EXT4"--size=300--ONDISK=SDA
#part pv.01--size=4096--grow--ONDISK=SDA
#volgroup VolGroup00--pesize=32768 pv.01
#logvol/--fstype= "Ext4"--name=logvol00--vgname=volgroup00--size=1024--grow
#logvol swap--fstype swap--name=logvol01--vgname=volgroup00--size=512
# Partition Clearing Information
Clearpart--all--initlabel
# Soft RAID1 Partitioning information
Part swap--fstype= "swap"--ONDISK=SDA--size=4096
Part raid.01--fstype= "raid"--grow--ONDISK=SDA--size=1
Part swap--fstype= "swap"--ondisk=sdb--size=4096
Part raid.02--fstype= "raid"--grow--ondisk=sdb--size=1
RAID/--device=md0--fstype= "Ext4"--level=1 raid.01 raid.02
# Reboot after installation
Reboot
# Do not configure the X Window System; If to configure it, uncomment following line
Skipx
# X Window System configuration information
#xconfig--defaultdesktop=gnome--depth=32--resolution=1024x768
%packages
@ additional-devel
@ Base
@ Core
@ Debugging
@ gnome-desktop
@ Development
@ mariadb
@ Emacs
@ web-server
@ network-file-system-client
@ java-platform
@ platform-devel
@ php
Expect
Iptraf-ng
Libaio-devel
Libpcap-devel
Lksctp-tools
Lrzsz
Nasm
Net-snmp-utils
Php-mysql
Php-pear
Php-soap
System-config-kickstart
# ADD These system perfomance enhanced tools
Vsftpd
Logwatch
Postfix
Nmap-ncat
Nmap
Ftp
Telnet
Lsscsi
# Update The Sysstat version from 9.0.4 to 10.1.6
Sysstat
%end
[[email protected] isolinux]# Vim isolinux.cfg Modify the file to add the following:
Label Ks_a
Menu Label ^custom ks_a CentOS 7--this is sinlgle_a
Kernel Vmlinuz
Append initrd=initrd.img inst.stage2=hd:/dev/cdrom inst.ks=cdrom:/isolinux/ks_a.cfg
Label Ks_b
Menu Label ^custom ks_b CentOS 7--this is Sinlgle_b
Kernel Vmlinuz
Append initrd=initrd.img inst.stage2=hd:/dev/cdrom inst.ks=cdrom:/isolinux/ks_b.cfg
Label Ks_ab
Menu Label ^custom Ks_ab CentOS 7--this is Raid_ab
Kernel Vmlinuz
Append initrd=initrd.img inst.stage2=hd:/dev/cdrom inst.ks=cdrom:/isolinux/ks_raid_ab.cfg
Label KS_BC
Menu Label ^custom KS_BC CentOS 7--this is RAID_BC
Kernel Vmlinuz
Append initrd=initrd.img inst.stage2=hd:/dev/cdrom inst.ks=cdrom:/isolinux/ks_raid_bc.cfg
At this point we will/tmp/martin/the directory to regenerate the image, centos7.1 the original image has more than 7 g, we can crop it, the next time we introduce
This article from "Martin" blog, declined reprint!
CentOS 7.1 Fully automatic installation CD making detailed