WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TC 9.0 cryptsetup error  (Read 6540 times)

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
TC 9.0 cryptsetup error
« on: August 12, 2018, 04:00:53 AM »
Hi all TC lovers and makers!

I'm trying to make use of cryptsetup but without any result.
Here is an example:
Code: [Select]
dd if=/dev/zero of=test.img bs=4M count=16
sudo losetup -f test.img
dd if=/dev/urandom of=key.file bs=1 count=256
sudo cryptsetup create myloop /dev/loop54 --key-file key.file
cryptsetup: relocation error: /usr/local/lib/libcryptsetup.so.4: symbol dm_task_get_info, version Base not defined in file libdevmapper.so.1.02 with link time reference

I've tried the same with loopaesOpen and luksOpen (after luksFormat) but with the same error
What I am doing wrong?
Maybe there is another way to get encrypted partition?

Offline maddog

  • Newbie
  • *
  • Posts: 7
Re: TC 9.0 cryptsetup error
« Reply #1 on: August 17, 2018, 02:22:08 PM »
I'm having the same problem.  It worked in TC 6.4.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11520
Re: TC 9.0 cryptsetup error
« Reply #2 on: August 17, 2018, 03:19:51 PM »
Hi maddog
Take a look at this thread an see if it resolves your problem:
http://forum.tinycorelinux.net/index.php/topic,22151.0.html

Offline maddog

  • Newbie
  • *
  • Posts: 7
Re: TC 9.0 cryptsetup error
« Reply #3 on: August 20, 2018, 12:30:36 PM »
Hi Rich,

Thank you for the link.

I removed cryptsetup.tcz and rebooted TC.  I made sure that there are no versions of "libdevmapper" installed.  I then added cryptsetup.tcz onboot and restarted TC.  All references to "libdevmapper" are correct and point to liblvm2 - /usr/local/lib/libdevmapper.so.1.02 -> /tmp/tcloop/liblvm2/usr/local/lib/libdevmapper.so.1.02, etc.

When I attempt to run cryptsetup I still get the following error:

"cryptsetup: relocation error: /usr/local/lib/libcryptsetup.so.4: symbol dm_task_get_info, version Base not defined in file libdevmapper.so.1.02 with link time reference"

Any thoughts?

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: TC 9.0 cryptsetup error
« Reply #4 on: August 20, 2018, 02:19:51 PM »
Hi TC folks!
Core 9.0 cryptsetup 1.6.8 - error with libdevmapper.so
CorePure64 9.0 cryptsetup 1.7.5 (the latest version with support of LUKS1 without LUKS2 support) - does work, but searches for 'blkid' in '/usr/local/sbin' instead of actual location '/sbin'. I've made
Code: [Select]
ln -s /sbin/blkid /usr/local/sbin and this eliminates error, but  it is noob way. You must know the right way :)
And in Core 9.0 I planned to use cryptsetup in plain (not LUKS mode) and did it directly with dmsetup (as a part ov lvm2.tcz), but only creating the above described symlink.
May be it is possible to compile cryptsetup 1.7.5 not only for CorePure64 but for Core too? I will try, but for my level of knowledge and competence it may be considered only as an excercise, I didn't compile any extensions yet.

Offline maddog

  • Newbie
  • *
  • Posts: 7
Re: TC 9.0 cryptsetup error
« Reply #5 on: August 20, 2018, 05:39:29 PM »
Hello all,

As a test I downloaded the "libdevmapper.tcz" and "libdevmapper.tcz.md5.txt" from the 8.x repository and placed them in the onboot.lst file before the "cryptsetup.tcz" -  cryptsetup worked without an error.

It appears that cryptsetup is dependent on the old libdevmapper where liblvm2.tcz is dependent on the new libdevmapper.

I hope that this helps.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: TC 9.0 cryptsetup error
« Reply #6 on: August 21, 2018, 03:37:13 AM »
Hi, maddog!

I've tried your proposal.

Boot TC 9.0

Code: [Select]
wget tinycorelinux.net/8.x/x86/tcz/libdevmapper.{tcz,tcz.md5.txt}
cp libdevmapper.* /mnt/sda1/tce/optional
tce-load -i libdevmapper
tce-load -i cryptsetup

But it doesn't work - cryptsetup hangs. Exactly as I mentioned in http://forum.tinycorelinux.net/index.php/topic,22151.0.html

And such a downgrading of important library seems to be dangerous. Now I use dmsetup with manual patch for "blkid" link as I described above.

What is the right way to solve this problem? Of course I am not one to advice TC developers, but udev has to know actual path to blkid,I think.

And TinyCore is wonderfull, no doubt! :)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
Re: TC 9.0 cryptsetup error
« Reply #7 on: August 21, 2018, 04:04:31 AM »
I think the best solution is probably to pm the maintainer of cryptsetup and request that they recompile it against libdevmapper from llvm2

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: TC 9.0 cryptsetup error
« Reply #8 on: August 21, 2018, 09:18:44 AM »
Thanks for advice, Juanito, and for your efforts on TC too very much :)

But if the only users of cryptsetup are maddog and me, then I don't want to disturb hiro (seems that he is current developer?). Probably there are some other extension needed by more than two freaks :) Maybe one precious moment it will appear, that there are three of our kind? ;) This time may be not so far away!

By the way, sorry for noob question, what does it means
to pm the maintainer
?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11520
Re: TC 9.0 cryptsetup error
« Reply #9 on: August 21, 2018, 09:26:00 AM »
Hi jazzbiker
... By the way, sorry for noob question, what does it means
to pm the maintainer
?
It means to send a personal message. Go here:
http://forum.tinycorelinux.net/index.php?action=mlist;sa=search
Enter  hiro  in the search box. Click on  hiro  in the displayed list. Then on the left side of the screen under  Actions  click
on  Send personal message.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: TC 9.0 cryptsetup error
« Reply #10 on: August 21, 2018, 09:35:52 AM »
Thanks, Rich!

Offline core-fuel

  • Newbie
  • *
  • Posts: 7
Re: TC 9.0 cryptsetup error
« Reply #11 on: October 18, 2018, 02:23:52 PM »
Hi people , sorry for reviving the topic, but has this ever been resolved?  ???

I tried to run cryptsetup and I am running on the exact same problem the other users described above.

Offline jfcolom

  • Newbie
  • *
  • Posts: 1
Re: TC 9.0, 10.0 cryptsetup error
« Reply #12 on: February 15, 2019, 02:12:33 PM »
Hello,

I have tried to run cryptsetup in TC 10.0 and I am running on the exact same problem. Any recommended workaround?

Thank you in advance.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: TC 9.0 cryptsetup error
« Reply #13 on: April 22, 2019, 11:53:12 AM »
Hmm, this was not only my problem, sorry guys.
I solved my problem with dm-crypt ( in lvm2.tcz ).
If someone will need cryptsetup and meet problems, try cryptsetup from CorePure64, as I remember, it worked without any trouble.