Sample Header Ad - 728x90

dmsetup doesn't work with drives over 2TB

1 vote
1 answer
243 views
The original title of this post was about CryptSetup not loading a Truecrypt device with 4096 byte sectors. I managed to dump the Truecrypt header (with the master key) anyway, but now when I try to load it with dmsetup it doesn't work: echo "0 5860533168 crypt aes-xts-plain64 256 /dev/sdh 256" | dmsetup create test device-mapper: resume ioctl on test failed: Invalid argument Command failed It doesn't seem to support size numbers over 2^32 so I tried adding the **sector_size:4096** argument to the table: echo "0 732566646 crypt aes-xts-plain64 256 /dev/sdh 256 sector_size:4096" | dmsetup create test device-mapper: reload ioctl on test failed: Invalid argument Command failed It works if I set the number of sectors to be **under 2TB** (2^32 * 512), but not over. I've tried to replicate the same command in pure cryptsetup, but I don't know how to match the dmsetup table exactly and I can't replicate it. Is there a way to force dmsetup to work with devices over 2TB? Is there a way to pass the master key directly to cryptsetup? This is what I've tried so far, but it decrypts with wrong key: echo | cryptsetup open --type plain /dev/sdh test --offset 256 --cipher aes-xts-plain64 --hash plain --key-size 512
Asked by SurpriseDog (662 rep)
Jun 14, 2019, 05:09 AM
Last activity: Jun 14, 2019, 07:13 PM