Skip to contentSkip to conversation

Cryptsetup using loop device makes it stop

dm-crypt Clément Hertling (Wxcafé) 3 participants 5 messages May 27, 2013 – May 29, 2013 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw
Quoted 13 lines · Milan Broz
Quoted 6 lines · Clément Hertling (Wxcafé)

Well i'd love this to work, but i have that in my .config

CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_CRYPTOLOOP=y

and it still doesn't work. I guess loopdev is in my kernel.

cryptoloop option is not important, the first one is enough.

What is your kernel version and arch?
(I should add this to cryptsetup debug output :)

Quoted 7 lines

1) try it in two steps:

losetup /dev/loop0 crypto.img
cryptsetup luksOpen /dev/loop0 crypto

Does it work this way?

So i tried doing it this way, but no luck, I'm getting the same error with cryptsetup.

Quoted 2 lines

2) try last stable cryptsetup 1.6.1, does it help?

After trying with 1.6.1, i'm getting a different error :

# cryptsetup 1.6.1 processing "cryptsetup luksOpen crypto.img crypto
# --debug"
# Running command open.
# Locking memory.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating crypt device crypto.img context.
# Trying to open and read device crypto.img.
# Initialising device-mapper backend library.
# Trying to load LUKS1 crypt type from device crypto.img.
# Crypto backend (gcrypt 1.5.0) initialized.
# Reading LUKS header of size 1024 from device crypto.img
# Releasing crypt device crypto.img context.
# Releasing device-mapper backend.
# Unlocking memory.
Command failed with code 5: Input/output error
Quoted 4 lines

If it still doesn't work, please use cryptsetup 1.6.1 and send (me or to the list) output of:

uname -a

Linux nuada-airgetlam 3.9.0-wxcafe+ #20 SMP Mon May 27 12:37:08 CEST 2013 x86_64 GNU/Linux
( it's my custom kernel )

Quoted 1 line

lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk

├─sda1   8:1    0  14.7G  0 part /
├─sda2   8:2    0   1.1G  0 part /boot
├─sda3   8:3    0  20.5G  0 part /usr
└─sda4   8:4    0 196.6G  0 part 
Quoted 1 line

dmsetup table

No devices found

Quoted 1 line

strace cryptsetup luksOpen crypto.img crypto --debug

execve("/usr/sbin/cryptsetup", ["cryptsetup", "luksOpen", "crypto.img", "crypto", "--debug"], [/* 20 vars */]) = 0
brk(0) = 0x24b5000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffad9718000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/home/wxcafe/local/opt/lib/tls/x86_64/libcryptsetup.so.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/home/wxcafe/local/opt/lib/tls/x86_64", 0x7fff4c5dc780) = -1 ENOENT (No such file or directory) open("/home/wxcafe/local/opt/lib/tls/libcryptsetup.so.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/home/wxcafe/local/opt/lib/tls", 0x7fff4c5dc780) = -1 ENOENT (No such file or directory) open("/home/wxcafe/local/opt/lib/x86_64/libcryptsetup.so.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/home/wxcafe/local/opt/lib/x86_64", 0x7fff4c5dc780) = -1 ENOENT (No such file or directory) open("/home/wxcafe/local/opt/lib/libcryptsetup.so.4", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220J\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=598792, ...}) = 0
mmap(NULL, 2239072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffad92d6000 mprotect(0x7ffad92f8000, 2093056, PROT_NONE) = 0
mmap(0x7ffad94f7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21000) = 0x7ffad94f7000
close(3) = 0
open("/home/wxcafe/local/opt/lib/libpopt.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=93235, ...}) = 0
mmap(NULL, 93235, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffad9701000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpopt.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P(\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=52296, ...}) = 0
mmap(NULL, 2147568, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffad90c9000 mprotect(0x7ffad90d4000, 2097152, PROT_NONE) = 0
mmap(0x7ffad92d4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb000) = 0x7ffad92d4000
close(3) = 0
open("/home/wxcafe/local/opt/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\33\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1741232, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffad9700000
mmap(NULL, 3853376, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffad8d1c000 mprotect(0x7ffad8ec0000, 2093056, PROT_NONE) = 0

mmap(0x7ffad90bf000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a3000) = 0x7ffad90bf000
mmap(0x7ffad90c5000, 15424, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffad90c5000

close(3) = 0
open("/home/wxcafe/local/opt/lib/libuuid.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\27\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=18840, ...}) = 0
mmap(NULL, 2113976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffad8b17000 mprotect(0x7ffad8b1b000, 2093056, PROT_NONE) = 0
mmap(0x7ffad8d1a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7ffad8d1a000
close(3) = 0
open("/home/wxcafe/local/opt/lib/libdevmapper.so.1.02.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdevmapper.so.1.02.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=229808, ...}) = 0
mmap(NULL, 2329296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffad88de000 mprotect(0x7ffad8913000, 2093056, PROT_NONE) = 0
mmap(0x7ffad8b12000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x34000) = 0x7ffad8b12000 mmap(0x7ffad8b16000, 2768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffad8b16000
close(3) = 0
open("/home/wxcafe/local/opt/lib/libgcrypt.so.11", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libgcrypt.so.11", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\207\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=516128, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffad96ff000 mmap(NULL, 2612480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffad8660000 mprotect(0x7ffad86da000, 2097152, PROT_NONE) = 0
mmap(0x7ffad88da000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7a000) = 0x7ffad88da000
close(3) = 0
open("/home/wxcafe/local/opt/lib/libselinux.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260f\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=126232, ...}) = 0
mmap(NULL, 2226160, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffad8440000 mprotect(0x7ffad845e000, 2093056, PROT_NONE) = 0

mmap(0x7ffad865d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d000) = 0x7ffad865d000
mmap(0x7ffad865f000, 2032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffad865f000

close(3) = 0
open("/home/wxcafe/local/opt/lib/libudev.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libudev.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0004\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=59992, ...}) = 0
mmap(NULL, 2155216, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffad8231000 mprotect(0x7ffad823e000, 2097152, PROT_NONE) = 0
mmap(0x7ffad843e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd000) = 0x7ffad843e000
close(3) = 0
open("/home/wxcafe/local/opt/lib/libgpg-error.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libgpg-error.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\t\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=14112, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffad96fe000 mmap(NULL, 2109384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffad802e000 mprotect(0x7ffad8031000, 2093056, PROT_NONE) = 0
mmap(0x7ffad8230000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7ffad8230000
close(3) = 0
open("/home/wxcafe/local/opt/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\16\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=14640, ...}) = 0
mmap(NULL, 2109720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffad7e2a000 mprotect(0x7ffad7e2d000, 2093056, PROT_NONE) = 0
mmap(0x7ffad802c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7ffad802c000
close(3) = 0
open("/home/wxcafe/local/opt/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000#\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=31752, ...}) = 0
mmap(NULL, 2128888, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffad7c22000 mprotect(0x7ffad7c29000, 2093056, PROT_NONE) = 0
mmap(0x7ffad7e28000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7ffad7e28000
close(3) = 0
open("/home/wxcafe/local/opt/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@l\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=130971, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffad96fd000 mmap(NULL, 2208656, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffad7a06000 mprotect(0x7ffad7a1d000, 2093056, PROT_NONE) = 0
mmap(0x7ffad7c1c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7ffad7c1c000 mmap(0x7ffad7c1e000, 13200, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffad7c1e000
close(3) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffad96fc000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffad96fa000

arch_prctl(ARCH_SET_FS, 0x7ffad96fa800) = 0
mprotect(0x7ffad90bf000, 16384, PROT_READ) = 0
mprotect(0x7ffad7c1c000, 4096, PROT_READ) = 0
mprotect(0x7ffad7e28000, 4096, PROT_READ) = 0
mprotect(0x7ffad802c000, 4096, PROT_READ) = 0
mprotect(0x7ffad843e000, 4096, PROT_READ) = 0
mprotect(0x7ffad865d000, 4096, PROT_READ) = 0
mprotect(0x7ffad88da000, 4096, PROT_READ) = 0
mprotect(0x7ffad8b12000, 4096, PROT_READ) = 0
mprotect(0x7ffad8d1a000, 4096, PROT_READ) = 0
mprotect(0x7ffad92d4000, 4096, PROT_READ) = 0
mprotect(0x7ffad971a000, 4096, PROT_READ) = 0

munmap(0x7ffad9701000, 93235)           = 0
set_tid_address(0x7ffad96faad0)         = 15213
set_robust_list(0x7ffad96faae0, 0x18)   = 0

rt_sigaction(SIGRTMIN, {0x7ffad7a0c7a0, [], SA_RESTORER|SA_SIGINFO, 0x7ffad7a15210}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7ffad7a0c820, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7ffad7a15210}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
brk(0) = 0x24b5000
brk(0x24d6000) = 0x24d6000
statfs("/sys/fs/selinux", {f_type=0xf97cff8c, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0 statfs("/sys/fs/selinux", {f_type=0xf97cff8c, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0 stat("/sys/fs/selinux", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1607632, ...}) = 0
mmap(NULL, 1607632, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffad9571000
close(3) = 0
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2502, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffad9717000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2502

read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7ffad9717000, 4096)            = 0

open("/home/wxcafe/local/opt/share/locale/en_US/LC_MESSAGES/cryptsetup.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/home/wxcafe/local/opt/share/locale/en/LC_MESSAGES/cryptsetup.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 4), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffad9717000
write(1, "# cryptsetup 1.6.1 processing \"c"..., 78# cryptsetup 1.6.1 processing "cryptsetup luksOpen crypto.img crypto --debug"
) = 78
write(1, "# Running command open.\n", 24# Running command open.
) = 24
write(1, "# Locking memory.\n", 18# Locking memory.
) = 18
mlockall(MCL_CURRENT|MCL_FUTURE) = 0
getpriority(PRIO_PROCESS, 0) = 20
setpriority(PRIO_PROCESS, 0, 4294967278) = 0
write(1, "# Installing SIGINT/SIGTERM hand"..., 37# Installing SIGINT/SIGTERM handler.
) = 37
rt_sigaction(SIGINT, {0x404cf0, [], SA_RESTORER, 0x7ffad8d51310}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0x404cf0, [], SA_RESTORER, 0x7ffad8d51310}, NULL, 8) = 0
write(1, "# Unblocking interruption on sig"..., 37# Unblocking interruption on signal.
) = 37
rt_sigprocmask(SIG_UNBLOCK, [INT TERM], NULL, 8) = 0
write(1, "# Allocating crypt device crypto"..., 46# Allocating crypt device crypto.img context.
) = 46
write(1, "# Trying to open and read device"..., 45# Trying to open and read device crypto.img.
) = 45
open("crypto.img", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
close(3) = 0
write(1, "# Initialising device-mapper bac"..., 46# Initialising device-mapper backend library.
) = 46
write(1, "# Trying to load LUKS1 crypt typ"..., 58# Trying to load LUKS1 crypt type from device crypto.img.
) = 58
open("/dev/urandom", O_RDONLY) = 3
open("/dev/random", O_RDONLY|O_NONBLOCK) = 4
access("/etc/gcrypt/fips_enabled", F_OK) = -1 ENOENT (No such file or directory)
open("/proc/sys/crypto/fips_enabled", O_RDONLY) = -1 ENOENT (No such file or directory)
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffad9713000
getuid() = 0
mlock(0x7ffad9713000, 16384) = 0
write(1, "# Crypto backend (gcrypt 1.5.0) "..., 45# Crypto backend (gcrypt 1.5.0) initialized.
) = 45
write(1, "# Reading LUKS header of size 10"..., 58# Reading LUKS header of size 1024 from device crypto.img
) = 58
open("crypto.img", O_RDONLY|O_SYNC|O_DIRECT|0x100000) = 5
open("crypto.img", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
close(6) = 0
fstatfs(5, {f_type=0x9123683e, f_bsize=4096, f_blocks=51529216, f_bfree=33020322, f_bavail=32622212, f_files=0, f_ffree=0, f_fsid={-1287500829, -513623692}, f_namelen=255, f_frsize=4096}) = 0 fstat(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0

read(5, "", 0)                          = 0
read(5, "", 4096)                       = 0
close(5)                                = 0

write(1, "# Releasing crypt device crypto."..., 45# Releasing crypt device crypto.img context. ) = 45
write(1, "# Releasing device-mapper backen"..., 35# Releasing device-mapper backend. ) = 35
write(1, "# Unlocking memory.\n", 20# Unlocking memory.
) = 20
munlockall() = 0
setpriority(PRIO_PROCESS, 0, 0) = 0
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, "Command failed with code 5", 26Command failed with code 5) = 26
write(2, ": Input/output error\n", 21: Input/output error
) = 21
exit_group(1) = ?

Quoted 3 lines

Thanks,
Milan

Thank you for your help

Quoted 4 lines

_______________________________________________
dm-crypt mailing list
[email protected]
http://www.saout.de/mailman/listinfo/dm-crypt

----- End forwarded message -----

#1 lore raw
Quoted 5 lines · Clément Hertling (Wxcafé)

open("crypto.img", O_RDONLY|O_SYNC|O_DIRECT|0x100000) = 5 fstat(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0

read(5, "", 0)                          = 0
read(5, "", 4096)                       = 0
close(5)                                = 0

This look like file crypto.img is empty, IOW file of zero size.

Please check it (also fsck filesystem etc.)

Milan

#2 lore raw

Looks like the /dev/loop* files are all 0 bit :

$ du /dev/loop*
0		/dev/loop0
0		/dev/loop1
0		/dev/loop2
0		/dev/loop3
0		/dev/loop4
0		/dev/loop5
0		/dev/loop6
0		/dev/loop7
0		/dev/loop-control

In the meantime, all the device files for my primary hard drive are also 0 bit, and they mount alright :

$ du /dev/sda*
0		/dev/sda
0		/dev/sda1
0		/dev/sda2
0		/dev/sda3
0		/dev/sda4

Looks like it's normal.
fsck-ing my system partition didn't show any meaningful errors.

Thanks for your help.

Signature · 3 lines
Clément Hertling (Wxcafe)
------      ------
Sent from my netbook's cyberspace
Quoted 18 lines · Milan Broz
Quoted 5 lines · Clément Hertling (Wxcafé)

open("crypto.img", O_RDONLY|O_SYNC|O_DIRECT|0x100000) = 5 fstat(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0

read(5, "", 0)                          = 0
read(5, "", 4096)                       = 0
close(5)                                = 0

This look like file crypto.img is empty, IOW file of zero size.

Please check it (also fsck filesystem etc.)

Milan
_______________________________________________
dm-crypt mailing list
[email protected]
http://www.saout.de/mailman/listinfo/dm-crypt

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Alright. My image file was 0b too. I don't know how this happened, and I'm very sorry I took so much of your time for this. Thanks for your help, though, it works now.

Signature · 3 lines
Clément Hertling (Wxcafe)
------      ------
Sent from my netbook's cyberspace
Quoted 5 lines · Milan Broz

just use ls and see file size of your image file

Quoted 2 lines · Clément Hertling (Wxcafé)

I don't know how to check for it, sorry. Could you indicate me how?

#7 lore raw

Don't worry. Even if it seems stupid in retrospect, these things happen even to people with a lot of experience.

Arno

Quoted 24 lines · Clément Hertling (Wxcafé)

Alright. My image file was 0b too. I don't know how this happened, and I'm very sorry I took so much of your time for this. Thanks for your help, though, it works now.

Signature · 3 lines
Clément Hertling (Wxcafe)
------      ------
Sent from my netbook's cyberspace
Quoted 5 lines · Milan Broz

just use ls and see file size of your image file

Quoted 2 lines · Clément Hertling (Wxcafé)

I don't know how to check for it, sorry. Could you indicate me how?

_______________________________________________
dm-crypt mailing list
[email protected]
http://www.saout.de/mailman/listinfo/dm-crypt

Signature · 7 lines
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: [email protected]
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
There are two ways of constructing a software design: One way is to make it
so simple that there are obviously no deficiencies, and the other way is to
make it so complicated that there are no obvious deficiencies. The first
method is far more difficult.  --Tony Hoare