Howto Kickstart Fedora with luks Encrypted Partitions

When I did a fresh Kickstart install of Fedora 21 (F21) via PXE on my main laptop I bumped into an issue where the Kickstart installation would fail because Anaconda would not properly setup the luks encrypted partition. Here are the steps to make it work.

1) the Kickstart file

The idea is to create the required partitions in the %pre section of the Kickstart file and then let Anaconda use those partitions in the main section of the Kickstart file. This means that you can not use clearpart in the main section as that would wipe all partitions. During execution of the %pre section the partitioning instructions are created and inserted into the main section of the Kickstart file via an %include.

Note that this is a minimalist example and requires more work in environments with different hardware configurations.

The example below assumes 3 partitions: one boot “/boot” partition, one root “/” partition and one user “/home/patrick” partition. Adding a GPT biosboot partition and/or swap partition should be easy.

The %pre section in the Kickstart file:

The main section of the Kickstart file:

In this section (usually at the top of the Kickstart file) the partitions are defined.

And that’s all that’s required to get your F21 install with a luks encrypted partition successfully kickstarted.

Leave a Reply

Your email address will not be published. Required fields are marked *