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