# Use CDROM installation media repo --name="AppStream" --baseurl="http://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/" cdrom # Use text install text # Don't run the Setup Agent on first boot firstboot --disabled eula --agreed # Keyboard layouts keyboard --vckeymap=us --xlayouts='us' # System language lang en_US.UTF-8 # Network information network --bootproto=dhcp --onboot=on --ipv6=auto --activate --hostname=capv.vm # Lock Root account rootpw --lock # Create builder user user --name=builder --groups=wheel --password=builder --plaintext --shell=/bin/bash # System services selinux --permissive firewall --disabled services --enabled="NetworkManager,sshd,chronyd" # System timezone timezone UTC # System booloader configuration bootloader --location=mbr --boot-drive=sda zerombr clearpart --all --initlabel --drives=sda part / --fstype="ext4" --grow --asprimary --label=slash --ondisk=sda skipx %packages --ignoremissing --excludedocs openssh-server open-vm-tools sudo sed python3 # unnecessary firmware -aic94xx-firmware -atmel-firmware -b43-openfwwf -bfa-firmware -ipw2100-firmware -ipw2200-firmware -ivtv-firmware -iwl*-firmware -libertas-usb8388-firmware -ql*-firmware -rt61pci-firmware -rt73usb-firmware -xorg-x11-drv-ati-firmware -zd1211-firmware -cockpit -quota -alsa-* -fprintd-pam -intltool -microcode_ctl %end %addon com_redhat_kdump --disable %end reboot %post echo 'builder ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/builder chmod 440 /etc/sudoers.d/builder # Remove the package cache yum -y clean all swapoff -a rm -f /swapfile sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab systemctl enable vmtoolsd systemctl start vmtoolsd # Ensure on next boot that network devices get assigned unique IDs. sed -i '/^\(HWADDR\|UUID\)=/d' /etc/sysconfig/network-scripts/ifcfg-* %end