mrc0mmand / centos / kickstarts

Forked from centos/kickstarts 2 years ago
Clone

Blame CentOS-8-Stream-Container.ks

Brian Stinson b8477d
# This is a minimal CentOS kickstart designed for docker.
Brian Stinson b8477d
# It will not produce a bootable system
Brian Stinson b8477d
# To use this kickstart, run the following command
Brian Stinson b8477d
# livemedia-creator --make-tar \
Brian Stinson b8477d
#   --iso=/path/to/boot.iso  \
Brian Stinson b8477d
#   --ks=centos-8.ks \
Brian Stinson b8477d
#   --image-name=centos-root.tar.xz
Brian Stinson b8477d
#
Brian Stinson b8477d
Brian Stinson b8477d
# Basic setup information
Brian Stinson b8477d
text
Brian Stinson b8477d
keyboard us
Brian Stinson b8477d
rootpw --lock --iscrypted locked
Brian Stinson b8477d
timezone --isUtc --nontp UTC
Brian Stinson b8477d
selinux --enforcing
Brian Stinson b8477d
firewall --disabled
Brian Stinson d77143
ignoredisk --only-use=vda
Brian Stinson b8477d
network --bootproto=dhcp --device=link --activate --onboot=on
Brian Stinson b8477d
shutdown
Brian Stinson b8477d
bootloader --disable
Brian Stinson b8477d
lang en_US.UTF-8
Brian Stinson b8477d
Brian Stinson b8477d
Brian Stinson b8477d
# Disk setup
Brian Stinson b8477d
zerombr
Brian Stinson b8477d
clearpart --all --initlabel
Brian Stinson d77143
part / --fstype="ext4" --ondisk=vda --size=8000
Brian Stinson b8477d
Brian Stinson b8477d
# Package setup
Brian Stinson b8477d
%packages --excludedocs --instLangs=en --nocore --excludeWeakdeps
Brian Stinson b8477d
centos-release
Brian Stinson b8477d
binutils
Brian Stinson b8477d
-brotli
Brian Stinson b8477d
bash
Brian Stinson b8477d
hostname
Brian Stinson b8477d
rootfiles
Brian Stinson b8477d
coreutils-single
Brian Stinson b8477d
glibc-minimal-langpack
Brian Stinson b8477d
vim-minimal
Brian Stinson b8477d
less
Brian Stinson b8477d
-gettext*
Brian Stinson b8477d
-firewalld
Brian Stinson b8477d
-os-prober*
Brian Stinson b8477d
tar
Brian Stinson b8477d
-iptables
Brian Stinson b8477d
iputils
Brian Stinson b8477d
-kernel
Brian Stinson b8477d
-dosfstools
Brian Stinson b8477d
-e2fsprogs
Brian Stinson b8477d
-fuse-libs
Brian Stinson b8477d
-gnupg2-smime
Brian Stinson b8477d
-libss
Brian Stinson b8477d
-pinentry
Brian Stinson b8477d
-shared-mime-info
Brian Stinson b8477d
-trousers
Brian Stinson b8477d
-xkeyboard-config
Brian Stinson b8477d
-xfsprogs
Brian Stinson b8477d
-qemu-guest-agent
Brian Stinson b8477d
yum
Brian Stinson b8477d
-grub\*
Brian Stinson b8477d
Brian Stinson b8477d
%end
Brian Stinson b8477d
Brian Stinson b8477d
%post --erroronfail --log=/root/anaconda-post.log
Brian Stinson b8477d
# container customizations inside the chroot
Brian Stinson b8477d
Brian Stinson b8477d
echo 'container' > /etc/dnf/vars/infra
Brian Stinson b8477d
Brian Stinson b8477d
#Generate installtime file record
Brian Stinson b8477d
/bin/date +%Y%m%d_%H%M > /etc/BUILDTIME
Brian Stinson b8477d
Brian Stinson b8477d
# Limit languages to help reduce size.
Brian Stinson b8477d
LANG="en_US"
Brian Stinson b8477d
echo "%_install_langs $LANG" > /etc/rpm/macros.image-language-conf
Brian Stinson b8477d
Brian Stinson b8477d
Brian Stinson b8477d
# systemd fixes
Brian Stinson b8477d
:> /etc/machine-id
Brian Stinson b8477d
umount /run
Brian Stinson b8477d
systemd-tmpfiles --create --boot
Brian Stinson b8477d
# mask mounts and login bits
Brian Stinson b8477d
systemctl mask systemd-logind.service getty.target console-getty.service sys-fs-fuse-connections.mount systemd-remount-fs.service dev-hugepages.mount
Brian Stinson b8477d
Brian Stinson b8477d
# Remove things we don't need
Brian Stinson b8477d
rm -f /etc/udev/hwdb.bin
Brian Stinson b8477d
rm -rf /usr/lib/udev/hwdb.d/
Brian Stinson b8477d
rm -rf /boot
Brian Stinson b8477d
rm -rf /var/lib/dnf/history.*
Brian Stinson b8477d
Brian Stinson b8477d
Brian Stinson b8477d
%end
Brian Stinson b8477d
Brian Stinson b8477d