[dm-crypt] LUKS1 devmapper device mount issue

Amith Kumar Ramachandra amitnr at gmail.com
Sun Apr 10 23:04:25 CEST 2016


Hi Milan!

>> if dmestup works, please show the exact difference in mapping table.
Checked again. dmsetup does work and the devmapper device mounts fine
The mapping table from with dmsetup created device is

#dmsetup table
volume1: 0 15659008 crypt aes-cbc-essiv:sha256
000000000000000000000000000000000 179:33 0

cryptsetup created device doesn't mount. Here is the mapper table.
data: 0 15654912 crypt aes-cbc-essiv:sha256
0000000000000000000000000000000000000000000000000000000000000000 0 179:33
4096

>>Could you try to create exact mapping table as LUKS does?
Yes, I did. And the same table with dmsetup does mount the device. Here's  what
I did.

# cryptsetup -v -y -c "aes-cbc-essiv:sha256" luksFormat /dev/mmcblk1p1
--batch-mode
#echo 0 15654912 crypt aes-cbc-essiv:sha256
0123456789abcdef0123456789abcdef11111111111111111111111111111111 0 179:33
4096 | dmsetup create data
#dmsetup table --showkeys
data: 0 15654912 crypt aes-cbc-essiv:sha256
0123456789abcdef0123456789abcdef11111111111111111111111111111111 0 179:33
4096

You can see the table does match the cryptsetup one...

#mke2fs /devmapper/data
#mount /dev/mapper/data /mnt
#mount
....
....
/dev/mapper/data on /mnt type ext2 (rw,relatime)
And device is mounted.

>>use new cryptsetup versision (1.7.1)
I could switch and check I suppose. But here is one more data point ...

My environment where I run into issue with cryptsetup is on *Yocto root
file system, *an embedded distribution of Linux. However, when I switch to
Ubuntu 15.04 RFS(which is an alternate version I also boot sometimes) with
the same linux kernel, cryptsetup binary and libcryptsetup.so as Yocto, the
cryptsetup devmapper device mounts fine.
I then started narrowing down the differences b/w yocto and ubuntu in terms
of libraries etc... then I found that if I use the *systemd *executable in
/usr/lib/system/systemd from Ubuntu RFS in the Yocto, all yocto mount
problems go away. (not sure what systemd has got to do with cryptsetup and
mount)

If you are still with me, does this tell you anything at all? :)

Thanks,
Amith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20160410/c30acd0c/attachment.html>


More information about the dm-crypt mailing list