@@ -156,26 +156,6 @@ UEFI systems will also have an entry for the EFI system partition.
156
156
/dev/sda1 /boot/efi vfat defaults 0 0
157
157
```
158
158
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
-
179
159
And now to avoid having to enter the password twice on boot, a key will be
180
160
configured to automatically unlock the encrypted volume on boot. First, generate
181
161
a random key.
@@ -215,12 +195,35 @@ a new file at `/etc/dracut.conf.d/10-crypt.conf` with the following line:
215
195
install_items+=" /boot/volume.key /etc/crypttab "
216
196
```
217
197
218
- Next, install the boot loader to the disk.
198
+ Now we will configure our 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 ` :
219
205
220
206
```
221
- # grub-install /dev/sda
207
+ GRUB_ENABLE_CRYPTODISK=y
222
208
```
223
209
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 stated on [ Installing
225
+ GRUB] ( chroot.md#installing-grub ) .
226
+
224
227
Ensure an initramfs is generated:
225
228
226
229
```
0 commit comments