Skip to content

Commit 9de2dbf

Browse files
committed
Add hardened boot param
Signed-off-by: Tommy <[email protected]>
1 parent c4376d4 commit 9de2dbf

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

content/posts/linux/Root ZFS Encryption, Mirroring, and Remote Unlocking with Ubuntu.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,6 @@ update-initramfs -c -k all
250250
If you are doing mirroring:
251251

252252
```bash
253-
zfs set org.zfsbootmenu:commandline="quiet loglevel=4" zroot/ROOT
254-
zfs set org.zfsbootmenu:keysource="zroot/ROOT/ubuntu" zroot
255253

256254
cat << EOF >> /etc/fstab
257255
$( blkid | grep /dev/md0 | cut -d ' ' -f 2 ) /boot/efi vfat defaults 0 0
@@ -263,6 +261,15 @@ mount /boot/efi
263261

264262
If you are not, just replace `md0` in the commands above with your efi partition.
265263

264+
### Set ZFSBootMenu properties
265+
266+
Next, we will set the kernel boot parameters and the encryption key source for ZFSBootMenu. Here, we will deviate from the official guide and use a hardened boot parameter for better security:
267+
268+
```bash
269+
zfs set org.zfsbootmenu:commandline="quiet loglevel=4 spectre_v2=on spec_store_bypass_disable=on l1tf=full,force mds=full,nosmt tsx=off tsx_async_abort=full,nosmt kvm.nx_huge_pages=force nosmt=force l1d_flush=on mmio_stale_data=full,nosmt random.trust_bootloader=off random.trust_cpu=off intel_iommu=on amd_iommu=on efi=disable_early_pci_dma iommu.passthrough=0 iommu.strict=1 slab_nomerge init_on_alloc=1 init_on_free=1 pti=on vsyscall=none page_alloc.shuffle=1 randomize_kstack_offset=on extra_latent_entropy debugfs=off" zroot/ROOT
270+
zfs set org.zfsbootmenu:keysource="zroot/ROOT/ubuntu" zroot
271+
```
272+
266273
### Install ZFSBootMenu
267274

268275
#### To use it without remote unlocking, just follow the official guide:
@@ -349,4 +356,4 @@ exit
349356
umount -n -R /mnt
350357
zpool export zroot
351358
reboot
352-
```
359+
```

0 commit comments

Comments
 (0)