From 660786784719f83bbba835fb494c3d17ab898c36 Mon Sep 17 00:00:00 2001 From: subh Date: Tue, 14 Apr 2026 04:09:09 +0530 Subject: changes --- stuff/index.html | 4 ++ stuff/luks-encryption.html | 140 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 stuff/luks-encryption.html diff --git a/stuff/index.html b/stuff/index.html index 21d70eb..658b962 100644 --- a/stuff/index.html +++ b/stuff/index.html @@ -98,6 +98,10 @@ USB notifications with udev 2026-04-14 +
  • + Drive encryption with LUKS and cryptsetup + 2026-04-14 +
  • 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