Linux – Exactly how does kickstart encrypt a partition

centosencryptionlinuxluksredhat

Let's say for example I have this line in the pre section of my kickstart file:

part / --asprimary --fstype="ext4" --size=10000 --encrypted --passphrase=pass1

Great, but, how does that work? Exactly how does "–encrypted" encrypt the partition? Does it use: cryptsetup luksFormat ...?

A quick google search can tell me how to use cryptsetup, but a quick google search does not tell me exactly what the "–encryption" flag does. I need to reproduce what it does on a non-encrypted partition in the same exact fashion.

Best Answer

It uses LUKS, the options you can supply are documented, EL6 and 7 are the same

  • --cipher=
  • --passphrase=
  • --escrowcert=URL_of_X.509_certificate
  • --escrowcert=URL_of_X.509_certificate

It doesn't appear that you can supply arbitrary cryptsetup luksFormat ... options.