From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s5CrK8b_wD4j for ; Wed, 1 Aug 2012 10:39:15 +0200 (CEST) Received: from fallback-in2.mxes.net (fallback-out2.mxes.net [216.86.168.191]) by mail.saout.de (Postfix) with ESMTP for ; Wed, 1 Aug 2012 10:39:15 +0200 (CEST) Received: from mxout-07.mxes.net (mxout-07.mxes.net [216.86.168.182]) by fallback-in1.mxes.net (Postfix) with ESMTP id 7F5F92FDBD8 for ; Wed, 1 Aug 2012 04:32:21 -0400 (EDT) Date: Wed, 1 Aug 2012 09:32:16 +0100 From: Laurence Darby Message-Id: <20120801093216.837cba40.ldarby@tuffmail.com> In-Reply-To: <500E7283.6080406@redhat.com> References: <500E7283.6080406@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [dm-crypt] ioctl missing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Milan Broz Cc: dm-crypt@saout.de, =?ISO-8859-15?Q?Beno=EEt?= Kuhn Milan Broz wrote: > On 07/24/2012 11:23 AM, Beno=EEt Kuhn wrote: >=20 > > My problem is when I start my OS and try to launch the command > > "cryptsetup luksOpen /dev/devicename nameoflocation", it asks me the > > passphrase and after having enter anything (I mean whatever the > > password, if it is good or wrong), I have the following message > > "device-mapper: reload ioctl failde: No such file or directory". >=20 > Please add --debug and post output. >=20 > But I guess you have misconfigured libdevmapper library. > If compiled with udev support, it requires some udev rules to be > installed, other wise it cannnot create device node. >=20 I've got this problem as well after upgrading to linux 3.5, while 3.0.1 works fine, so this is probably bisectable... The full output is: cryptsetup --debug luksOpen /boot/data data # cryptsetup 1.4.3 processing "cryptsetup --debug luksOpen /boot/data # data" Running command luksOpen. # Locking memory. # Allocating crypt device /boot/data context. # Not a block device, using free loop device /dev/loop0. # Trying to open and read device /dev/loop0. # Initialising device-mapper backend, UDEV is enabled. # Detected dm-crypt version 1.11.0, dm-ioctl version 4.22.0. # Trying to load LUKS1 crypt type from device /dev/loop0. # Crypto backend (gcrypt 1.4.6) initialized. # Reading LUKS header of size 1024 from device /dev/loop0 # Timeout set to 0 miliseconds. # Password retry count set to 3. # Password verification disabled. # Iteration time set to 1000 miliseconds. # Activating volume data [keyslot -1] using [none] passphrase. # dm status data OF [16384] # Interactive passphrase entry requested. Enter passphrase for /boot/data:=20 # Trying to open key slot 0 [ACTIVE_LAST]. # Reading key slot 0 area. # DM-UUID is CRYPT-TEMP-temporary-cryptsetup-24275 # Udev cookie 0xd4d0df3 (semid 196609) created # Udev cookie 0xd4d0df3 (semid 196609) incremented # Udev cookie 0xd4d0df3 (semid 196609) incremented # Udev cookie 0xd4d0df3 (semid 196609) assigned to dm_task type 0 with # flags 0xe dm create temporary-cryptsetup-24275 # CRYPT-TEMP-temporary-cryptsetup-24275 OF [16384] dm reload # temporary-cryptsetup-24275 OFW [16384] device-mapper: reload ioctl failed: No such file or directory # Udev cookie 0xd4d0df3 (semid 196609) decremented # Udev cookie 0xd4d0df3 (semid 196609) incremented # Udev cookie 0xd4d0df3 (semid 196609) assigned to dm_task type 2 with # flags 0xe dm remove temporary-cryptsetup-24275 OFW [16384] # temporary-cryptsetup-24275: Stacking NODE_DEL (replaces other stacked # ops) Udev cookie 0xd4d0df3 (semid 196609) decremented # Udev cookie 0xd4d0df3 (semid 196609): Waiting for zero # Udev cookie 0xd4d0df3 (semid 196609) destroyed Failed to setup dm-crypt key mapping for device /dev/loop0. Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for more info). Failed to read from key storage. and dmesg says: [45852.267229] device-mapper: table: 252:0: crypt: Error creating IV [45852.267232] device-mapper: ioctl: error adding target to table Strace of cryptsetup shows: ... 09:18:49.677631 write(7, "Enter passphrase for /boot/data: ", 33Enter passp= hrase for /boot/data: ) =3D 33 09:18:49.677689 ioctl(7, SNDCTL_TMR_CONTINUE or TCSETSF, {c_iflags=3D0x500,= c_oflags=3D0x5, c_cflags=3D0xbf, c_lflags=3D0x8a33, c_line=3D0, c_cc=3D"\x= 03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"= }) =3D 0 09:18:49.677752 read(7, "asdf\n", 512) =3D 6 [NOT my passphrase, same thing= happens either way] 09:18:53.767150 ioctl(7, SNDCTL_TMR_CONTINUE or TCSETSF, {c_iflags=3D0x500,= c_oflags=3D0x5, c_cflags=3D0xbf, c_lflags=3D0x8a3b, c_line=3D0, c_cc=3D"\x= 03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"= }) =3D 0 09:18:53.767224 write(7, "\n", 1 ) =3D 1 09:18:53.767266 close(7) =3D 0 09:18:54.718838 rt_sigaction(SIGINT, {0xb76c43c0, [INT], SA_RESTART}, {SIG_= DFL, [], 0}, 8) =3D 0 09:18:54.718924 open("/dev/loop0", O_RDONLY|O_LARGEFILE) =3D 7 09:18:54.718966 ioctl(7, BLKSSZGET, 0xbf96803c) =3D 0 09:18:54.718992 close(7) =3D 0 09:18:54.719039 open("/dev/urandom", O_RDONLY|O_LARGEFILE) =3D 7 09:18:54.719077 read(7, "\262\277", 2) =3D 2 09:18:54.719114 semget(0xd4dbfb2, 1, IPC_CREAT|IPC_EXCL|0600) =3D 229377 09:18:54.719146 semctl(229377, 0, IPC_64|SETVAL, 0xbf967e44) =3D 0 09:18:54.719177 close(7) =3D 0 09:18:54.719206 semop(229377, {{0, 1, 0}}, 1) =3D 0 09:18:54.719243 open("/dev/loop0", O_RDONLY|O_LARGEFILE) =3D 7 09:18:54.719276 ioctl(7, BLKRAGET, 0xbf967f1c) =3D 0 09:18:54.719300 close(7) =3D 0 09:18:54.719331 brk(0x9d22000) =3D 0x9d22000 09:18:54.719435 ioctl(3, DM_DEV_CREATE, 0x9cfd8c8) =3D 0 09:18:54.719588 brk(0x9d1e000) =3D 0x9d1e000 09:18:54.719630 ioctl(3, DM_TABLE_LOAD, 0x9cfd840) =3D -1 ENOENT (No such f= ile or directory) ... Let me know if I should try bisecting the kernel versions. Regards, Laurence