Problems with cryptsetup higher than OpenWrt 19.07.10

With openWRT 19.07.10 my cryptsetup works fine. With a higher version of openWRT, I can encrypt my storage, but when I do copy some files to the storage, I get a lots of error messages about dm-0 and my files are getting corrupt.
Anbody have the same problems?

Please post the error messages you are getting.

1 Like

There are to many error messages in dmesg. In the moment I dont use openWRT higher than 19.07.10, cause I am fear about that my data getting damaged...

What is hindering you in providing the error messages, even if there are many of them? Without any useful input from your side, troubleshooting this issue will be impossible.

First, I get this message:

root@OpenWrt:~# cryptsetup luksFormat /dev/sda1 
WARNING: Device /dev/sda1 already contains a 'crypto_LUKS' superblock signature.

This will overwrite data on /dev/sda1 irrevocably.

Are you sure? (Type 'yes' in capital letters): YES
Enter passphrase for /dev/sda1: 
Verify passphrase: 
Cannot initialize crypto backend.
Failed to set pbkdf parameters.

I think its a problem with kmod-crypto-iv, coz its not available greater than openWRT 19.07. I will try to build it, by myself...

I have seen similar issues, the problem was in absence of some packet in OpenWRT repository, I do not remember exactly the name. See manual about cryptsetup for OpenWRT.


kmod-crypto-iv no longer exists in the repo, but I can assure you my 21.02.3 LUKS encrypted drive has worked for some months now over both Snapshot and the 21.02 release series.

Your issue relates to Password Based Key Derivation Function pbkdf

passphrase fail?

But what Iam doing wrong?

I want to build it by my own, but how do i clone the right repository? When I clone it, I get openwrt 21.02-SNAPSHOT?

You need 'kmod-crypto-seqiv' and the dependencies of this modul. Then cryptsetup works fine ...

Anybody can update the wiki-page?