Difference between revisions of "Cryptsetup"

From Useful Things
Jump to: navigation, search
 
Line 27: Line 27:
 
<source lang="bash">
 
<source lang="bash">
 
mount /dev/mapper/device-name /path/to/mountpoint
 
mount /dev/mapper/device-name /path/to/mountpoint
 +
</source>
 +
 +
== Test existing passphrase ==
 +
<source lang="bash">
 +
cryptsetup luksOpen --test-passphrase /path/to/device
 
</source>
 
</source>

Latest revision as of 16:07, 21 June 2015

Common arguments

--verify-passphrase, -y
              When interactively asking for a passphrase, ask for it twice and
              complain  if  both  inputs do not match. Advised when creating a
              regular mapping for the first time, or when running  luksFormat.
              Ignored on input from file or stdin.
--verbose, -v
              Print more information on command execution.

Create LUKS partition

cryptsetup luksFormat -y -v /path/to/device

Mount LUKS partition

First unlock the partition

cryptsetup luksOpen /path/to/device device-name

Then mount it

mount /dev/mapper/device-name /path/to/mountpoint

Test existing passphrase

cryptsetup luksOpen --test-passphrase /path/to/device