Difference between revisions of "Luks File"
From Hack Sphere Labs Wiki
(→My Info) |
(→My Info) |
||
Line 9: | Line 9: | ||
It will not allocate the space immediately. We can fill it later. | 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 | ||
Latest revision as of 19:07, 2 February 2013
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