libdevmapper incompatible with cryptsetup kernel driver

Bug #64625 reported by Paul Valencourte
12
Affects Status Importance Assigned to Milestone
cryptsetup (Ubuntu)
Fix Released
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.

Revision history for this message
Paul Valencourte (pacifistrevolutionary) wrote :

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

Revision history for this message
Dennis Prochko (wolfsoft) wrote :

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

Revision history for this message
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:~$

Revision history for this message
Alan B. Clements (alan-clements) wrote :

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

Revision history for this message
Alan B. Clements (alan-clements) wrote :

Ok I feel stupid now...
A simple:

sudo modprobe dm-crypt

solves the problem

Revision history for this message
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).

Revision history for this message
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

Revision history for this message
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
Revision history for this message
Matej Kovacic (matej-kovacic) wrote : libdevmapper incompatible with cryptsetup kernel driver in Feisty

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.

Revision history for this message
Alan B. Clements (alan-clements) wrote : Re: [Bug 64625] libdevmapper incompatible with cryptsetup kernel driver in Feisty

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.
>

Revision history for this message
Matej Kovacic (matej-kovacic) wrote :

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

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.