From 34e4e80c48481e5c83c86f4a060b4d48a28479aa Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 1 May 2022 00:09:29 -0400 Subject: [PATCH] update LUKS --- homepage/knowledge/linux.html | 44 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/homepage/knowledge/linux.html b/homepage/knowledge/linux.html index d6ffe36..86cd322 100644 --- a/homepage/knowledge/linux.html +++ b/homepage/knowledge/linux.html @@ -16,7 +16,7 @@

linux

-

updated 2022-04-24

+

updated 2022-04-30


ACPI client

@@ -109,9 +109,9 @@ Alpine by default uses mandoc.

Partitions and filesystems

Don't use partitioners included with OS media where the same job can be done by GParted (which has live media available) or another good general-purpose partitioner. @@ -131,14 +131,20 @@ Check out the linked pages in the "See also" section.

Use mkfs(8) for creating filesystems and mount(8) for mounting partitions' filesystems.

-

LUKS partitioning

+

LUKS

-To format a partition for LUKS, use lsblk to determine the physical block device location for that partition and run cryptsetup luksFormat [partition]. +e2fsprogs is needed for the dm_mod kernel module used for LUKS partition decryption. +

+

+To format a partition for LUKS, determine the physical block device location for that partition and run cryptsetup luksFormat [partition]. The passphrase used can be changed or removed after creation.

@@ -156,23 +162,17 @@ To close an open LUKS partition, umount(8) it if it's open and dd if=/dev/urandom of=/root/keyfile bs=1024 count=4 seems to work), and optionally make it readable by root only (chmod 0400 [keyfile]). Then add the keyfile to the partition's LUKS header with cryptsetup luksAddKey [physical partition block device] [keyfile].

-

Mount LUKS encrypted partitions at boot

- -

See cryptography#LUKS partitioning for how to make a LUKS partition.

+

dm-crypt

-e2fsprogs is needed for the dm_mod kernel module used for LUKS partition decryption. +dm-crypt is a service that automatically mounts LUKS volumes at boot.

-On most OpenRC-initialized distributions, the cryptsetup-openrc package provides a dmcrypt service for OpenRC. +On most OpenRC-initialized distributions, the cryptsetup-openrc package provides dmcrypt. Make sure that service is added to runlevel boot.

-Configure /etc/conf.d/dmcrypt, and accordingly fstab. -dmcrypt will need the UUID of the physical block device while fstab (if being configured with UUIDs will need the UUID of the decrypted block device in the device mapper. +Configuration is in /etc/conf.d/dmcrypt and further configuration should be done in fstab. +dm-crypt will need the UUID of the physical block device while fstab (if being configured with UUIDs will need the UUID of the decrypted block device in the device mapper.

@@ -187,10 +187,10 @@ By default, postmarketOS will generate a random software MAC address when connec You can disable this by adding a NetworkManager rule. In /etc/NetworkManager/conf.d/ you can make a file with any name that has the following:

-

+

 [device]
 wifi.scan-rand-mac-address=no
-

+

On a live system you can then rc-service networkmanager restart to restart NetworkManager and have it load the new configuration.