[Bug 58102] cryptsetup / LUKS won't work

Joolz joolz at xs4all.nl
Tue Aug 29 13:45:03 UTC 2006


Public bug reported:

Binary package hint: linux-image-2.6.15-26-686

Following this procedure:

http://www.saout.de/tikiwiki/tiki-
index.php?page=EncryptedDeviceUsingLUKS

I can't get LUKS running on a USB stick. I tried this on two different
machines (a three years old desktop and a brand new notebook) with the
latest 686 and 386 kernels. All fail the same (see below). As you can
see, I tried it with a pre-made linux partition and when that failed
with no partitions at all. Maybe a kernel make setting would fix this,
but I don't feel like gentoo-ing my own kernels ;)

Here's what I tried:

################################
kiar at kiar:~ $ /sbin/badblocks -c 10240 -s -w -t random -v /dev/sda
Checking for bad blocks in read-write mode
>From block 0 to 2015232
Testing with random pattern: done                        232
Reading and comparing: done                        232
Pass completed, 0 bad blocks found.
kiar at kiar:~ $ /sbin/fdisk /dev/sda
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by
w(rite)

Command (m for help): p

Disk /dev/sda: 2063 MB, 2063597568 bytes
64 heads, 62 sectors/track, 1015 cylinders
Units = cylinders of 3968 * 512 = 2031616 bytes

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1015, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1015, default 1015):
Using default value 1015

Command (m for help): p

Disk /dev/sda: 2063 MB, 2063597568 bytes
64 heads, 62 sectors/track, 1015 cylinders
Units = cylinders of 3968 * 512 = 2031616 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1015     2013729   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 13: Permission denied.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
kiar at kiar:~ $ cryptsetup --verbose --verify-passphrase luksFormat /dev/sda1

WARNING!
========
This will overwrite data on /dev/sda1 irrevocably.

Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase:
Verify passphrase:
Failed to setup dm-crypt key mapping.
Check kernel for support for the aes-cbc-essiv:sha256 cipher spec and verify that /dev/sda1 contains at least 133 sectors.
Failed to write to key storage.
kiar at kiar:~ $ lsmod | grep sha
sha256                 11168  0
sha512                 10080  0
kiar at kiar:~ $ cat /proc/crypto
name         : md5
module       : kernel
type         : digest
blocksize    : 64
digestsize   : 16

name         : sha384
module       : sha512
type         : digest
blocksize    : 96
digestsize   : 48

name         : sha512
module       : sha512
type         : digest
blocksize    : 128
digestsize   : 64

name         : sha256
module       : sha256
type         : digest
blocksize    : 64
digestsize   : 32

name         : aes
module       : aes
type         : cipher
blocksize    : 16
min keysize  : 16
max keysize  : 32

kiar at kiar:~ $ fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 2063 MB, 2063597568 bytes
64 heads, 62 sectors/track, 1015 cylinders
Units = cylinders of 3968 * 512 = 2031616 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1015     2013729   83  Linux

Command (m for help): d
Selected partition 1
Command (m for help): p

Disk /dev/sda: 2063 MB, 2063597568 bytes
64 heads, 62 sectors/track, 1015 cylinders
Units = cylinders of 3968 * 512 = 2031616 bytes

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 13: Permission denied.
The kernel still uses the old table.
The new table will be used at the next reboot.
kiar at kiar:~ $ cryptsetup --verbose --verify-passphrase luksFormat /dev/sda

WARNING!
========
This will overwrite data on /dev/sda irrevocably.

Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase:
Verify passphrase:
Failed to setup dm-crypt key mapping.
Check kernel for support for the aes-cbc-essiv:sha256 cipher spec and verify that /dev/sda contains at least 133 sectors.
Failed to write to key storage.
kiar at kiar:~ $ uname -a
Linux kiar 2.6.15-26-686 #1 SMP PREEMPT Thu Aug 3 03:13:28 UTC 2006 i686 GNU/Linux

** Affects: linux-source-2.6.15 (Ubuntu)
     Importance: Untriaged
         Status: Unconfirmed

-- 
cryptsetup / LUKS won't work
https://launchpad.net/bugs/58102




More information about the kernel-bugs mailing list