Luks File

From Hack Sphere Labs Wiki
Jump to: navigation, search

My Info

It is reccomended to fill and encrypted data container with random data.

You can however if you are in a hurry use a sparse file.

dd of=crypt bs=1 count=0 seek=900G

It will not allocate the space immediately. We can fill it later.

losetup /dev/loop0 /path/to/crypt
cryptsetup luksFormat /dev/loop0
cryptsetup luksOpen /dev/loop0 crypt

If we fill the mapper with zeros it will write random data to crypt (Really?)

dd if=/dev/zero of=/dev/mapper/crypt
mkfs.ext2 /dev/mapper/crypt
mount


Notes