kickstart文件
# 安装系统
install
# 通过PXE
url --url=$tree
# 键盘模式
keyboard --vckeymap=us --xlayouts='us'
#清除主引导记录
zerombr
# Partition clearing information
clearpart --all --initlabel
# System timezone
timezone Asia/Shanghai --isUtc --nontp
# System language
lang en_US.UTF-8
# System authorization information
auth --enableshadow --passalgo=sha512
# Root password
rootpw --iscrypted $default_password_crypted
# Use text/graphical install
text
# System bootloader configuration
bootloader --append="crashkernel=auto" --location=mbr --boot-drive=sda
# Run the Setup Agent on first boot
firstboot --disabled
ignoredisk --only-use=sda
# Network information
network --hostname=localhost.localdomain
# System services
services --disabled="chronyd"
# 磁盘分区,默认单位为M
part biosboot --fstype="biosboot" --ondisk=sda --size=2
part /boot/efi --fstype="efi" --ondisk=sda --size=200 --fsoptions="defaults,uid=0,gid=0,umask=0077,shortname=winnt"
part /boot --fstype="xfs" --ondisk=sda --size=2048
part / --fstype="xfs" --ondisk=sda --size=51200
part pv.01 --fstype="lvmpv" --grow --ondisk=sda
volgroup vg_centos --pesize=4096 pv.01
logvol /wls --fstype="xfs" --grow --size=1 --name=wls --vgname=vg_centos
#UEFI使用GPT分区
%pre
parted -s /dev/sda mklabel gpt
%end
# SELinux configuration
selinux --disabled
#Firewall configuration
firewall --disabled
# Do not configure the X Window System
skipx
# Reboot after installation
reboot
%packages
@^minimal
@core
%end
install
# 通过PXE
url --url=$tree
# 键盘模式
keyboard --vckeymap=us --xlayouts='us'
#清除主引导记录
zerombr
# Partition clearing information
clearpart --all --initlabel
# System timezone
timezone Asia/Shanghai --isUtc --nontp
# System language
lang en_US.UTF-8
# System authorization information
auth --enableshadow --passalgo=sha512
# Root password
rootpw --iscrypted $default_password_crypted
# Use text/graphical install
text
# System bootloader configuration
bootloader --append="crashkernel=auto" --location=mbr --boot-drive=sda
# Run the Setup Agent on first boot
firstboot --disabled
ignoredisk --only-use=sda
# Network information
network --hostname=localhost.localdomain
# System services
services --disabled="chronyd"
# 磁盘分区,默认单位为M
part biosboot --fstype="biosboot" --ondisk=sda --size=2
part /boot/efi --fstype="efi" --ondisk=sda --size=200 --fsoptions="defaults,uid=0,gid=0,umask=0077,shortname=winnt"
part /boot --fstype="xfs" --ondisk=sda --size=2048
part / --fstype="xfs" --ondisk=sda --size=51200
part pv.01 --fstype="lvmpv" --grow --ondisk=sda
volgroup vg_centos --pesize=4096 pv.01
logvol /wls --fstype="xfs" --grow --size=1 --name=wls --vgname=vg_centos
#UEFI使用GPT分区
%pre
parted -s /dev/sda mklabel gpt
%end
# SELinux configuration
selinux --disabled
#Firewall configuration
firewall --disabled
# Do not configure the X Window System
skipx
# Reboot after installation
reboot
%packages
@^minimal
@core
%end