Preparing Fedora 26 laptop with ZFS and encryption — encryption (part 3)

Andrzej Rehmann
2 min readAug 3, 2017
tput setaf 2; xxd -c 48 ~/Pictures/cat.png

In this part of the series we will encrypt the two out of four partitions we created in the previous episode. For encryption we will use cryptsetup .

We want to encrypt partitions for our binaries /dev/sda3 and for our home /dev/sda4 . You can see the encrypted parts in yellow here:

Encrypted parts are in yellow.

Let’s encrypt both partitions, you can use same password for both of them.

  • cryptsetup luksFormat /dev/sda3
  • cryptsetup luksFormat /dev/sda4
Encrypting the /dev/sda3 where binaries will be stored.
Encrypting the /dev/sda4 where our home will reside.

Check if both partitions were encrypted:

  • cryptsetup -v isLuks /dev/sda3
  • cryptsetup -v isLuks /dev/sda4
Both partitions were encrypted successfully.

That’s all for this episode. We will setup automatic decryption of both partition after we install fedora in part 4. It’s easier that way, as we need to persist crypt key somewhere.

Special thanks to Marcin Skarbek for setting up my laptop and explaining all of this stuff to me with excruciating details.

--

--