# This is a minimal CentOS kickstart designed for and ISO.
# To use this kickstart, run the following command
#
# README: Todo put in how to make this.
#version=RHEL8
install
text
# License Agreement
eula --agreed
# Keyboard
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# System timezone (No NTP since maybe no network)
timezone --isUtc --nontp Etc/UTC --nontp
# System authorization information
auth --enableshadow --passalgo=sha512
# Root password
rootpw --lock --iscrypted locked
# Selinux Policy
selinux --enforcing
# System Firewall
firewall --enabled --service=mdns
# Service Setup
services --enabled=sshd,NetworkManager,chronyd,initial-setup
# Repositories
repo --name="BaseOS" --baseurl=http://mirror.centos.org/centos-8/8/BaseOS/x86_64/kickstart/
repo --name="AppStream" --baseurl=http://mirror.centos.org/centos-8/8/AppStream/x86_64/kickstart/
repo --name="PowerTools" --baseurl=http://mirror.centos.org/centos-8/8/PowerTools/x86_64/kickstart/
# Disk layout
zerombr
clearpart --all --initlabel --disklabel=msdos
autopart
bootloader --timeout=10
# Network Layout
network --bootproto=dhcp --device=link --activate
# Setup firstboot
firstboot --reconfig
# Shutodown versus reboot on install
shutdown
%packages
@core
%end
%post
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
echo "Packages within this disk image"
rpm -qa | tee /root/RPM-LIST
# Note that running rpm recreates the rpm db files which aren't needed or wanted
rm -f /var/lib/rpm/__db*
# remove random seed, the newly installed instance should make it's own
rm -f /var/lib/systemd/random-seed
# The enp1s0 interface is a left over from the imagefactory install, clean this up
rm -f /etc/sysconfig/network-scripts/ifcfg-enp1s0
dnf -y remove dracut-config-generic
# Remove machine-id on pre generated images
rm -f /etc/machine-id
touch /etc/machine-id
# setup systemd to boot to the right runlevel
echo -n "Setting default runlevel to multiuser text mode"
rm -f /etc/systemd/system/default.target
ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
echo .
%end