luksFormat

Setup

  • run as root
  • partition = device partition to encrypt
  • mapping = any name, will appear in /dev/mapper
  • mountpoint = directory to mount the encrypted device on
cryptsetup luksFormat partition
cryptsetup open partition mapping
mkfs.ext4 /dev/mapper/mapping
cryptsetup close mapping

Dump (idk if it's the correct usage)

cryptsetup luksDump partition

Cryptfile

dd if=/dev/zero of=file bs=1M count=64
  • do this first
  • partition = file (for rest)
  • here file is 64MB (min 32MB required for ext4)

Usage

Mount

cryptsetup open partition mapping
mount /dev/mapper/mapping mountpoint

Umount

umount mapping
cryptsetup close mapping

Author: calx

Created: 2025-05-10 Sat 07:57

Emacs 30.1 (Org mode 9.7.11)