@@ -156,26 +156,6 @@ UEFI systems will also have an entry for the EFI system partition.
156156/dev/sda1 /boot/efi vfat defaults 0 0
157157```
158158
159- Next, configure GRUB to be able to unlock the filesystem. Add the following line
160- to ` /etc/default/grub ` :
161-
162- ```
163- GRUB_ENABLE_CRYPTODISK=y
164- ```
165-
166- Next, the kernel needs to be configured to find the encrypted device. First,
167- find the UUID of the device.
168-
169- ```
170- # blkid -o value -s UUID /dev/sda1
171- 135f3c06-26a0-437f-a05e-287b036440a4
172- ```
173-
174- Edit the ` GRUB_CMDLINE_LINUX_DEFAULT= ` line in ` /etc/default/grub ` and add
175- ` rd.lvm.vg=voidvm rd.luks.uuid=<UUID> ` to it. Make sure the UUID matches the one
176- for the ` sda1 ` device found in the output of the
177- [ blkid(8)] ( https://man.voidlinux.org/blkid.8 ) command above.
178-
179159And now to avoid having to enter the password twice on boot, a key will be
180160configured to automatically unlock the encrypted volume on boot. First, generate
181161a random key.
@@ -215,12 +195,35 @@ a new file at `/etc/dracut.conf.d/10-crypt.conf` with the following line:
215195install_items+=" /boot/volume.key /etc/crypttab "
216196```
217197
218- Next, install the boot loader to the disk.
198+ Next, install the bootloader, see the instructions on [ Installing
199+ GRUB] ( chroot.md#installing-grub ) to install the correct GRUB package for your
200+ system, but do not install it on the disk just yet (with ` grub-install ` ) as we
201+ will need to modify it's configuration before doing so.
202+
203+ After installing the correct GRUB package, configure GRUB to be able to unlock
204+ the filesystem. Add the following line to ` /etc/default/grub ` :
219205
220206```
221- # grub-install /dev/sda
207+ GRUB_ENABLE_CRYPTODISK=y
222208```
223209
210+ Next, the kernel needs to be configured to find the encrypted device. First,
211+ find the UUID of the device.
212+
213+ ```
214+ # blkid -o value -s UUID /dev/sda1
215+ 135f3c06-26a0-437f-a05e-287b036440a4
216+ ```
217+
218+ Edit the ` GRUB_CMDLINE_LINUX_DEFAULT= ` line in ` /etc/default/grub ` and add
219+ ` rd.lvm.vg=voidvm rd.luks.uuid=<UUID> ` to it. Make sure the UUID matches the one
220+ for the ` sda1 ` device found in the output of the
221+ [ blkid(8)] ( https://man.voidlinux.org/blkid.8 ) command above.
222+
223+ Next, install the bootloader onto the disk using the correct ` grub-install `
224+ command for your system, as explained in the [ "Installing
225+ GRUB"] ( chroot.md#installing-grub ) section.
226+
224227Ensure an initramfs is generated:
225228
226229```
0 commit comments