diff --git a/homepage/knowledge/postmarketos.html b/homepage/knowledge/postmarketos.html index 57ff5bd..0a6a267 100644 --- a/homepage/knowledge/postmarketos.html +++ b/homepage/knowledge/postmarketos.html @@ -16,11 +16,51 @@
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. +
+
+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]
.
+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]
.
+
By default, postmarketOS will generate a random software MAC address when connecting to a new WLAN network.