PXE搭建原理和过程之uefi.cfg
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
#nfs install
nfs --server=192.168.0.1 --dir=/installations
# 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 --onboot=off --ipv6=auto --no-activate
network --hostname=localhost.localdomain
# Root password
rootpw --iscrypted $6$W94CsddpLTWlOH2q$r7v1uEFFz1q7rA.fY5elQ6ZpzuzX/jGPNSvcvJglflbFPXhXlgB0/jKkP44fG/SNJ5.pGYUvT21eEPSbEBxMk.
# System services
services --enabled="chronyd"
# System timezone
timezone Asia/Shanghai --isUtc
# X Window System configuration information
xconfig --startxonboot
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
autopart --type=lvm
# Partition clearing information
clearpart --all --initlabel --drives=sda
# Disk partitioning information
%post --nochroot
#####copy kyinfo and LICENSE
if [ -e /tmp/.kyinfo ];then
echo y | cp -a /tmp/.kyinfo $ANA_INSTALL_PATH/etc/
fi
if [ -e /tmp/LICENSE ];then
echo y | cp -a /tmp/LICENSE $ANA_INSTALL_PATH/etc/
fi
if [ -e /run/install/repo/.kyinfo ];then
echo y | cp -a /run/install/repo/.kyinfo $ANA_INSTALL_PATH/etc/
fi
if [ -e /run/install/repo/LICENSE ];then
echo y | cp -a /run/install/repo/LICENSE $ANA_INSTALL_PATH/etc/
fi
##### kylin postaction
## cdrom install, copy .kylin-post-actions
if [ -e /run/install/repo/.kylin-post-actions ];then
echo y | cp -a /run/install/repo/.kylin-post-actions /tmp/.kylin-post-actions
echo "repo=/run/install/repo" > /tmp/.kylin-repo
fi
## copy kylin post scripts in new os
if [ -e /tmp/.kylin-post-actions ];then
echo y | cp -a /tmp/.kylin-post-actions $ANA_INSTALL_PATH/bin
fi
if [ -e /tmp/.kylin-repo ];then
echo y | cp -a /tmp/.kylin-repo $ANA_INSTALL_PATH/tmp/
fi
## copy and run .kylin-post-actions-nochroot
if [ -e /run/install/repo/.kylin-post-actions-nochroot ];then
echo y | cp -a /run/install/repo/.kylin-post-actions-nochroot /tmp/.kylin-post-actions-nochroot
fi
if [ -e /tmp/.kylin-post-actions-nochroot ];then
/bin/bash -x /tmp/.kylin-post-actions-nochroot &> $ANA_INSTALL_PATH/var/log/.kylin-post-actions-nochroot.log
fi
%end
%post
systemctl disable systemd-networkd-wait-online.service
systemctl disable multipathd.service
### do kylin post action
if [ -e /bin/.kylin-post-actions ];then
/bin/bash -x /bin/.kylin-post-actions &> /var/log/.kylin-post-actions.log
fi
%end
%packages
@^kylin-desktop-environment
@graphical-admin-tools
@system-tools
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
%anaconda
pwpolicy root --minlen=8 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=8 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=8 --minquality=1 --notstrict --nochanges --notempty
%end