User Tools

Site Tools


public:managing_luks_on_debian

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:managing_luks_on_debian [2024/03/22 23:19] – [References] thomaspublic:managing_luks_on_debian [2024/08/05 17:04] (current) – [Creating an encrypted volume] thomas
Line 4: Line 4:
  
 Since LUKS works directly on the block device, all commands listed below must be executed **as root**. Since LUKS works directly on the block device, all commands listed below must be executed **as root**.
 +
 +===== Installing cryptsetup =====
 +
 +Cryptsetup is the command used to manage LUKS. You can install it like this:
 +
 +<code>
 +apt-get install cryptsetup
 +</code>
 +
 +===== Creating an encrypted volume =====
 +
 +<code>
 +cryptsetup -v --type luks2 luksFormat /dev/DEVICE
 +</code>
 +
 +You can also create an encrypted volume on a disk image instead. In that case, first create the disk image with a command like the following:
 +
 +<code>
 +touch disk.img
 +fallocate -v -l 100MiB disk.img
 +</code>
 +
 +Don't use sparse images. LUKS will consider them too small.
 +===== Opening an encrypted volume =====
 +
 +<code>
 +cryptsetup luksOpen /dev/DEVICE volumename
 +</code>
 +
 +The volume should then become available at /dev/mapper/volumename
 +
 +===== Closing an encrypted volume =====
 +
 +<code>
 +cryptsetup luksClose volumename
 +</code>
 +
  
 ===== Listing slots ===== ===== Listing slots =====
public/managing_luks_on_debian.1711149569.txt.gz · Last modified: by thomas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki