2021-05-04 13:45:15 +00:00
|
|
|
# This is a minimal Rocky kickstart designed for docker.
|
|
|
|
# It will not produce a bootable system
|
2021-10-27 19:30:06 +00:00
|
|
|
# To use this kickstart, run make
|
2021-05-04 13:45:15 +00:00
|
|
|
|
|
|
|
# Basic setup information
|
2022-11-19 17:30:36 +00:00
|
|
|
url --url https://download.rockylinux.org/stg/rocky/9/BaseOS/$basearch/os/
|
2021-10-20 19:16:27 +00:00
|
|
|
|
2022-07-04 21:28:40 +00:00
|
|
|
text
|
2021-10-20 19:16:27 +00:00
|
|
|
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
|
2021-10-26 23:55:24 +00:00
|
|
|
selinux --disabled
|
2021-05-04 13:45:15 +00:00
|
|
|
shutdown
|
|
|
|
|
2021-10-20 19:16:27 +00:00
|
|
|
keyboard us
|
|
|
|
lang en_US.UTF-8
|
2022-07-05 00:21:35 +00:00
|
|
|
timezone --utc --nontp UTC
|
2021-05-04 13:45:15 +00:00
|
|
|
|
|
|
|
# Disk setup
|
|
|
|
zerombr
|
|
|
|
clearpart --all --initlabel
|
|
|
|
autopart --noboot --nohome --noswap --nolvm --fstype=ext4
|
|
|
|
|
2022-11-19 19:07:58 +00:00
|
|
|
# This breaks everything, apparently
|
|
|
|
%addon com_redhat_kdump --disable
|
|
|
|
%end
|
|
|
|
|
2021-05-04 13:45:15 +00:00
|
|
|
# Package setup
|
2022-11-19 17:49:30 +00:00
|
|
|
%packages --excludedocs --inst-langs=en --nocore --exclude-weakdeps
|
2021-05-04 13:45:15 +00:00
|
|
|
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
|
2021-10-26 23:55:24 +00:00
|
|
|
-kexec-tools
|
2021-05-04 13:45:15 +00:00
|
|
|
-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-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
|
|
|
|
|
2021-10-27 19:30:06 +00:00
|
|
|
# Stay compatible
|
2021-05-04 13:45:15 +00:00
|
|
|
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
|
|
|
|
|
2021-10-27 19:30:06 +00:00
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1727489
|
|
|
|
echo 'LANG="C.UTF-8"' > /etc/locale.conf
|
2021-05-04 13:45:15 +00:00
|
|
|
|
|
|
|
# systemd fixes
|
|
|
|
:> /etc/machine-id
|
|
|
|
umount /run
|
|
|
|
systemd-tmpfiles --create --boot
|
|
|
|
|
2021-10-27 19:30:06 +00:00
|
|
|
# mask mounts and login bits
|
|
|
|
systemctl mask \
|
|
|
|
console-getty.service \
|
2021-10-27 21:26:14 +00:00
|
|
|
dev-hugepages.mount \
|
2021-10-27 19:30:06 +00:00
|
|
|
getty.target \
|
|
|
|
sys-fs-fuse-connections.mount \
|
|
|
|
systemd-logind.service \
|
|
|
|
systemd-remount-fs.service
|
|
|
|
|
|
|
|
# Cleanup the image
|
2021-05-04 13:45:15 +00:00
|
|
|
rm -f /etc/udev/hwdb.bin
|
2021-10-27 19:30:06 +00:00
|
|
|
rm -rf /usr/lib/udev/hwdb.d/ \
|
|
|
|
/boot /var/lib/dnf/history.* \
|
2022-07-04 21:41:15 +00:00
|
|
|
"/tmp/*" "/tmp/.*" || true
|
|
|
|
|
2021-05-04 13:45:15 +00:00
|
|
|
|
|
|
|
%end
|