maks blog

maks blog, Hacks, fun around free software.

maximilian attems
email maks

Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.

There's more than one way to view this weblog; try these flavours on for size.

Other blogs in our institute or friends.

Tue, 14 Mar 2006

LUKS crypto partition
LUKS is the Linux Unified Key setup. It is much easier to handle than previous cryptsetup. LUKS uses dm-crypt. Encrypt the partition with luks, you may want to run a bad block check before and overwrite it with random data. Out of simplicity this is skipped. Initialize the LUKS partition.

 cryptsetup  luksFormat /dev/sda2

 This will overwrite data on /dev/sda2 irrevocably.

 Are you sure? (Type uppercase yes): YES
 Enter LUKS passphrase: 
 Verify passphrase: 
 Command successful.
Create mapping between logical and physical partition
cryptsetup luksOpen /dev/sda2 sda2
Enter LUKS passphrase: 
key slot 0 unlocked.
Command successful.
Now you create your filesystem on top and voila your using an encrypted partition:
mkfs.ext3 /dev/mapper/sda2

[/tech] permanent link