aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/cheat/cryptsetup
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-09-05 07:05:07 +0200
committerneodarz <neodarz@neodarz.net>2019-09-05 07:05:07 +0200
commite0c0d4b38cde20e2300e86b69414dd9851b47456 (patch)
tree5df65243447352a9637d1f783247bfd5ccff2ef4 /dotfiles/cheat/cryptsetup
parentdc45bf89a66ec6c8cd25cf5605deb853f6984705 (diff)
downloaddotfiles_dotdrop-e0c0d4b38cde20e2300e86b69414dd9851b47456.tar.xz
dotfiles_dotdrop-e0c0d4b38cde20e2300e86b69414dd9851b47456.zip
ooo
Diffstat (limited to 'dotfiles/cheat/cryptsetup')
-rw-r--r--dotfiles/cheat/cryptsetup11
1 files changed, 11 insertions, 0 deletions
diff --git a/dotfiles/cheat/cryptsetup b/dotfiles/cheat/cryptsetup
new file mode 100644
index 0000000..a5ccc69
--- /dev/null
+++ b/dotfiles/cheat/cryptsetup
@@ -0,0 +1,11 @@
+# open encrypted partition /dev/sdb1 (reachable at /dev/mapper/backup)
+cryptsetup open --type luks /dev/sdb1 backup
+
+# open encrypted partition /dev/sdb1 using a keyfile (reachable at /dev/mapper/hdd)
+cryptsetup open --type luks --key-file hdd.key /dev/sdb1 hdd
+
+# close luks container at /dev/mapper/hdd
+cryptsetup close hdd
+
+# create encrypted disk
+cryptsetup luksFormat --type luks2 /dev/sdd