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
0 votes
0 answers
12 views

cryptsetup mistake and fixing a start job is running for no time limit

I was messing with cryptsetup to mount a LUKS encrypted volume automatically without prompting for a passphrase (which I was successful in doing) however I naively deleted everything in /etc/ccryptab ...
user avatar
  • 4,111
1 vote
2 answers
48 views

Can I backup LUKS encrypted partition with fsarchiver?

When installing Elementary OS, I've chosen too small a size for /boot and it constantly bites me when doing updates. The rest of the drive is a single LUKS encrypted root partition: lsblk --fs NAME ...
user avatar
  • 113
0 votes
0 answers
23 views

Need to create a LUKS2 partition using Systemd.repart but need to specify PBKDF=pbkdf2 for the partition

I need to make a dm-crypt partition using LUKS2. This partition needs to use a keyfile presented to systemd.cryptsetup for decryption. We cannot use Argon2 KDF due to memory limitations so we need to ...
user avatar
0 votes
0 answers
23 views

Error "File System Loop Detected" Permission Denied to Decrypt folder with ecryptfs-recover-private

I'm trying to open encrypted files from a full encrypted drive that is unlocked and mounted. I have tried various commands and have been unsuccessful. How can we fix the find "file system loop ...
user avatar
  • 13
0 votes
0 answers
55 views

How to make boot drive encryption work with PKCS#11 Smart card in Fedora (35)

On Fedora Workstation 35 here. systemd v249 I am trying to unlock root LUKS volume with smart card on BOOT, but it does not work. I added to /etc/crypttab mydisk UUID=496e1cd5-712f-44ab-ad02-...
user avatar
3 votes
1 answer
152 views

How to modify -iter-time on a existing luks partition

first of all I already read this topic : How to change the hash-spec and iter-time of an existing dm-crypt LUKS device? where the proposal is the following command : cryptsetup-reencrypt --keep-key ...
user avatar
0 votes
1 answer
59 views

arch - /run/cryptsetup missing while formatting luks partition

I'm relatively new to linux and I have just wiped my drive and I am installing arch linux from the start. When I run: cryptsetup luksFormat /dev/sda3 I get the following warning: WARNING: Locking ...
user avatar
  • 3
0 votes
0 answers
20 views

Tool to manage multiple LUKS devices as a group

I'm looking for a program which can manage a whole "group" of drives that have LUKS containers with the same passphrase; unlocking and locking them (ideally also formatting and/or passphrase ...
user avatar
  • 333
0 votes
0 answers
83 views

Why are LUKS partitions so slow?

I created a LUKS partition using cryptsetup's default values (cryptsetup 2.3.6). Read speed on the device: # cat /dev/md/thedev | pv > /dev/null yields ~1GiB/s. Reading from the encrypted ...
user avatar
0 votes
1 answer
137 views

Remove Cryptsetup LUKS encryption [duplicate]

I wanted to encrypt a flash drive but it didn't went well. Then I tried to remove the encryption but I am unable to do it. Here is some info: LUKS header information Version: 2 Epoch: ...
user avatar
1 vote
1 answer
92 views

Data-loss safety of "cryptsetup luksOpen <root device>" between suspend and resume

I'm setting up suspend-to-disk and resume in an 2021.12.x Arch Linux install. My question is about safely (without data-loss) unlocking partitions when resuming. Here is my configuration. The ...
user avatar
  • 113
1 vote
0 answers
199 views

(Probably) Corrupted LUKS Header, Restoring Header does not work

I tried everything I was able to find online. Hours of research since yesterday ;( I found no one struggling with the errors I'm facing, except from GitLab (error code -1 instead of -4 I'm getting), ...
user avatar
  • 11
0 votes
1 answer
195 views

Is it possible to enable dm-integrity on an existing LUKS/cryptsetup device?

I have a large LUKS2 device created with cryptsetup that holds an LVM2 with my root and other filesystems. The device is several TB in size and I don't have any others disks (or combinations of disks) ...
user avatar
  • 219
0 votes
1 answer
26 views

"Error: Timeout reached while waiting for PID 212" while decrypting LUKS over SSH

I've been trying to open a LUKS container via SSH using dropbear and initramfs/initrd image. My setup works well. I mean, I log via SSH to the target machine, then I see the prompt saying Please ...
user avatar
0 votes
0 answers
37 views

How do I change the cryptsetup background?

When I encrypt my disk/OS, GNU/Linux shows a screen or image on boot where you can type in your password. How do I edit that image/change it? I am currently on Debian, which includes a black ...
user avatar
0 votes
0 answers
87 views

Does it matter if the `encrypt` mkinitcpio hook is included on a system without full disk encryption?

Can I share an /etc/mkinitcpio.conf between two Arch Linux systems, where one requires the encrypt hook for LUKS disk encryption, and the other does not? i.e. will it cause a problem booting the ...
user avatar
  • 1,588
1 vote
1 answer
75 views

The `file` command correctly identifies my LUKS device but the kernel doesn't see it

I recently created a LUKS2 device with a native --offset of 4MiB. The file command correctly identifies the device and lists its UUID, but it is neither auto-opened at boot nor visible in /dev/disk/by-...
user avatar
  • 219
0 votes
0 answers
24 views

cryptdisks_start behaving differently from udev and command line

I have an annoying problem I am struggling to get to the bottom of. I'm trying to automate backups on encrypted volumes when a USB disk is plugged in to an Ubuntu 20.04 installation. When I run the ...
user avatar
  • 185
0 votes
0 answers
112 views

LVM+LUKS does not boot in kernel 5.14

I've got a dual-boot setup on my laptop, with Windows 10 on unencrypted partition and everything related to my Ubuntu 20.04 installation being on LVM encrypted with LUKS1, done according to this howto ...
user avatar
1 vote
1 answer
343 views

Error unlocking LUKS USB Device: Operation not supported

I am using a Debian 11 system with cinnamon and trying to unlock a LUKS encrypted USB device with an ext4 filesystem, which I successfully created and can use when I manually use root and unlock it ...
user avatar
0 votes
0 answers
144 views

Installing Ubuntu 21.04 with LVM on LUKS2 with integrity check returns errors when generating initramfs

TL;DR: I'm unable to generate initramfs after encrypting volumes with LUKS2 with integrity option and LVM on top of those volumes: cryptsetup: ERROR: first: Source mismatch cryptsetup: WARNING: target ...
user avatar
  • 3
2 votes
1 answer
667 views

Mounting external hard drive using LUKS2 and FIDO2 Key

I have encrypted an external hard drive using LUKS2 on my machine running Fedora 34 using the cryptsetup command. When I now plug in the hard drive and enter the passphrase, the drive is unlocked ...
user avatar
  • 23
0 votes
1 answer
215 views

cryptsetup with veracrypt container: set encoding?

I'm trying to unlock (and later mount) a veracrypt container like this: sudo cryptsetup --type tcrypt --veracrypt open /home/me/my_container.vc my_container sudo mount /dev/mapper/my_container /media/...
user avatar
  • 103
0 votes
0 answers
21 views

Installation of Windows at encrypted Arch

Scope: Windows 10 (not installed) ArchLinux (for example OS has been installed by usage of the following guide Partitions: - sda - sda1 - 1M part - sda2 - 550M part /efi - sda3 - 465.2G part ...
user avatar
0 votes
1 answer
88 views

SELinux and cryptsetup: chown failed and can't access temporary keystore

I am trying to set up SELinux and an encrypted additional partition that I mount at startup using a systemd service. If I run SELinux in permissive mode, everything runs ok (partition is correctly ...
user avatar
  • 351
2 votes
1 answer
213 views

Encrypted LUKS volume does not accept password on boot after system freeze

My Laptop froze and after a hard shutdown the boot process won’t accept my disk encryption password anymore. I have a ‘standard’ luks-inside-lvm setup, generated while installing fedora, split in a /...
user avatar
  • 31
0 votes
2 answers
117 views

Disk replacement in encrypted LUKS LVM without data loss

so here's my setup of an off-site rsync backup server. Ubuntu 20.10 with 9 hard disks. Disks /dev/sd[a-h] belong to backup volume group. System is on /dev/sdi Server is: powered on via network-...
user avatar
1 vote
1 answer
18 views

Newly added space on Ubuntu Partition showing as Unused

I've a Ubuntu OS running as a VMWare virtual machine. It was setup with 30 GB of space, but I am running out, so I extended the disk to 40 GB in VMWare, and then extended the partition by booting into ...
user avatar
4 votes
5 answers
1k views

Open: cryptsetup out of memory ("Not enough available memory to open a keyslot.")

I am working on my yocto distribution including cryptsetup in the 2.3.2 version I am running such distribution on a board with 1 GB RAM and I am incurring in an "out of memory" error trying ...
user avatar
  • 351
0 votes
1 answer
159 views

Only first slot password is valid during decryption of boot device while all others are valid while testing to open a device

I made a full encryption setup of Ubuntu 20.04 LTS according to this article. Due to it is highly recommended to add further passphrases to avoid loosing all data due to unavailability of the initial ...
user avatar
1 vote
0 answers
420 views

Linux Mint 20 with LUKS and LVM hangs on boot after upgrade

Solution I've solved the problem by adding the initramfs flag in /etc/crypttab and using keyscript=decrypt_keyctl instead of a keyfile to avoid entering the password two times for the second drive: ...
user avatar
0 votes
1 answer
1k views

cryptsetup luksFormat error "Device /dev/nvme0n1p3 is in use. Can not proceed with format operation."

I've followed this guideline to the point where I encrypt the target partition: cryptsetup -h sha256 -c aes-xts-plain64 -s 512 luksFormat /dev/nvme0n1p3 Then, the error appears, even though I'd ...
user avatar
1 vote
1 answer
63 views

Automatic mount of encrypted external harddrives

I have encrypted my external harddrives using cryptsetup and a key file. My goal is now to automatically decrypt and mount them upon plugin. I used to do so using this blog post (unfortunately in ...
user avatar
1 vote
0 answers
65 views

Adding RAM changed UUID of Luks partition (Linux Mint 20.1)

This is one of the weirdest glitches I've ever encountered. I have (3) partitions encrypted with Luks: /home (on same disk as root) /media/backups (external USB drive) swap (on ...
user avatar
  • 2,554
0 votes
1 answer
273 views

Have Cryptsetup Benchmark --cipher run through list of all ciphers

I'm trying to run cryptsetup benchmark --cipher on the entire list of ciphers included in /proc/crypto. I obtained the list from /proc/crypto by doing the following: cd ./Documents/; cat /proc/crypto |...
user avatar
1 vote
1 answer
40 views

Bind-mount and cryptsetup result in truncated root-path in /proc/self/mountinfo

I have an encrypted container containing an ext4 filesystem with a subdirectory which is bind-mounted at a later point in time. If I take look at /proc/self/mountinfo, the root-directory for the mount ...
user avatar
0 votes
1 answer
134 views

Volume group not found after hard shutdown due to beveage spilled on the computer

This afternoon, I made a stupid move and some beverage spilled over my computer. I did not notice it directly, but when I came back the PC was shutdown. The computer was not on battery. I tried to ...
user avatar
8 votes
1 answer
9k views

"cryptsetup: ERROR: Couldn't resolve device" combined with "cryptsetup: WARNING: target 'sda3_crypt' not found in /etc/crypttab"

After setting up hibernation on ubuntu 20.04 and modifying it that it works for encrypted swap partitions, I'm getting several issues: First, after rebooting from hibernation, I got "Gave up ...
user avatar
2 votes
2 answers
1k views

How much do 4K sectors improve LUKS2 performance on SSD storage?

According to the cryptsetup(8) man page, the sector size of a LUKS2 volume may be configured with --sector-size: Set sector size for use with disk encryption. It must be power of two and in range 512 ...
user avatar
  • 736
1 vote
1 answer
106 views

`cryptsetup reencrypt` seems to cripple digest iteration count

I had a LUKS partition for which cryptsetup luksDump /dev/mydisk gave (excerpt) Digests: 0: pbkdf2 Hash: sha256 Iterations: 176646 Salt: xx xx ... ... Running cryptsetup ...
user avatar
1 vote
1 answer
553 views

can't open bitlocker encrypted devices with a clear key with cryptsetup but it works with dislocker

I'm trying to open a bitlocker encryptet partition (/dev/nvme0n1p2) with cryptsetup, but it always returns the following error: # cryptsetup -v open --type bitlk /dev/nvme0n1p2 crypt0 Enter passphrase ...
user avatar
4 votes
1 answer
1k views

Arch Linux Setup with Encryption (LVM on LUKS)

I'd like to setup Arch Linux with encryption. I found the tutorial on the Arch wiki, and think that the second option (LVM on LUKS) is the best option for me. Here's the partitioning I'd like to use (...
user avatar
0 votes
0 answers
205 views

Incorrect mount order with ZFS, encrypted filesystems, and Systemd

I have a 'bulletproof' install of Arch Linux that is structured like so: /dev/sda1: FAT32 EFI partition: mounted as /boot/efi /dev/sda2: LUKS encrypted ext4 partition: mounted as /boot (prompt ...
user avatar
  • 1
1 vote
0 answers
121 views

one encrypted VG on multiple physical devices

I have a problem with my Linux setup under Debian Bullseye. To avoid getting shot in the leg with an unstable distribution, I want to use lvcreate to create COW-snapshots, which I can roll back if ...
user avatar
  • 121
2 votes
0 answers
145 views

Elementary OS Luks passphrase not working

the past days I installed a lot of software, some of them from KXStudio Repositories, after that a reboot was required, now as the computer boots up and cryptsetup appears, my passphrase is not ...
user avatar
3 votes
1 answer
707 views

cryptsetup luksOpen vs cryptsetup open

Just wanted to confirm whether my suspicion is correct or not, that is to say, are these two identical in function and the context in which they are used? cryptsetup luksOpen cryptsetup open I ...
user avatar
  • 305
0 votes
1 answer
3k views

cryptsetup "command not found"

Hey guys i am on a Debian following this guide https://www.youtube.com/watch?v=upOqR4HPi60 and when i type in this command cryptsetup luksAddKey /dev/YourDeviceName /keyfile i get cryptsetup: command ...
user avatar
  • 1
1 vote
0 answers
740 views

cryptsetup: bad password or options?

With a fully encrypted disk, the OS is Ubuntu 20.04, just after powering up the computer, the boot prompts for the disk encryption password in the middle of the screen with one single field. I have ...
user avatar
0 votes
1 answer
481 views

cryptsetup failed with code 22 invalid argument

I have read `cryptsetup luksOpen <device> <name>` fails to set up the specified name mapping https://www.saout.de/pipermail/dm-crypt/2014-August/004272.html And tried cryptsetup open --...
user avatar
  • 111
0 votes
1 answer
179 views

PV on LVM Partition inside a dm-crypt container

I am trying to set up LVM on LUKS. Here is what I did: head -c 100M /dev/zero > test-file losetup /dev/loop0 test-file cryptsetup luksFormat /dev/loop0 cryptsetup open /dev/loop0 cryptlvm gdisk /...
user avatar

1
2 3 4 5