Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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).

0
votes
1answer
13 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
41 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
17 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: ...
0
votes
0answers
22 views

How to “cryptsetup open” an encrypted disk with user rights?

I have an encrypted flash drive drive for some private data. It was set up using dm-crypt/cryptsetup. Everything works fine, except that I always have to use root rights to run cryptsetup open /dev/....
-1
votes
1answer
187 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
113 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 ...
-1
votes
1answer
47 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 ...
0
votes
0answers
27 views

fdisk problem - can not recreate partition table - decrease crypt

I am trying to shrink my crypted lvm system, shrinking lv and pv size was no problem, i followed this awesome post here: https://ubuntuforums.org/showthread.php?t=726724 But in the end the partition ...
1
vote
2answers
52 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: $ ...
0
votes
1answer
230 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
221 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
137 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
444 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
74 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
0answers
106 views

Debian cryptoloop module missing [closed]

When I do modprobe cryptoloop I get: modprobe: FATAL: Module cryptoloop not found in directory /lib/modules/4.9.0-8-amd64 the package cryptsetup is installed. I have this working on another Debian ...
1
vote
1answer
283 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
144 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] ├─...
0
votes
0answers
33 views

Add Second Mint Installation to GRUB Boot Menu - Boot Drops to Busybox

I have two OSes installed on my machine. The first (the currently working/accessible OS) is installed as /dev/nvme0n1p1 - EFI /dev/nvme0n1p2 - Boot A /dev/nvme0n1p3 - LUKS LVM Swap ...
0
votes
1answer
46 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
92 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
230 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 ...
0
votes
1answer
587 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
110 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 ...
1
vote
0answers
408 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
456 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
524 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
147 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
118 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
563 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: ...
0
votes
1answer
283 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
4k 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 ...
1
vote
1answer
583 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
92 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?
0
votes
0answers
330 views

Can't close luks volume on android (device busy)

I'm trying to use luks on my phone (android 4.2.2). I can create luks volume, mount and unmount it without problem, but when i'm trying to luksClose it here the problem start ..(in fact i can close ...
1
vote
0answers
630 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
646 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
664 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
189 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
91 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 ...
15
votes
3answers
8k 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
260 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
245 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
2k 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
677 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 ...
13
votes
4answers
966 views

independently verify that TRIM indeed works on SSD

I have a LUKS partition /dev/sda1 which I luksOpen with --allow-discards: cryptsetup --allow-discards luksOpen /dev/sda1 root I then mount the ext4 filesystem with discard option: grep /dev/mapper/...
0
votes
1answer
376 views

ssh: connect to host raspberry port 22: No route to host

I can't log in into ssh to crypt luks encrypted device with installed dropbear but I can while rpi is decrypted. I'm getting error: ssh: connect to host raspberry port 22: No route to host. While ...
2
votes
1answer
2k views

make[1]: *** /lib/modules/4.9.24-v7+/build: No such file or directory. Stop

I fetched cryptodev source from http://nwl.cc/pub/cryptodev-linux/cryptodev-linux-1.9.tar.gz to directory ~/cryptodev, I unpacked tar archive and I entered into ~/cryptodev/cryptodev-linux-1.9 ...
1
vote
2answers
1k views

What are the --use-urandom or --use-random options in LUKS used for?

I'm currently trying to teach myself some non-Windowsland operating systems, and I figured Ubuntu Server 16.04 would be the best place to start. Having "mastered" LVM, I'm trying to familiarize ...
1
vote
0answers
184 views

Is there a way to tell initramfs via Grub cmdline to open specified device with cryptsetup?

I have a Debian setup where rootfs is on a btrfs subvolume which is on a lvm partition which is on a luks partition which is on disk-A2 (disk-A||disk-A2||luks||lvm||btrfs||rootfs) I just copied my ...
4
votes
3answers
4k views

luksOpen doesn't decrypt with keyfile unless --key-file argument is provided

I have an encrypted volume for which I had initially set up a passphrase interactively, which works just fine to decrypt the partition. I added more keys using a keyfile in both the following ways: ...