ladar / centos / kickstarts

Forked from centos/kickstarts 5 years ago
Clone

Blame CentOS-8-Container.ks

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