Skip to content

Commit 541a3cf

Browse files
sburris0ericonr
authored andcommitted
guide/fde: reword/fix drive number/organize
* Added headers to break things up a bit * Fix drive number as per #533 * Slight rewording * Clarifications By ericonr: The note about GRUB not supporting LUKS2 was altered due to the release of Grub 2.06.
1 parent d074747 commit 541a3cf

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

src/installation/guides/fde.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Full Disk Encryption
22

3-
Your drive's block device and other information may be different, so make sure
4-
it is correct.
3+
**Warning**: Your drive's block device and other information may be different,
4+
so make sure it is correct.
55

6-
Boot the live image and login.
6+
## Partitioning
77

8-
Create a single physical partition on the disk using `cfdisk`, marking it
9-
bootable. For an MBR system, the partition layout should look like the
10-
following.
8+
Boot a live image and login.
9+
10+
Create a single physical partition on the disk using
11+
[cfdisk](https://man.voidlinux.org/cfdisk), marking it as bootable. For an MBR
12+
system, the partition layout should look like the following.
1113

1214
```
1315
# fdisk -l /dev/sda
@@ -41,9 +43,14 @@ Device Start End Sectors Size Type
4143
/dev/sda2 264192 100663262 100399071 47.9G Linux filesystem
4244
```
4345

44-
Configure the encrypted volume. `cryptsetup` defaults to LUKS2, yet GRUB
45-
currently only has support for LUKS1, so it is critical to force LUKS1. Keep in
46-
mind this will be `/dev/sda2` on EFI systems.
46+
## Encrypted volume configuration
47+
48+
[Cryptsetup](https://man.voidlinux.org/cryptsetup.8) defaults to LUKS2, yet
49+
GRUB releases before 2.06 only had support for LUKS1. Therefore, it might make
50+
sense to force LUKS1 if you wish to achieve better compatibility.
51+
52+
Keep in mind the encrypted volume will be `/dev/sda2` on EFI systems, since
53+
`/dev/sda1` is taken up by the EFI partition.
4754

4855
```
4956
# cryptsetup luksFormat --type luks1 /dev/sda1
@@ -57,7 +64,7 @@ Enter passphrase:
5764
Verify passphrase:
5865
```
5966

60-
Once the volume is created, it needs to be opened. Replace voidvm with an
67+
Once the volume is created, it needs to be opened. Replace `voidvm` with an
6168
appropriate name. Again, this will be `/dev/sda2` on EFI systems.
6269

6370
```
@@ -103,6 +110,8 @@ meta-data=/dev/voidvm/home isize=512 agcount=4, agsize=2359040 blks
103110
Setting up swapspace version 1, size = 2 GiB (2147479552 bytes)
104111
```
105112

113+
## System installation
114+
106115
Next, setup the chroot and install the base system.
107116

108117
```
@@ -160,6 +169,8 @@ When it's done, we can enter the `chroot` and finish up the configuration.
160169
# xbps-reconfigure -f glibc-locales
161170
```
162171

172+
### Filesystem configuration
173+
163174
The next step is editing `/etc/fstab`, which will depend on how you configured
164175
and named your filesystems. For this example, the file should look like this:
165176

@@ -177,6 +188,8 @@ UEFI systems will also have an entry for the EFI system partition.
177188
/dev/sda1 /boot/efi vfat defaults 0 0
178189
```
179190

191+
### GRUB configuration
192+
180193
Next, configure GRUB to be able to unlock the filesystem. Add the following line
181194
to `/etc/default/grub`:
182195

@@ -197,6 +210,8 @@ Edit the `GRUB_CMDLINE_LINUX_DEFAULT=` line in `/etc/default/grub` and add
197210
for the `sda1` device found in the output of the
198211
[blkid(8)](https://man.voidlinux.org/blkid.8) command above.
199212

213+
## LUKS key setup
214+
200215
And now to avoid having to enter the password twice on boot, a key will be
201216
configured to automatically unlock the encrypted volume on boot. First, generate
202217
a random key.
@@ -236,6 +251,8 @@ a new file at `/etc/dracut.conf.d/10-crypt.conf` with the following line:
236251
install_items+=" /boot/volume.key /etc/crypttab "
237252
```
238253

254+
## Complete system installation
255+
239256
Next, install the boot loader to the disk.
240257

241258
```

0 commit comments

Comments
 (0)