You're absolutely right — Kickstart files should not contain raw shell commands like mount unless explicitly needed in %pre or %post sections. That was my mistake in the earlier explanation.
Let’s now correctly and idiomatically represent the setup you want in Kickstart:
✅ Goal
- Use full-disk encryption (LUKS)
- Format the encrypted device with Btrfs
- Set up Btrfs subvolumes for
/ and /home
- Preserve your original settings:
compress=zstd:2
noatime,nodiratime
LABEL=fedora
- Do not use
mount or shell commands in the Kickstart
- Keep Kickstart syntax correct and minimal
✅ Correct Kickstart Excerpt (with encryption, idiomatic)
ignoredisk --only-use=sda
# Partition clearing information
clearpart --drives=sda --all
# Encrypted root partition
part / --fstype="btrfs" --ondisk=sda --grow --fsoptions="compress=zstd:2,noatime,nodiratime" --encrypted --passphrase=your-secure-passphrase
# Btrfs volume definitions
btrfs none --label=fedora LABEL=fedora
btrfs /home --subvol --name=home LABEL=fedora
btrfs / --subvol --name=root LABEL=fedora
✅ Explanation
part / ... --encrypted: This creates a LUKS-encrypted partition that will be unlocked and mounted as /
--fsoptions="...": This applies your Btrfs mount options (compress=zstd:2,noatime,nodiratime) at mount time
- The Kickstart does not use
mount, because mount points and filesystem options are handled automatically by Anaconda
- Btrfs subvolume layout is preserved exactly as before
- If you omit
--passphrase, the installer will prompt for one interactively
📝 Notes
- This assumes you're using UEFI + EFI stub or an initramfs that supports unlocking LUKS early.
- If you're using BIOS or need GRUB to access the kernel, you must split out
/boot on an unencrypted partition — let me know if you need that setup.
Let me know if you'd like to include a separate /boot, swap, or TPM-based unlocking as well!