From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Tue, 29 Mar 2016 23:25:10 +0200 (CEST) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1al0tm-0005G6-T7 for dm-crypt@saout.de; Tue, 29 Mar 2016 23:10:03 +0200 Received: from ppp37-190-56-84.pppoe.spdop.ru ([37.190.56.84]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Mar 2016 23:10:02 +0200 Received: from yumkam by ppp37-190-56-84.pppoe.spdop.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Mar 2016 23:10:02 +0200 From: yumkam@gmail.com (Yuriy M. Kaminskiy) Date: Wed, 30 Mar 2016 00:04:36 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Subject: Re: [dm-crypt] Failed to setup dm-crypt key mapping for device cryptfile. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Nicolas Bock writes: > cryptsetup fails on a new OS install for some reason, and I can't > figure out what is missing. What I see is the following: > > $ dd if=/dev/zero bs=1M count=1 of=cryptfile > $ sudo cryptsetup -v luksFormat cryptfile > > WARNING! > ======== > This will overwrite data on cryptfile irrevocably. > > Are you sure? (Type uppercase yes): YES > Enter passphrase: > Verify passphrase: > Failed to setup dm-crypt key mapping for device cryptfile. ^^^^^^^^^^ > Check that kernel supports aes-xts-plain64 cipher (check syslog for more info). > Command failed with code 22: Failed to setup dm-crypt key mapping for > device cryptfile. ^^^^^^ > Check that kernel supports aes-xts-plain64 cipher (check syslog for more info). > > Neither dmesg nor journalctl shows anything in the logs that seems to > be related to this failure. As far as I can tell all cryptographic API > modules are included in the kernel. How can I go about debugging this > further? I'd guess it wants block device, instead of file. man 8 losetup. Something like this (unchecked): loopdev=`losetup --find --show cryptfile` cryptsetup -v luksFormat $loopdev cryptsetup luksOpen $loopdev cryptfile-container ... cryptsetup luksClose cryptfile-container losetup --detach $loopdev