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