Need asistance with a Kickstart file

I’m looking to setup a kickstart file with systemd-boot since i do not use grub. I was using chatgpt to go through the file but it keeps saying that I need several extra configurations to allow for my bootloader of choice.

#version=Fedora

# Use graphical install
graphical

# Keyboard layouts
keyboard --xlayouts='us'

# System language
lang en_US.UTF-8

# Network information
network --bootproto=dhcp --device=eth0 --onboot=on --activate

# Root password
rootpw --iscrypted <encrypted-password>

# Timezone
timezone America/New_York --isUtc

# Disk partitioning information
ignoredisk --only-use=sda
autopart --type=lvm
part /boot --fstype="xfs" --size=1024
part pv.01 --size=1 --grow --encrypted --passphrase=<your-luks-passphrase>
volgroup vg_system pv.01
logvol /  --fstype="xfs" --size=20480 --name=lv_root --vgname=vg_system
logvol /home  --fstype="xfs" --size=10240 --name=lv_home --vgname=vg_system

# Use graphical interface
graphical

# SELinux configuration
selinux --enforcing

# Firewall configuration
firewall --enabled

# Do not configure the X Window System
skipx

# System services
services --enabled=NetworkManager,sshd

# Set up bootloader
# Note: This sets up GRUB, additional steps required for systemd-boot
bootloader --location=mbr --boot-drive=sda

# Reboot after installation
reboot

%packages
@core

%end

%post
# Note: Add custom commands for systemd-boot setup here
%end

Any experts on kickstart scripts want to have a look and offer tips? I also asked Bard to see it’s reply. . .

See the bootloader documention of kickstart here.

This is a ks.cfg I’ve used for a simple desktop running weston that uses sdboot. It is for a vm (for testing) and a laptop with intel igp and wifi and a single storage device. Hopefully it can serve as a decent example for you to follow.

#version=F39
# Use text mode install
text
# License agreement
eula --agreed
# Shutdown after installation
shutdown

%pre
#!/bin/bash
set -x

cat<<'EOF'>>/etc/dnf/dnf.conf
group_package_types=mandatory
install_weak_deps=False
deltarpm=False
ip_resolve=4
excludepkgs=xorg-x11-*
EOF
%end

%post --interpreter=/bin/bash
#!/bin/bash
set -x

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-39-x86_64
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-39
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-39

cat<<'EOF'>>/etc/dnf/dnf.conf
group_package_types=mandatory
install_weak_deps=False
deltarpm=False
ip_resolve=4
excludepkgs=xorg-x11-*
EOF

install -o root -g root -m 0755 -d /etc/systemd/resolved.conf.d
install -o root -g root -m 0644 /dev/null /etc/systemd/resolved.conf.d/00-disable-llmnr.conf
cat<<'EOF'>/etc/systemd/resolved.conf.d/00-disable-llmnr.conf
[Resolve]
LLMNR=no
EOF

install -o root -g root -m 0644 /dev/null /etc/systemd/network/50-wired.network
cat<<'EOF'>/etc/systemd/network/50-wired.network
[Match]
Type=ether

[Network]
DHCP=yes
EOF

# Ansible user can sudo anything
install -o root -g root -m 0660 /dev/null /etc/sudoers.d/ansible
printf 'ansible\tALL=(ALL)\tNOPASSWD: ALL\n' > /etc/sudoers.d/ansible
%end

# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US

# Firewall configuration
firewall --enabled --service=ssh --remove-service=mdns,cockpit
# Network information
network  --bootproto=dhcp --device=link --hostname=freshinstall --activate

repo --name="updates"  --metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch&country=us
repo --name="updates-testing"  --metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f$releasever&arch=$basearch&country=us
repo --name="fedora-cisco-openh264"  --metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-$releasever&arch=$basearch
repo --name="rpmfusion-free"  --metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-$releasever&arch=$basearch
repo --name="rpmfusion-free-updates"  --metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-updates-released-$releasever&arch=$basearch
repo --name="rpmfusion-free-updates-testing"  --metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-updates-testing-$releasever&arch=$basearch
repo --name="rpmfusion-nonfree"  --metalink=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-$releasever&arch=$basearch
repo --name="rpmfusion-nonfree-updates"  --metalink=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-updates-released-$releasever&arch=$basearch
repo --name="rpmfusion-nonfree-updates-testing"  --metalink=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-updates-testing-$releasever&arch=$basearch

# Use network installation
url --metalink="https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch&country=us"

%packages --inst-langs=en_US --exclude-weakdeps
@core
   #mandatory
  -yum
   #default
   systemd-resolved
   #optional
   #conditional
#@standard
   #mandatory
   #conditional
#@hardware-support
   #default
   #optional
   #conditional
#@server-product
   #mandatory
   #default
#@headless-management
   #mandatory
   #default
   #optional
#@networkmanager-submodules
   #default
#@container-management
#@domain-client
   #mandatory
   #default
#@guest-agents
   #mandatory
#@server-hardware-support
   #default
   #optional
#NetworkManager
-dracut-config-rescue
generic-logos
google-noto-sans-mono-vf-fonts
intel-gpu-firmware
intel-media-driver
#intel-mediasdk
#microcode_ctl - handled by host?
openssh-server
#plymouth-theme-spinner
#policycoreutils-dbus
polkit
spice-vdagent
#sqlite
systemd-networkd
weston
weston-demo
%end

# System authorization information
authselect sssd
# SELinux configuration
selinux --enforcing

# System services
services --disabled="mdns,dnf-makecache.timer" --enabled="systemd-networkd"
# Do not configure the X Window System
skipx

bootloader --sdboot
# uefi vm partitioning
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel --disklabel=gpt
# Disk partitioning information
part /boot/efi --fstype="efi" --size=1024
part /boot --fstype="ext4" --size=256 --label="BOOT"
part / --fstype="xfs" --size=4096 --label="ROOT"

timesource --ntp-server=time.cloudflare.com --nts
timesource --ntp-server=virginia.time.system76.com --nts
timesource --ntp-server=ohio.time.system76.com --nts
timesource --ntp-server=oregon.time.system76.com --nts
# System timezone
timezone Etc/UTC --utc

#Root password
rootpw --lock
# regular user
user --name=regular --iscrypted --password "INSERT_ENCRYPTED_PASSWORD_HERE"
# ansible user
sshkey --username=heather "ssh-ed25519 INSERT_KEY_HERE ansible"
user --name=ansible --uid=9999 --lock --gid=9999