Btrfs/Encrypted Btrfs System Root Guide

This article discusses several aspects of using Dm-crypt for full disk encryption with Btrfs for daily usage.

Disk preparation
This example will use GPT as disk partition schema and grub(or rEFInd) as boot loader.

Create partitions
To create GRUB BIOS, issue the following command:

Set the default units to mebibytes:

Create a GPT partition table:

Create the BIOS partition:

Create boot partition:

Create root partition:

Exit from parted:

Create boot filesystem
Create filesystem for /dev/sdX2.This partition is read by UEFI bios. Most of motherboards can ready only FAT32 filesystems:

Prepare encrypted partition
In the next step, configure dm-crypt for /dev/sdX3:

Open encrypted device and create btrfs filesystem: