This is the old SliTaz forum - Please use the main forum.slitaz.org

SOLVED why cryptsetup does not support libdevmapper?
  • erniaernia March 2010
    I wanted to encrypt my home directory in transparent mode with luks, but cryptsetup gave me this error:
    Command failed: No setup backend available
    .
    Googling i think to have find out that cryptsetup was compiled without the
    --enable-libdevmapper
    option.
    Converting the Archlinux cryptsetup package in tazpkg format and installing it let me do all the required step to have my home directory encrypted with luks.
    Is there any reason to not enable libdevmapper in cryptsetup?
  • jozeejozee March 2010
    I am not sure what you mean. libdevmapper is a dependency for cryptsetup for almost 2 years now: http://hg.slitaz.org/wok/rev/e7272bdeb3bd

    Maybe you update your system.
  • erniaernia March 2010
    i'm using slitaz cooking 20100221. cryptsetup requires libdevmapper but give me this error:

    root@slitaz:/home/tux# cryptsetup luksOpen /dev/disk/by-uuid/8c02a1c4-dac1-4385-9d69-ef6d5faf36eb cryptohome
    Command failed: No setup backend available

    that, if i get it right, means that cryptsetup can't use libdevmapper because have been built without libdevmapper support:
    http://www.linuxquestions.org/questions/linux-security-4/cryptsetup-luks-error-491282/
    archlinux's cryptsetup works right.
  • jozeejozee March 2010
    Hi ernia,

    I am not the maintainer for this pkg but crypstsetup is definitely built with libdevmapper support. There must be some other problem like udev.

    I have updated the pkg now and use lvms2 pkg to split libdevmapper as per the new guidelines on device_mapper site.

    http://hg.slitaz.org/wok/rev/efd761ce4594
    http://hg.slitaz.org/wok/rev/92bad8adb911

    Can you help to see if this work? There is also "udev" rules now. Let me know if you find any difference in Arch's pkg and slitaz pkg. Would you be able to help debug this problem?

    Thanks
  • erniaernia March 2010
    The problem is still present after tazpkg upgrade. I would like to help you to debug the problem but i'm not a developer and i think i'm not smart enough to help you. i just install from slitaz repositories linux-md and cryptsetup with all the dependencies, modprobe dm-crypt and try the command above. after the error i remove cryptsetup, download the archlinux cryptsetup from http://mi.mirror.garr.it/mirrors/archlinux/core/os/i686/cryptsetup-1.1.0-2-i686.pkg.tar.gz and then convert and install it with tazpkg convert and tazpkg install. after this procedure the command works, so i thought that the problem was limited to the crypsetup package. you can find more info about archlinux cryptsetup here: http://www.archlinux.org/packages/core/i686/cryptsetup/
    if you want me to make some more test let me know.
  • LineaLinea March 2010
    Hi guys, I did discover this a couple of months ago and sent some code to the devs for mountbox, but forgot to update the receipt.

    My bad.

    Paul

    http://hg.slitaz.org/wok/rev/e1cbfcb07467
  • GokhlayehGokhlayeh March 2010
    Hi,

    I don't know how cryptsetup is supposed to be compiled, but it's a fact that it's compiled without the option --enable-libdevmapper :

    compile_rules()
    {
    cd $src
    ./configure --prefix=/usr $CONFIGURE_ARGS &&
    make &&
    make DESTDIR=$PWD/_pkg install
    }


    EDIT : I just see you're link Paul. I guess it's fixed now
  • jozeejozee March 2010
    Yes, this is strange. It should auto-enable the feature once it detects *-dev file but it does not. There is no compile option "--enable-libdevmapper" in "configure -h".

    Even Arch's PKGBUILD does not enable it and yet it works:
    http://repos.archlinux.org/wsvn/packages/cryptsetup/repos/core-i686/PKGBUILD

    Anyway's I think its ok. Can try upgrading to see if it works?
  • erniaernia March 2010
    I've tested it right now, it works, but it seems that libreadline (readline) is required to open luks partitions and not installed as a dependency. It gives me an "error loading libreadline.so.6" which disappear installing the readline package.
    Thanks

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social