Questions tagged [cryptsetup]

cryptsetup is a command-line utility for managing disk volumes encrypted using the dm-crypt kernel subsystem (Linux versions 2.6 up and DragonFly BSD).

Filter by
Sorted by
Tagged with
1
vote
1answer
355 views

Encrypt multiple partitions with luks cryptsetup

The other day I tried to setup a Full disk encryption on a test system (ArchLinux) within virtualbox. (I want to use this kind of a setup on my main machine so I wanted to test it out first) I ...
1
vote
1answer
806 views

What are the limitations of a detached LUKS header

I'm trying to understand the relationship between LUKS detached headers and their respective block device. From what I understand "formatting" with a detached header doesn't actually change the ...
1
vote
2answers
605 views

cryptsetup resize returns device not active, despite cryptdisk status returning active and in use (resizing LVM-on-LUKS)

I am in the process of resizing LVM-on-LUKS, referring to these two posts as guides. I had done this once before smoothly, but I have run into a strange problem. When I run #cryptsetup -b 377523479 ...
0
votes
0answers
125 views

Is there a way to do one-time pads(OTP) with Linux cryptsetup(dm-crypt)?

It looks like losetup with cryptoloop did it and there was a dm-xor module for a very old kernel, but can't find anything modern. I'm wading through a ton of obsolete losetup documents. Something ...
1
vote
1answer
158 views

How to install cryptsetup 2.1.0 on Debian Stetch? (not in backports)

How should I go about installing cryptsetup 2.1.0 on Debian stretch? It's not in stretch-backports so I'd like to know what's the best way to go about this. I'm on ARM64 (ayufan-rock64 debian stretch ...
0
votes
0answers
399 views

Kali Linux: USB drive cannot be formatted by cryptsetup; Device is in use: error code -1 “wrong or missing parameters”

I am trying to make a Kali Live drive with a 32gb flash drive, using LUKS encryption for the persistence, following the instructions on this page: https://docs.kali.org/downloading/kali-linux-live-usb-...
0
votes
1answer
83 views

cryptsetup and passphrae restrictions

I'm trying to encrypt a new HD to add to my Red Hat server. I have two other drives that are already encrypted with a passphrase. However, when I try to use the same passphrase on the new drive I get: ...
4
votes
1answer
1k views

Grub2/LUKS How to avoid to type the passphrase twice?

I am on the latest OpenSUSE Tumbleweed and this guide has not worked for me. I did everything like in the guide except I did not generate a new random key and added it to the harddisk but used the ...
1
vote
1answer
118 views

dmsetup doesn't work with drives over 2TB

The original title of this post was about CryptSetup not loading a Truecrypt device with 4096 byte sectors. I managed to dump the Truecrypt header (with the master key) anyway, but now when I try to ...
0
votes
1answer
217 views

Partition not showing up after Luks decryption

Everytime i decrypt my luks drive the partition is not showing up: cryptsetup -v luksOpen /dev/md0 md0_crypt lsblk sdb 8:16 0 3,7T 0 disk └─sdb1 ...
4
votes
1answer
265 views

Using space before 1st partition of USB-Stick as luks key

I'm using arch linux with an encrypted luks root partition (boot unencrypted), with a passphrase yet. Now I have a keyfile (3072 bytes), that's written to USB-Stick this way: sudo dd if=tempKeyFile....
2
votes
1answer
2k views

invalid line /etc/crypttab

I am troubleshooting a debian system that will not boot; the system booted fine, and one day ceased to do so (possibly but not definitely related to an apt upgrade). It has a small boot partition (...
1
vote
1answer
2k views

Manual partitioning for encrypted LVM setup is blocked

I am trying to Install Kali Linux on my MacBook Pro for dual boot with Mac. Here is the GUI I am talking about (the same is in Debian and Ubuntu, but just to clarify this I found image in google): ...
1
vote
0answers
36 views

/dev/mapper device remains after stopping cryptsetup unit

This is an ArchLinux box and I can't cleanly stop an encrypted container by means of systemd. I have to additionally issue cryptsetup close. Is this misconfiguration or a bug? /etc/crypttab: ...
2
votes
1answer
7k views

Mount encrypted partition of an image file

I've an image backup file of my harddisk, which consists of three partitions (sudo fdisk -l /mnt/hdd/19_02.img): Device Start End Sectors Size Type /mnt/hdd/19_02.img1 ...
2
votes
1answer
1k views

Is it possible to LUKS require both password and key file?

My goal is to be able easily destroy medium with key file in emergency situation and make system unbootable, even is potential advisor knows right password for the system. I'd store this key file in ...
0
votes
1answer
502 views

crypttab: location of luks header file

Hi my crypttab looks as follows: crypt_device /dev/sda luks,header=/boot/header.img update-initramfs -u -k all works with success, but for some reason cryptsetup will not find the header.img which ...
1
vote
2answers
243 views

Opening encrypted volumes using a script [closed]

I have two encrypted volumes that I use occasionally. One is a partition and the other is a container file. I always use them at the same time. I currently open them using something like this: $ ...
3
votes
2answers
2k views

How can I create multiple partitions in a LUKS container using a gpt/mbr partition table in the container?

Is it possible to have multiple partitions in a single LUKS or cryptsetup container? If so, how?
0
votes
2answers
1k views

Failed to open root LUKS device on LVM during boot

I have LVM partitions which are encrypted using LUKS. My root partition is /dev/HDD/root: LVM group "HDD" (at /dev/HDD): Encrypted LUKS device "root" at /dev/HDD/root I'm trying to decrypt it via ...
0
votes
1answer
422 views

Re encrypt using cryptsetup-reencrypt

My LUKS disk is created some years ago the options would be outdated right now, if to change my LUKS header by: # cryptsetup-reencrypt /dev/sdaX WARNING: this is experimental code, it can completely ...
2
votes
1answer
4k views

Encypted LV “not a valid LUKS device” after Debian Setup

I've just set up a Debian system to try out a couple of projects and improve my understanding of Linux but I'm running into problems with cryptsetup straight after installation. I used the graphical ...
0
votes
1answer
199 views

Cryptmount-setup is not working

When I tried to set up encryption using cryptmount-setup, it just returns without any feedback. It did not even created the crypto.fs file. I ran the commands: cryptmount nextcloud_data and cryptmount ...
1
vote
1answer
1k views

cryptsetup open for luks : improper handling of --key-file argument

A related question would be: luksOpen doesn't decrypt with keyfile unless --key-file argument is provided On Ubuntu bionic with cryptsetup 2.0.2 however, I do encounter the following problem: ...
0
votes
0answers
211 views

Grow LVM on LUKS Logical Volume

so I'm on ArchLinux and have the following setup └─sda3 8:3 0 297.3G 0 part └─cryptolvm 254:0 0 297.3G 0 crypt ├─mandos-swap 254:1 0 8G 0 lvm [SWAP] ├─...
1
vote
2answers
168 views

Is it safe to gnome-session-quit && shutdown -h now?

I have a LUKS external partition that is automatically opened/mounted and closed/unmounted by pam_mount during login and logout. Right now I am having to log out in the terminal and then shutdown ...
0
votes
0answers
222 views

Debugging incosistent LUKS/cryptsetup behaviour

I've encountered this issue a few times but so far I've been unable to reliably reproduce this/find the root cause. Where do I go from here? It seems like taking hexdump of the header might help, so ...
0
votes
0answers
786 views

Grub-install error: disk 'crpytouuid/<uuid>' not found

I followed fdiblen's guide on Arch Linux Installation with a Fully encrypted disk and Btrfs filesystem that uses cryptsetup. I'm at the bootloader stage where I'm trying to grub-install with these ...
1
vote
1answer
1k views

How to double-check a LUKS passphrase

This is a way I enter a new passphrase for my encrypted volume: sudo cryptsetup luksAddKey --key-slot 4 /dev/sda5 Unfortunately, cryptsetup does not ask to confirm the new passphrase. How to make ...
-1
votes
1answer
319 views

Drive in readonly, after cryptsetup

I have been having some trouble with my 16Gb USB. You see I decided to attempt to encrypt it using cryptsetup, and I have done this before without problems, but his time, when I was creating a ...
3
votes
0answers
936 views

Automount encrypted disk on demand with systemd using interactive passphrase

I try to automount an LUKS encrypted disk with systemd on demand with in interactive passphrase. I am using a plain Debian without any window manager etc. I have configured crypttab and fstab "...
2
votes
1answer
2k views

Why is 'cryptsetup luksFormat' not prompting for a passphrase?

I am expecting cryptsetup to prompt me for a passphrase, but instead it's just trying and failing to open a key file: sudo cryptsetup luksFormat test.img cryptsetup-test WARNING! ======== This will ...
2
votes
1answer
2k views

How to remove a crypto_LUKS from a device

In a moment of inattention, I ran luksFormat on /dev/sda instead of on /dev/sda1. Now I would like to undo that operation. Checking man for cryptsetup doesn't reveal an obvious method. `lsblk -f1 ...
0
votes
1answer
303 views

Cryptsetup Device Timeout When Automounting Through Systemd

For some reason systemd gives timeout in one of my cryptsetup devices when trying to mount it. Here are the Units and script: udev rules: ACTION=="add", KERNEL=="sd[a-z][0-9]", ATTRS{serial}=="...
0
votes
1answer
225 views

How to mount 192.168.0.3:/dev/sda to local:/mnt/sda for cryptsetup luksOpen /mnt/sda?

as mentioned above, I have a cryptsetup full disk encrypted device on /dev/sda at 192.168.0.3. And I am at 192.168.0.2. $ sudo cryptsetup luksOpen user@192.168.0.3:/dev/sda encHDD $ sudo mount /dev/...
5
votes
1answer
1k views

dmsetup luksFormat creating an alignment inconsistency

When unlocking a newly-formatted LUKS volume, I received a warning in the kernel log: kernel: device-mapper: table: 253:14: adding target device sdk1 caused an alignment inconsistency: ...
1
vote
1answer
685 views

change designated name of encrypted lvm root? from sdo to sdn in crypttab?

I installed debian stretch using encrypted lvm from the installer on a usb drive. during installation, with all disks connected, sdo5 is assigned to my boot disk. when running the full system, my ...
4
votes
1answer
10k views

`cryptsetup luksOpen <device> <name>` fails to set up the specified name mapping

HardenedArray has a helpful archlinux-installation guide at Efficient Encrypted UEFI-Booting Arch Installation. However, I encountered difficulty early in the installation process -- specifically, at ...
2
votes
1answer
1k views

dm-crypt / cryptsetup which block encryption dimension use

I'm working on dm-crypt utilizing cryptsetup. I'm interested to understand if it's using a fixed block dimension to encrypt files. I explain it better: I created a LUKS envelop, formatted it with ...
1
vote
1answer
152 views

is it possible to create partition table inside crypt mapper?

i.e. not fdisk /dev/sda; cryptsetup create xxx /dev/sda1 but vice versa cryptsetup create xxx /dev/sda ; fdisk /dev/mapper/xxx is it allowed?
1
vote
0answers
1k views

cryptsetup, LUKS, dm-crypt benchmark

I'm working on embedded software, where I used the cryptsetup to create an encrypted disk space over a NFS ethernet standard connection... I'm interested to understand the writing speed that this disk ...
0
votes
1answer
1k views

dm-crypt cryptsetup using cryptodev module

I have introduced the usage of cryptsetup to encrypt a portion of the disk space, but the writing speed is very slow. I found that there is a module to utilize directly the hardware for the encryption ...
6
votes
1answer
1k views

Why is my LUKS partition mounted without asking for a passphrase?

On my system, I have two encrypted disks: crypt containing the root partition of raspbian stretch usb-crypt is an external usb disk. LVM is used on that disk. Both disks are protected using the same ...
1
vote
0answers
361 views

Unable to mount decrypted image

I have an encrypted image (ext4) that can be mounted perfectly on my Raspberry Pi but not on my (L)Ubuntu VM. The following commands work perfectly on the Pi: sudo cryptsetup luksOpen stuff.iso img ...
0
votes
1answer
142 views

Why is my drive not being encrypted with cryptsetup?

I have followed this guide in hopes of fully encrypting a secondary drive with a single filesystem over LVM on it. Here is exactly what I have done in order: fdisk /dev/sdb # goes to interactive ...
35
votes
3answers
24k views

Using a single passphrase to unlock multiple encrypted disks at boot

My machine has an SSD, where I installed the system and an HDD, which I use as a storage for large and/or infrequently used files. Both are encrypted, but I chose to use the same passphrase for them. ...
1
vote
1answer
639 views

I want multiple prompts to decrypt multiple hard disks which contain root filesystem

I am running an Ubuntu 16.04 system with the following hard disk configuration: 1 hard drive which I will call /dev/sda. /dev/sda has 3 partitions used for the following purposes: /dev/sda1 is used ...
1
vote
1answer
358 views

No volume group in lvm2 disk? Want to mount a logical partition

How am I supposed to mount a logical volume from a decrypted drive, when the VG column is blank? The last time I could do it, (ubuntu-vg was showing), but now it has a blank name? root@debian:/home/...
3
votes
1answer
3k views

LUKS passphrase doesn't work

One day, when I turned on the computer, my passphrase for home part /dev/sda7 doesn't worked (I am 147% absolutely sure, that I was writing right pass)! After three times of tries, I have rebooted ...
-1
votes
1answer
946 views

Encrypt root file system linux [closed]

I need encrypt root file system. I used below command cryptsetup -y -v luksFormat /dev/sda1 But i am getting below error. WARNING! ======== This will overwrite data on /dev/sda1 irrevocably. Are ...