以下cfg模板都是带图行化的
CentOS 7.6.cfg
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
#cdrom
install
url --url=$tree
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=cn --xlayouts='cn'
# System language
lang zh_CN.UTF-8
# Network information
network --bootproto=dhcp --device=ens33 --onboot=off --ipv6=auto --no-activate
network --hostname=localhost.localdomain
# Root password
rootpw --iscrypted $6$u6GCUj1UI9Qisqzx$sciSIcF1HIBlgFzqrx56hio9KiCh8fO3ytyxRJnG3hWKfSwSlLkPpw8nSuI9pRHOeJFXV4LlQxE9MfPWyvSan1
# System services
services --enabled="chronyd"
# System timezone
timezone Asia/Shanghai --isUtc
user --name=user01 --password=$6$mCrrldkIARQlij7W$H3isSONHLZ31UDKryZW9hALxbFPEfa3ybLbQ.nEK6wP2Ms3ODW0Gy66Uzb9X49Grugjp65XD.iDR7TDKn7HzX1 --iscrypted --gecos="user01"
# X Window System configuration information
xconfig --startxonboot
# System bootloader configuration
bootloader --location=mbr --boot-drive=sda
# Partition clearing information
clearpart --none --initlabel
# Disk partitioning information
part /boot/efi --fstype="efi" --ondisk=sda --size=953 --fsoptions="umask=0077,shortname=winnt"
part pv.314 --fstype="lvmpv" --ondisk=sda --size=816338
part /boot --fstype="xfs" --ondisk=sda --size=1907
volgroup vg --pesize=4096 pv.314
logvol /tmp --fstype="xfs" --size=9536 --name=tmp --vgname=vg
logvol /opt --fstype="xfs" --size=47683 --name=opt --vgname=vg
logvol /home --fstype="xfs" --size=4768 --name=home --vgname=vg
logvol swap --fstype="swap" --size=7629 --name=swap --vgname=vg
logvol /var --fstype="xfs" --size=28610 --name=var --vgname=vg
logvol / --fstype="xfs" --size=28610 --name=root --vgname=vg
logvol /usr --fstype="xfs" --size=28610 --name=usr --vgname=vg
%packages
@^gnome-desktop-environment
@base
@core
@desktop-debugging
@dial-up
@directory-client
@fonts
@gnome-desktop
@guest-agents
@guest-desktop-agents
@input-methods
@internet-browser
@java-platform
@multimedia
@network-file-system-client
@networkmanager-submodules
@print-client
@x11
chrony
%end
%addon com_redhat_kdump --disable --reserve-mb='auto'
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end
# License agreement
eula --agreed
selinux --disabled
firewall --disabled
reboot
CentOS 6.9
# Kickstart file automatically generated by anaconda.
#version=DEVEL
firewall --disabled
install
url --url=$tree
lang zh_CN.UTF-8
keyboard us
network --onboot no --device eth0 --bootproto dhcp --noipv6
rootpw --iscrypted $6$uGGEd3ePWaupd4Gn$MljAHWvuyxKGbW166hO/exzyJBSvzGpdCScQMleISGKopgFjmj2GHeVUpFNVkZOKUqNlgpHFJG/.XfdLy8Jw21
authconfig --enableshadow --passalgo=sha512
graphical
selinux --disabled
timezone Asia/Shanghai
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart --all
part /boot --fstype=ext4 --size=2048
part pv.008002 --grow --size=200
volgroup vg --pesize=4096 pv.008002
logvol /home --fstype=ext4 --name=home --vgname=vg --size=10240
logvol /usr/local --fstype=ext4 --name=local --vgname=vg --size=30960
logvol /opt --fstype=ext4 --name=opt --vgname=vg --size=30960
logvol / --fstype=ext4 --name=root --vgname=vg --size=30960
logvol swap --name=swap --vgname=vg --size=16092
logvol /tmp --fstype=ext4 --name=tmp --vgname=vg --size=10240
logvol /usr --fstype=ext4 --name=usr --vgname=vg --size=30960
logvol /var --fstype=ext4 --name=var --vgname=vg --size=30960
#repo --name="CentOS" --baseurl=cdrom:sr0 --cost=100
%packages
@base
@chinese-support
@core
@debugging
@basic-desktop
@desktop-debugging
@desktop-platform
@directory-client
@fonts
@general-desktop
@graphical-admin-tools
@input-methods
@internet-applications
@internet-browser
@java-platform
@legacy-x
@network-file-system-client
@office-suite
@print-client
@remote-desktop-clients
@server-platform
@server-policy
@workstation-policy
@x11
mtools
pax
python-dmidecode
oddjob
wodim
sgpio
genisoimage
device-mapper-persistent-data
abrt-gui
samba-winbind
certmonger
pam_krb5
krb5-workstation
libXmu
%end