# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/performing_an_advanced_rhel_installation/kickstart-commands-and-options-reference_installing-rhel-as-an-experienced-user #cdrom # License agreement eula --agreed # Use network installation #url --url="https://mirror.rackspace.com/centos-stream/9-stream/BaseOS/x86_64/os/" #repo --name="AppStream" --baseurl=http://mirror.rackspace.com/centos-stream/9-stream/BaseOS/x86_64/os/../../../AppStream/x86_64/os/ # Use text mode install text # Disable Initial Setup on first boot firstboot --disable # Keyboard layout keyboard --vckeymap=us --xlayouts='us' # System language lang en_US.UTF-8 # Network information network --bootproto=dhcp --device=link --activate network --hostname=fedora.localdomain # Root password rootpw $5$CXpezfLKTajPP7yI$VM8STd3QaHBTKMe2DLTmK5p.lEGbUYYZV8jGG3nxX2/ --iscrypted # SELinux configuration selinux --enforcing # Do not configure the X Window System skipx # System timezone timezone US/Chicago --utc # Add a user named packer user --groups=wheel --name=wed --password=$5$UOpZHG55fWCHlNSp$nFnpaVLb9enbQTebHo4SKBqolGr39SMYo2ZshHCe2d3 --iscrypted --gecos="wed" # System bootloader configuration bootloader --location=mbr --append="crashkernel=auto" # Clear the Master Boot Record zerombr # Remove partitions clearpart --all --initlabel # Automatically create partitions using LVM autopart --type=lvm # Reboot after successful installation reboot %packages --ignoremissing # dnf group info minimal-environment @^minimal-environment # Exclude unnecessary firmwares -iwl*firmware %end %post --nochroot --logfile=/mnt/sysimage/root/ks-post.log # Disable quiet boot and splash screen sed --follow-symlinks -i "s/ rhgb quiet//" /mnt/sysimage/etc/default/grub sed --follow-symlinks -i "s/ rhgb quiet//" /mnt/sysimage/boot/grub2/grubenv # Passwordless sudo for the user 'wed' echo "wed ALL=(ALL) NOPASSWD: ALL" >> /mnt/sysimage/etc/sudoers.d/wed %end