# This is a minimal CentOS kickstart designed for and ISO. # To use this kickstart, run the following command # # README: Todo put in how to make this. #version=RHEL8 # License Agreement eula --agreed # Keyboard keyboard --vckeymap=us --xlayouts='us' # System language lang en_US.UTF-8 # System timezone (No NTP since maybe no network) timezone --isUtc --nontp Etc/UTC --nontp # System authorization information auth --enableshadow --passalgo=sha512 # Root password rootpw --lock --iscrypted locked # Selinux Policy selinux --enforcing # System Firewall firewall --enabled --service=mdns # Service Setup services --enabled=sshd,NetworkManager # Repositories get injected by pungi. This is for if you are trying to do this yourself # url --url=http://mirror.centos.org/centos-8/8/BaseOS/x86_64/kickstart/ # repo --name="AppStream" --baseurl=http://mirror.centos.org/centos-8/8/AppStream/x86_64/kickstart/ # repo --name="PowerTools" --baseurl=http://mirror.centos.org/centos-8/8/PowerTools/x86_64/kickstart/ # Disk layout zerombr clearpart --all --initlabel --disklabel=msdos # Disk partitioning information part / --fstype="ext4" --size=1700 part swap --size=512 # Set up bootloader bootloader --timeout=10 --location=mbr # Network Layout network --bootproto=dhcp --device=link --activate # Setup firstboot firstboot --reconfig # Shutodown versus reboot on install shutdown %packages @^minimal-environment # Below is taken from RHEL-minimal ks in lorax. kernel # Make sure that DNF doesn't pull in debug kernel to satisfy kmod() # requires dracut needs these included kernel-modules kernel-modules-extra glibc-minimal-langpack # Needed for live image dracut-live dracut-network anaconda-tui centos-logos dbxtool.x86_64 dosfstools.x86_64 efi-filesystem.noarch efibootmgr.x86_64 efivar-libs.x86_64 efivar.x86_64 grub2 grub2-efi grub2-efi-x64.x86_64 memtest86+ mokutil.x86_64 shim shim-x64.x86_64 syslinux tar tmux -glibc-langpack-en %end %post # enable tmpfs for /tmp systemctl enable tmp.mount # make it so that we don't do writing to the overlay for things which # are just tmpdirs/caches # note https://bugzilla.redhat.com/show_bug.cgi?id=1135475 cat >> /etc/fstab << EOF vartmp /var/tmp tmpfs defaults 0 0 EOF rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial echo "Packages within this disk image" rpm -qa | tee /root/RPM-LIST # Note that running rpm recreates the rpm db files which aren't needed or wanted rm -f /var/lib/rpm/__db* # remove random seed, the newly installed instance should make it's own rm -f /var/lib/systemd/random-seed # Remove machine-id on pre generated images rm -f /etc/machine-id touch /etc/machine-id # go ahead and pre-make the man -k cache (#455968) /usr/bin/mandb # make sure there aren't core files lying around rm -f /core* # Remove the rescue kernel and image to save space # Installation will recreate these on the target rm -f /boot/*-rescue* # setup systemd to boot to the right runlevel echo -n "Setting default runlevel to anaconda text mode" rm -f /etc/systemd/system/default.target ln -s /lib/systemd/system/anaconda.target /etc/systemd/system/default.target echo . %end %addon com_redhat_kdump --disable --reserve-mb='auto' %end %anaconda pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty %end