From 660786784719f83bbba835fb494c3d17ab898c36 Mon Sep 17 00:00:00 2001 From: subh Date: Tue, 14 Apr 2026 04:09:09 +0530 Subject: changes --- stuff/luks-encryption.html | 140 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 stuff/luks-encryption.html (limited to 'stuff/luks-encryption.html') diff --git a/stuff/luks-encryption.html b/stuff/luks-encryption.html new file mode 100644 index 0000000..1b83385 --- /dev/null +++ b/stuff/luks-encryption.html @@ -0,0 +1,140 @@ + + + + + + Encrypted Drive Guide + + + + +

Encrypting a Drive with LUKS and cryptsetup

+ +

1. Get the drive name

+
lsblk
+
+ +

2. Install cryptsetup

+
sudo pacman -S cryptsetup
+
+ +

3. Format the drive

+ +
cfdisk /dev/sdaX
+
+ +
mkfs.ext4 /dev/sdaX
+
+ + +

4. Encrypt the created partition

+ +
lsblk /dev/sdaX
+
+ +
cryptsetup luksFormat /dev/sda[0-9]
+
+ + +

5. Decrypt and create filesystem

+ +
cryptsetup open /dev/sda[0-9] <name>
+
+ +
mkfs.ext4 /dev/mapper/<name>
+
+ +

6. Re-encrypt after usage

+
cryptsetup close <name>
+
+ + + -- cgit v1.2.3