From 7e323d677217e0fb548e4dfc29ecdf56013c04a7 Mon Sep 17 00:00:00 2001
From: Deven Blake
This information is not authoritative, nor from a place of deep knowledge.
+To format a partition for LUKS, use
+To open a LUKS partition, use
+To mount an opened LUKS partition, use
+To close an open LUKS partition,
+To make the LUKS partition openable via keyfile, first make a keyfile (cryptography
-updated 2021-10-14
+updated 2021-11-09
LUKS partitioning
+Sources
+
+
+lsblk
to determine the physical block device location for that partition and run cryptsetup luksFormat [partition]
.
+The passphrase used can be changed or removed after creation.
+cryptsetup luksOpen [partition] [name]
.
+This name is the name the decrypted block device location will take in /dev/mapper/
.
+Before the decrypted block device has a filesystem it'll just be cleared space - use mkfs.[filesystem] /dev/mapper/[name]
.
+mount(8)
as normal, just with the decrypted block device location.
+umount(8)
it if it's open and cryptsetup luksClose [name]
.
+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]
.
+SSH keys
Sources
diff --git a/homepage/knowledge/postmarketos.html b/homepage/knowledge/postmarketos.html
index fb0d2a3..66c7f32 100644
--- a/homepage/knowledge/postmarketos.html
+++ b/homepage/knowledge/postmarketos.html
@@ -22,47 +22,22 @@
postmarketOS is based on Alpine Linux and this site's knowledge article for Alpine applies to postmarketOS as well.
I bought a SAMSUNG EVO Select 128GB New Generation card (apologies for the Amazon link, it isn't an associate link though), wiped it, and put one partition on it that spanned the whole drive. +See cryptography#LUKS partitioning for how to make a LUKS partition.
-To format a partition for LUKS, use lsblk
to determine the block device location for that partition and run cryptsetup luksFormat [partition]
.
-The passphrase used can be changed or removed after creation.
-
-To open a LUKS partition, use cryptsetup luksOpen [partition] [name]
.
-This name is the name the decrypted block device location will take in /dev/mapper/
.
-Before the decrypted block device has a filesystem it'll just be cleared space.
-Use mkfs.ext4 /dev/mapper/[name]
to create an ext4 filesystem on the decrypted volume.
-
-To mount an opened LUKS partition, use mount(8)
as normal, just with the block device location /dev/mapper/[name]
.
-
-To close an open LUKS partition, umount(8)
it if it's open and cryptsetup luksClose [name]
.
-
-To make the LUKS partition openable via keyfile, first make a keyfile (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]
.
-Physical partition block device refers to the same partition openable with cryptsetup luksOpen
, but is called such here to disambiguate from the decrypted block device (at /dev/mapper/
).
-
-To have the SD card auto-mount at boot, add an fstab(5)
line for the decrypted block device.
-In blkid(8)
's output, this will be the line that starts with /dev/mapper/[name]
.
+To have the SD card auto-mount at boot, add an fstab(5)
line for the decrypted block device.
+The localmount
OpenRC service will also have to be enabled for the system to read fstab(5)
- rc-update add localmount
.
Then, rc-update add dmcrypt boot
and add an entry in /etc/conf.d/dmcrypt
to automatically luksOpen the volume.
dm-crypt
will need the UUID of the physical block device; in blkid(8)
this will be the line that starts with /dev/mmcblk
or /dev/sd[X]
.
-The localmount
OpenRC service will also have to be enabled for the system to read fstab(5)
.
-