From 7a1039ab0819095049a1c078674de1d1b395ff73 Mon Sep 17 00:00:00 2001 From: drduh Date: Sun, 17 Mar 2024 17:28:53 -0700 Subject: [PATCH] Replace mkdir commands --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c21fb1a..3048734 100644 --- a/README.md +++ b/README.md @@ -561,6 +561,8 @@ sudo mkfs.ext2 /dev/mapper/gnupg-secrets -L gnupg-$(date +F) Mount the filesystem and copy the temporary GnuPG working directory exported key materials: ```console +sudo mkdir /mnt/encrypted-storage + sudo mount /dev/mapper/gnupg-secrets /mnt/encrypted-storage sudo cp -av $GNUPGHOME /mnt/encrypted-storage/ @@ -647,6 +649,8 @@ $ doas newfs sd3i Mount the filesystem and copy the temporary directory with the keyring: ```console +doas mkdir /mnt/encrypted-storage + doas mount /dev/sd3i /mnt/encrypted-storage doas cp -av $GNUPGHOME /mnt/encrypted-storage @@ -689,6 +693,8 @@ Create a filesystem and export the public key: ```console sudo mkfs.ext2 /dev/sdc2 +sudo mkdir /mnt/public + sudo mount /dev/sdc2 /mnt/public gpg --armor --export $KEYID | sudo tee /mnt/public/$KEYID-$(date +%F).asc @@ -721,6 +727,8 @@ Create a filesystem and export the public key to it: ```console doas newfs sd2b +doas mkdir /mnt/public + doas mount /dev/sd2b /mnt/public gpg --armor --export $KEYID | doas tee /mnt/public/$KEYID-$(date +%F).asc @@ -967,7 +975,9 @@ doas reboot Mount the non-encrypted volume with the public key: ```console -doas mount /dev/sd3i /mnt +doas mkdir /mnt/public + +doas mount /dev/sd3i /mnt/public ``` Import it: @@ -1791,12 +1801,16 @@ Decrypt and mount the encrypted volume: ```console sudo cryptsetup luksOpen /dev/sdc1 gnupg-secrets +sudo mkdir /mnt/encrypted-storage + sudo mount /dev/mapper/gnupg-secrets /mnt/encrypted-storage ``` Mount the non-encrypted public partition: ```console +sudo mkdir /mnt/public + sudo mount /dev/sdc2 /mnt/public ``` @@ -1892,6 +1906,8 @@ sudo cryptsetup luksClose gnupg-secrets Export the updated public key: ```console +sudo mkdir /mnt/public + sudo mount /dev/sdc2 /mnt/public gpg --armor --export $KEYID | sudo tee /mnt/public/$KEYID-$(date +%F).asc