#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
# Use text mode install
graphical
# Firewall configuration
firewall --disable
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# Use network installation
url --url=http://10.16.10.64/cblr/links/rocky8.10-x86_64
# If any cobbler repo definitions were referenced in the kickstart profile, include them here.
repo --name=source-1 --baseurl=http://10.16.10.64/cobbler/ks_mirror/rocky8.10-x86_64/AppStream
repo --name=source-2 --baseurl=http://10.16.10.64/cobbler/ks_mirror/rocky8.10-x86_64/BaseOS
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# Reboot after installation
reboot
#Root password
rootpw --iscrypted $1$AO9TT6.k$pJZJ3P4sIKm8yoN7BXH.q/
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# System timezone
#timezone Asia/Shanghai --isUtc --nontp
timezone Asia/Shanghai --ntpservers=172.16.11.41
# Install OS instead of upgrade
install
# Clear the Master Boot Record
zerombr
# Allow anaconda to partition the system as needed
#autopart
#autopart --type=lvm --fstype=xfs --nohome
part /boot/efi --fstype="efi" --ondisk=sda --size=500 --fsoptions="umask=0077,shortname=winnt"
part /boot --fstype="xfs" --ondisk=sda --size=500
part pv.473 --fstype="lvmpv" --ondisk=sda --size=1 --grow
volgroup rl --pesize=4096 pv.473
#logvol / --fstype="xfs" --size=30195 --name=root --vgname=rl
logvol / --fstype="xfs" --size=1 --name=root --vgname=rl --grow
logvol swap --fstype="swap" --size=10000 --name=swap --vgname=rl
%pre
set -x -v
exec 1>/tmp/ks-pre.log 2>&1
# Once root's homedir is there, copy over the log.
while : ; do
sleep 10
if [ -d /mnt/sysimage/root ]; then
cp /tmp/ks-pre.log /mnt/sysimage/root/
logger "Copied %pre section log to system"
break
fi
done &
curl "http://10.16.10.64/cblr/svc/op/trig/mode/pre/profile/rocky8.10-x86_64" -o /dev/null
%end
%packages
@^graphical-server-environment
@development
@legacy-unix
@rpm-development-tools
@system-tools
kexec-tools
#gdm
#gnome-terminal
net-tools
vim
unzip
wget
git
tree
curl
%end
%post --nochroot
set -x -v
exec 1>/mnt/sysimage/root/ks-post-nochroot.log 2>&1
%end
%post
set -x -v
exec 1>/root/ks-post.log 2>&1
# Start yum configuration
curl "http://10.16.10.64/cblr/svc/op/yum/profile/rocky8.10-x86_64" --output /etc/yum.repos.d/cobbler-config.repo
# Start koan environment setup
echo "export COBBLER_SERVER=10.16.10.64" > /etc/profile.d/cobbler.sh
echo "setenv COBBLER_SERVER 10.16.10.64" > /etc/profile.d/cobbler.csh
# Start final steps
curl "http://10.16.10.64/cblr/svc/op/ks/profile/rocky8.10-x86_64" -o /root/cobbler.ks
curl "http://10.16.10.64/cblr/svc/op/trig/mode/post/profile/rocky8.10-x86_64" -o /dev/null
# End final steps
systemctl set-default graphical.target
%end