Problem with cryptsetup

Hi there! I have small home server (based on hp t5540 thin client) with OpenWrt 19.07.3 x86
I'd like to encrypt my hdd, but I ran into a problem with cryptsetup:

cryptsetup -c aes-cbc-essiv -s 128 luksFormat /dev/sda /etc/enc.key

as a result this command I have this error:

device-mapper: remove ioctl on temporary-cryptsetup-14556  failed: No such device or address
device-mapper: table ioctl on   failed: No such device or address

At the same time in dmesg:

[ 3051.797412] device-mapper: table: 253:0: crypt: Error creating IV
[ 3051.797790] device-mapper: ioctl: error adding target to table

Any ideas?

Oh no, it's my stupid mistake! Right command is:

echo "YES" | cryptsetup luksFormat /dev/sda --key-file /etc/enc.key

Sorry for bothering! :blush:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.