Red Hat 8 Example Kickstart Configuration to Deploy to NVMe Drives

Here is a example kickstart file for when deploying to an NVMe drive using PXE. So far this works on Red Hat 8.3 to 8.5.

Example Configuration

#version=RHEL8
# Use graphical install
graphical

repo --name="AppStream" --baseurl=ftp://192.168.1.69/pub/rhel8.5/AppStream

%packages
@^workstation-product-environment
@development
@dotnet-core
@gnome-apps
@graphical-admin-tools
@internet-applications
@office-suite
@security-tools
kexec-tools

%end

# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'

# System language
lang en_US.UTF-8

# Network information
network  --bootproto=dhcp --hostname=localhost

# Use Network Installation
url --url="ftp://192.168.1.69/pub/rhel8.5/BaseOS"

# EULA
eula --agreed

# Run the Setup Agent on first boot
firstboot --disable

# Reboot after installation
reboot

ignoredisk --only-use=nvme0n1

# System bootloader configuration
bootloader --append="crashkernel=auto" --location=mbr --boot-drive=nvme0n1

# Initialize (format) all disks
zerombr

# Partition clearing information
clearpart --all --drives=nvme0n1 --initlabel

# Disk partitioning information for a 1TB drive
part /boot --fstype="xfs" --ondisk=nvme0n1 --size=1024 --fsoptions="nosuid,nodev"
part /boot/efi --fstype="efi" --ondisk=nvme0n1 --size=600 --fsoptions="umask=0077,shortname=winnt,nodev"
part swap --fstype="swap" --ondisk=nvme0n1 --size=15384
part pv.4675 --fstype="lvmpv" --ondisk=nvme0n1 --size=958753

#volume groups
volgroup rhel --pesize=4096 pv.4675
logvol / --fstype="xfs" --size=614400 --name=root --vgname=rhel
logvol /home --fstype="xfs" --size=204800 --name=home --vgname=rhel --fsoptions="nosuid,nodev"
logvol /tmp --fstype="xfs" --size=6427 --name=tmp --vgname=rhel --fsoptions="noexec,nosuid,nodev"
logvol /var --fstype="xfs" --size=62400 --name=var --vgname=rhel --fsoptions="nosuid,nodev"
logvol /var/tmp --fstype="xfs" --size=20000 --name=var_tmp --vgname=rhel --fsoptions="noexec,nosuid,nodev"
logvol /var/log --fstype="xfs" --size=20000 --name=var_log --vgname=rhel --fsoptions="noexec,nosuid,nodev"
logvol /var/log/audit --fstype="xfs" --size=20482 --name=var_log_audit --vgname=rhel --fsoptions="noexec,nosuid,nodev"

# System timezone
timezone America/Chicago --isUtc --nontp

# Root password
rootpw --iscrypted $(*&(^(HKNklsjkfh979ujklahsndofuao(&(*&()*@)kajdlfjl2@*^#(&skjciusz.
user --name=spx --password=$987(#*&Y(HAKSH(*#Yjbnskuy982y3iB(@#&924429&*(113421z*(&^. --iscrypted --gecos="spx"

%addon com_redhat_kdump --enable --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

#Post script section
%post --log=/root/ks-post.log
%end

Conclusion

There really is not much to add here. This is just an example that I use in my air-gapped testing environment. Feel free to ask me anything but please be aware that I am far from a Linux expert.