Fedora workstation used for Kickstart installation checks

Fedora Kickstart Guide: Validate the File and the Installed Host

Write a Fedora Kickstart file for Anaconda, validate its command syntax with ksvalidator, and test the installed machine's disk, SSH, SELinux, services, and reboot.

September 17, 2026

← Back to Blog

A Kickstart release gate has two halves. First, parse the file for the exact Fedora or RHEL target. Second, install and boot a disposable machine because script behavior, repositories, disks, and hardware sit outside the parser's proof.

Kickstart gives Anaconda the answers that would otherwise be collected interactively. The pykickstart project's command reference covers Fedora and Red Hat Enterprise Linux commands as well as %packages, %pre, %post, and error sections. A missing required command can cause Anaconda to prompt, which looks like a hang on a machine with no attached display.

Keep commands and script sections separate

text
cdrom
lang en_US.UTF-8
keyboard --xlayouts='us'
timezone UTC --utc
network --bootproto=dhcp --device=link --activate --hostname=edge-01

rootpw --lock
user --name=ops --groups=wheel --password='$6$REPLACE_WITH_SHA512_CRYPT' --iscrypted
sshkey --username=ops "ssh-ed25519 AAAA... operator@example"

firewall --enabled --service=ssh
selinux --enforcing
ignoredisk --only-use=vda
clearpart --all --initlabel --drives=vda
autopart --type=lvm
reboot

%packages
@^minimal-environment
openssh-server
curl
jq
%end

%post --erroronfail
systemctl enable sshd
%end

This example assumes full installation media through cdrom and one virtual disk named vda. Change both assumptions as a pair. For network installation, use the source command and repository URLs approved for the release. For physical machines, inspect stable paths under /dev/disk/by-id before using a selector with clearpart.

What Kickstart validation proves and missesksvalidator checks commands and removed options, while a real installation must prove repositories, disks, scripts, boot, and services.ksvalidator can checka VM install must checkcommand syntaxtarget-version optionsremoved directivessection structurerepository accessdisk identity%post behaviorSELinux and firewallsecond rebootstatic gate first, behavioral gate second
A parser reduces cheap mistakes. It does not simulate Anaconda, package repositories, or the installed kernel.

Validate against the intended version

Install pykickstart and run ksvalidatorbefore handing the file to Anaconda. Red Hat's current RHEL 10 guide uses a version-qualified command:

ksvalidator -v RHEL10 /path/to/kickstart.ks

The Red Hat Kickstart guide states the limit plainly: validation checks syntax and deprecated options, but it does not validate %pre, %post, or %packages behavior.

Release checks after Anaconda exits

  • Boot from the installed disk with the Kickstart source unavailable.
  • Connect through the intended SSH key and confirm the password policy.
  • Read getenforce and the active firewalld service rules.
  • Confirm the root volume and any ignored disks match the reviewed inventory.
  • Restart and prove sshd and the workload service return.

OpenFactory's useful role is the behavior loop around the machine: build, boot, inspect, and retain acceptance checks. Keep Kickstart when Anaconda is the right installer. Keep the release contract independent so a later move to an image builder does not discard the proof.

Frequently asked questions

What is a Fedora Kickstart file?

It is a text file that supplies Anaconda installer commands, package choices, and optional scripts so a Fedora or RHEL-family installation can run with little or no interaction.

What does ksvalidator check?

It checks Kickstart syntax and flags removed or deprecated options for a selected version. It cannot prove installation success and does not validate the behavior of package, pre, or post sections.

How should a Kickstart file select a disk?

Prefer an identifier tied to the reviewed hardware model, such as a stable by-id path where appropriate. Test the selector on each target class before pairing it with clearpart.

Ready to ship this in production?

OpenFactory's free flow is for browsing. Persistent VMs, SSH access, snapshots, your own ISO, and fleet deployment live on a paid plan.