Hi everyone!
After a few successful projects with piCore 8 and 9, I'm now trying to set up a file server using piCore 9.0.3. In order to encrypt the personal files on the storage device, I usually rely on cryptsetup / LUKS.
Since I couldn't find an extension providing cryptsetup in the 9.x repo, I've compiled cryptsetup and created a new extension.
There wasn't a problem during compilation and cryptsetup starts without complaints after being "inserted" into the system using tce-load. But after entering the passphrase for formatting or creating an encrypted device, the program seems to get caught in an endless loop.
I've already tried different versions of cryptsetup (1.7.5 and 2.0.0, the latter needed an additional library for luks2: libargon2) and different versions of piCore (9.0.3 and 8.1.5), but each combination shows the same behavior.
I've also compiled cryptsetup with debug symbols and attached gdb to the running process to see where it gets stuck. The backtrace shows that it's locked somewhere in libdevmapper.
I've also been experiencing problems when using losetup to attach a loop device to a file:
dd if=/dev/zero of=test.img bs=1M count=128
chmod 666 test.img
sudo losetup -f test.img
just tells me that it can't find that image file.
So now I'm wondering if there are any known issues with the device mapper in piCore? I suppose it should work flawlessly, because all the extensions are installed using loop devices...
Btw, I've tried to use cryptsetup on Raspbian (using the same setup: Pi + external harddisk) and that worked just fine. I've even created an extension for piCore containing Raspbian's cryptsetup binary along with the required libraries. This one also hung after entering the passphrase, so I really don't think it's a cryptsetup issue...
Any input on that issue would be greatly appreciated!
Best regards
Tim