How to encrypt boot partition in CentOS 7 kickstart?

Vishnu asked:

I have a kickstart file for CentOS 7 Minimal. I would like to add encryption only to my /boot partition. but when I added the following line in the kickstart file, the complete installation fails. The kickstart encrypt line is

part /boot --encrypted --passphrase=pass1 --fstype="ext4" --size=500

without the --encrypted --passphrase=pass1 option, kickstart run the installation properly.

when I tried installing graphically, I saw the following message when I choose encrypt option for boot partition,

enter image description here

Please suggest, how can I add encryption only for my boot partition.

My answer:

You don’t encrypt the /boot partition. This partition is what boots and decrypts the rest of the system.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.