libdevmapper incompatible with cryptsetup kernel driver

Bug #64625 reported by Paul Valencourte on 2006-10-08
12
Affects Status Importance Assigned to Milestone
cryptsetup (Ubuntu)
Undecided
Unassigned

Bug Description

I'm trying to encrypt the entirety of my hard drive with the howto posted here: https://help.ubuntu.com/community/EncryptedFilesystemHowto
the command 'sudo cryptsetup -d /dev/urandom create cryptoswap /dev/sda2'
returns this error: "Command failed: Incompatible libdevmapper 1.02.07 (2006-05-11)(compat) and kernel driver"

I am not sure whether this should be posted as a problem with devmapper or cryptsetup, but I figured it would get more attention as a devmapper bug, and that it deserves it, since this affects anyone who wants/needs an encrypted filesystem.

Er, I forgot to mention, this is in the edgy beta. The third one, with all packages fully updated.

Dennis Prochko (wolfsoft) wrote :

I can't encrypt my flash drive too. With error mentioned above. Dapper Drake with all current updates installed.

Lennart Hansen (lahansen) wrote :

Have same problem here, I can't access my encrypted home partition now, which is most unfortunate since thats where all my work is at.. hopefully I can reinstall dapper again and get my data back.

lhansen@lhansen-laptop:~$ sudo cryptsetup create crypt /dev/sda2
Command failed: Incompatible libdevmapper 1.02.07 (2006-05-11)(compat) and kernel driver
lhansen@lhansen-laptop:~$

Ditto
I also cannot use the device mapper with cryptsetup same error

Ok I feel stupid now...
A simple:

sudo modprobe dm-crypt

solves the problem

Daniel (daniel-linux) wrote :

I have the same problem with Feisty fawn and dm-crypt is ok.

Message :
"Incompatible libdevmapper 1.02.08 (2006-07-17)(compat) and kernel driver" (my kernel is 2.6.20-2-generic, but same problem with previous version).

There is a solution at http://www.spinics.net/lists/dm-crypt/msg00051.html, but this is too complicate to use (apparently mkinitramfs doesn't have cryptsetup support).

Daniel (daniel-linux) wrote :

The problem is resolved !

Sometime, complex explanations of experts aren't useful and can conduct to bad way.

In fact, as previous message, simple use of
sudo modprobe aes dm-crypt dm_mod
solves the problems.

Moreover, I'm a new Ubuntu user and I'm not accustomed with sudo: cryptsetup must be use too with sudo.

So with FreeOFTE i now have access to my luks partition under Linux and Windows.

But I don't understand another detail :
this command doesn't work
sudo cryptsetup --cipher aes -s 256 luksFormat /dev/loop0
but this one work fine
sudo cryptsetup --cipher aes --keysize 256 luksFormat /dev/loop0

Same problem with
sudo losetup --encryption aes --keybits 256 --nohashpass /dev/loop0 volume
and
sudo losetup --encryption aes --keybits 256 -N /dev/loop0 volume

Sebastian Kapfer (caci) wrote :

Can this error message be changed? It's kind of misleading. Missing modules and incompatible kernel/userland interfaces are two different things.

Changed in devmapper:
status: Unconfirmed → Confirmed

Hi, I just downloaded Feisty and tried to create root crypto disk with command:
cryptsetup create croot /dev/hda4
(I would then copy the existing root there and rebuilt initrd).

But get the same error:

Command failed: Incompatible libdevmapper 1.02.08 (2006-07-17)(compat) and kernel driver.

Typing the command: sudo modprobe aes dm-crypt dm_mod does NOT solve the problem.

First check to make sure your drive is still HDA and not SDA -- mine
changed when upgrading to 7.04 -- secondly run 'sudo cryptsetup create
croot /dev/hda4' (or sda4) you need root privileges. I just created
one with that command without any problems.

On 4/8/07, Matej Kovačič <email address hidden> wrote:
> Hi, I just downloaded Feisty and tried to create root crypto disk with command:
> cryptsetup create croot /dev/hda4
> (I would then copy the existing root there and rebuilt initrd).
>
> But get the same error:
>
> Command failed: Incompatible libdevmapper 1.02.08 (2006-07-17)(compat)
> and kernel driver.
>
> Typing the command: sudo modprobe aes dm-crypt dm_mod does NOT solve the
> problem.
>
> --
> libdevmapper incompatible with cryptsetup kernel driver
> https://bugs.launchpad.net/bugs/64625
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Matej Kovacic (matej-kovacic) wrote :

Sorry, in fact it was sda4 and I was using sudo, but this does not work.

Reinhard Tartler (siretart) wrote :

cryptsetup (2:1.0.4+svn29-1ubuntu2) gutsy; urgency=low

  * modprobe dm-mod from cryptsetup.functions. (LP: #64625, #91405)

 -- Reinhard Tartler <email address hidden> Tue, 29 May 2007 13:31:39 +0200

Changed in cryptsetup:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers