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
2answers
15 views

Unable to enlarge/resize LUKS partition on virtual disk

I have tried different guides and tutorials to enlarge an encrypted LUKS LVM partition, but I am unable to move forward and finish the process as I don't have complete clarity over the structure of ...
1
vote
0answers
15 views

How to enable discards on encrypted root

I have installed system on ext4 filesystem on lvm (vg name encrypted, root is called encrypted-root) on luks. When I'm trying to run fstrim /, I get fstrim: /: the discard operation is not supported. ...
0
votes
1answer
35 views

LVM + LUKS is this error okay?

I have a encrypted partition, inside it there exist LVM / and /home. When I start PC it says. Volume group "vg" not found Cannot process volume group vg Please unlock disk sdc2_crypt After I type ...
1
vote
1answer
22 views

It is okay to mount 2 encrypted disks with same UUID

I have 2 harddrives. 1 was empty - let's call it hard2 and other had a working Linux OS - lets call it hard1. I use dd to copy hard1 to hard2, but I could not boot with hard2. I had a error: inode ...
0
votes
1answer
24 views

Encrypting user folder after installing Ubuntu, without using 2.5x currently used space?

I've installed a XUnbuntu a few months ago, and did the stupid mistake of not checking "Encrypt Home". I'm now looking for a way to encrypt my user's home directory (I have only one user using this ...
2
votes
0answers
55 views

Can I install Debian with encrypted /boot?

Is there a way to install Debian with full disk encryption, including /boot ? Or the only way is to install Debian and encrypt all without /boot and then encrypt /boot using this guide ?
0
votes
1answer
25 views

Cannot list and access my disk after cryptsetup command

I just tried to encrypt the new 2 TB disk I just received. Unfortunately I unplugged it (external disk on a USB port) just after running a cryptsetup command and now I cannot even list it with fd or ...
0
votes
1answer
20 views

Where to download cryptsetup-luks-devel package?

How to download and install cryptsetup-luks-devel package for Debian? I can't find it. When I google I get this package only for CentOS.
2
votes
1answer
37 views

Possible missing algorithm in systemd-cryptsetup to mount a veracrypt volume

I have been trying to mount a veracrypt volume on boot on a Debian system, however systemd-cryptsetup for my volume fails with these two messages taken from this command: systemctl status systemd-...
0
votes
0answers
20 views

How to compile keyslot_checker?

I want to compile keyslot_checker , but I get error gcc -lm -lcryptsetup chk_luks_keyslots.c -o chk_luks_keyslots chk_luks_keyslots.c:39:27: fatal error: libcryptsetup.h: No such file or directory #...
1
vote
1answer
31 views

Can't mount encrypted disk from old cryptsetup

I've got a very old USB disk, on which there's a very old encrypted partition. It mounts as /dev/sdb1 On a newish box (with cryptsetup 1.7.3), I can attach to it with: cryptsetup -c aes-plain -s ...
1
vote
0answers
88 views

Slow write speed on encrypted drive, while benchmark shows much higher encryption / raw disk write rates

I currently setup a NAS with Ubuntu 18.04 on a Netgear ReadyNAS 102device. The machine has a Armada Marvell 370/XP SoC with a hardware encryption accelerator called "CESA". The kernel drivers for CESA ...
0
votes
0answers
211 views

how to let the systemd cryptsetup automatically mount the usb key which contain keyfile?

In ubuntu 19.10 I followed the example here. The keyfile is at the root of usb key filesystem. usbkey has uuid yyyy. the /etc/crypttab is like this: encrypted UUID=xxxx /keyfile:UUID=yyyy luks,...
1
vote
2answers
76 views

Mounting a Luks partition

I have backed up a drive with all its partitions using the command dd if=/dev/sda of=/media/oshirowanen/external-drive/backups-2019/full_drive_backup.img /dev/sda is an ssd which has a Linux OS ...
0
votes
0answers
40 views

Device found for 'cryptsetup luksFormat` but not `cryptsetup luksAddKey`

I run sudo cryptsetup --hash sha512 --key-file 00.key luksFormat /dev/disk/by-uuid/156e47f9-6996-481c-82ce-160b367b9ff4, everything works as expected: WARNING! ======== This will overwrite data on /...
1
vote
1answer
127 views

fstrim does not trim swap

I have set up an encrypted swap partition following this guide. My /etc/crypttab is set up like this (note the discard option on swap): rootfs UUID=<UUID_root> none luks,discard swap UUID=<...
1
vote
1answer
52 views

systemd service on shutdown with disk access [backup]

I'd like to run a little backup script (btrfs snapshot + transfer to usb) on system shutdown. The following service executes perfectly fine on shutdown, but not on reboot as intended: [Unit] ...
0
votes
0answers
51 views

Convert existing system partition into encrypted one using cryptsetup

I have the following scenario: A Server with Ubuntu (headless) installed on it. One SSD with the two following partitions: Disk /dev/sda: 37,3 GiB, 40020664320 bytes, 78165360 sectors Disk model: ...
0
votes
1answer
116 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
187 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
194 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
59 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
95 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
107 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
55 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: ...
0
votes
0answers
137 views

LUKS volume does not get unsealed by the TPM after a update

I'm performing a Kickstart-installation from a USB-Stick of Oracle-Linux 7.6 on a Dell Optiplex 3060 where I also encrypt the volume and bind it to the TPM to unlock it automatically: clevis luks ...
3
votes
1answer
415 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 ...
0
votes
0answers
56 views

How do I make support for LUKS2 in Slackware?

I see the latest cryptsetup is 1.7.5: PACKAGE NAME: cryptsetup-1.7.5-x86_64-2.txz PACKAGE LOCATION: ./slackware64/a PACKAGE SIZE (compressed): 284 K PACKAGE SIZE (uncompressed): 1340 K PACKAGE ...
1
vote
1answer
74 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
68 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 ...
0
votes
0answers
17 views

Can keychain be used to encrypt a file?

I would like to have something like KEY="$(echo "key please" | $SSH_AUTH_SOCK)" cryptsetup luksOpen --key-file <(echo "$KEY") /path/to/file like PGP. The IdentityAgent SSH_AUTH_SOCK seems to have ...
2
votes
1answer
140 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....
0
votes
0answers
28 views

dm_crypt mount on login takes 90 seconds

I'm trying to configure automounting encrypted home on login with user password=encryption password. I'm using archlinux + kde + sddm + crypsetup (dm_crypt). Following archlinux article I did as ...
2
votes
1answer
957 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
1k 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
28 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: ...
1
vote
1answer
3k 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
706 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
299 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
148 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: $ ...
1
vote
2answers
1k 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
563 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
298 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
2k 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
162 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
843 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
181 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
1answer
120 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
183 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
548 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 ...