[Pkg-cryptsetup-devel] Bug#460409: cryptsetup: Cannot add Key to LUKS partition
Tobias Frost
tobi at coldtobi.de
Sat Jan 12 13:50:16 UTC 2008
Package: cryptsetup
Version: 2:1.0.6~pre1-1
Severity: normal
I tried today to add another key, but cryptsetup fails, telling "Can not
access device".
#cryptsetup isLuks /dev/sda3 && echo it is
it is
(note: cryptsetup output edited, removed salt and uuid)
#cryptsetup luksDump /dev/sda3
LUKS header information for /dev/sda3
Version: 1
Cipher name: aes
Cipher mode: cbc-essiv:sha256
Hash spec: sha1
Payload offset: 1032
MK bits: 128
MK salt: (removed)
MK iterations: 10
UUID: (removed)
Key Slot 0: ENABLED
Iterations: 130
Key material offset: 8
stripes: 4000
Key Slot 1: ENABLED
Iterations: 200478
Key material offset: 136
stripes: 4000
#cryptsetup luksAddKey /dev/sda3
Command failed: Can not access device
I added a strace of the last command. It seems, that with the supplied
parameters, the Open(/dev/sda3) fails.
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.23-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages cryptsetup depends on:
ii dmsetup 2:1.02.24-2 The Linux Kernel Device Mapper use
ii libc6 2.7-5 GNU C Library: Shared libraries
ii libdevmapper1.02.1 2:1.02.24-2 The Linux Kernel Device Mapper use
ii libpopt0 1.10-3 lib for parsing cmdline parameters
ii libuuid1 1.40.4-1 universally unique id library
cryptsetup recommends no packages.
-- no debconf information
-------------- next part --------------
execve("/sbin/cryptsetup", ["cryptsetup", "luksAddKey", "/dev/sda3"], [/* 22 vars */]) = 0
brk(0) = 0x80a1000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f23000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=100032, ...}) = 0
mmap2(NULL, 100032, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f0a000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libpopt.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\22\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=26444, ...}) = 0
mmap2(NULL, 29484, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f02000
mmap2(0xb7f09000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7f09000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libdevmapper.so.1.02.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`1\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=88896, ...}) = 0
mmap2(NULL, 87768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7eec000
mmap2(0xb7f00000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xb7f00000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libuuid.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \20\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=12656, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7eeb000
mmap2(NULL, 15440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ee7000
mmap2(0xb7eea000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7eea000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260e\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1356196, ...}) = 0
mmap2(NULL, 1361520, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d9a000
mmap2(0xb7ee1000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x147) = 0xb7ee1000
mmap2(0xb7ee4000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ee4000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libselinux.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320>\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=83512, ...}) = 0
mmap2(NULL, 88980, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d84000
mmap2(0xb7d98000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0xb7d98000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i686/cmov/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\n\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9684, ...}) = 0
mmap2(NULL, 12412, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d80000
mmap2(0xb7d82000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7d82000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libsepol.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\2204\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=220764, ...}) = 0
mmap2(NULL, 266048, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d3f000
mmap2(0xb7d75000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x35) = 0xb7d75000
mmap2(0xb7d76000, 40768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7d76000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d3e000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d3d000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7d3d6f0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7ee1000, 4096, PROT_READ) = 0
munmap(0xb7f0a000, 100032) = 0
brk(0) = 0x80a1000
brk(0x80c2000) = 0x80c2000
open("/etc/selinux/config", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
statfs64("/selinux", 84, 0xbf8f2590) = -1 ENOENT (No such file or directory)
open("/proc/mounts", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f22000
read(3, "rootfs / rootfs rw 0 0\nnone /sys"..., 1024) = 552
read(3, "", 1024) = 0
close(3) = 0
munmap(0xb7f22000, 4096) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=85987104, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7b3d000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0x14ed) = 0xb7f22000
close(3) = 0
mlockall(MCL_CURRENT|MCL_FUTURE) = 0
open("/dev/sda3", O_RDWR|O_EXCL|O_SYNC|O_DIRECT|O_LARGEFILE) = -1 EBUSY (Device or resource busy)
open("/usr/share/locale/locale.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/cryptsetup-luks.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/cryptsetup-luks.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/cryptsetup-luks.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/cryptsetup-luks.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/cryptsetup-luks.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/cryptsetup-luks.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "Command failed", 14) = 14
write(2, ": Can not access device\n", 24) = 24
exit_group(-15) = ?
More information about the Pkg-cryptsetup-devel
mailing list