Difference between revisions of "Luks File"

From Hack Sphere Labs Wiki
Jump to: navigation, search
(Created page with "=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=9...")
 
(My Info)
 
(3 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
  dd of=crypt bs=1 count=0 seek=900G
 
  dd of=crypt bs=1 count=0 seek=900G
  
It will not allocate the space immediately.
+
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==
 +
*http://stackoverflow.com/questions/257844/quickly-create-a-large-file-on-a-linux-system
 +
*http://wiki.centos.org/HowTos/EncryptedFilesystem

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


Notes