All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] reinstallation
@ 2009-08-11 13:40 Rainer Maier
  2009-08-11 14:01 ` Hannes Erven
  0 siblings, 1 reply; 16+ messages in thread
From: Rainer Maier @ 2009-08-11 13:40 UTC (permalink / raw)
  To: dm-crypt

Hi all,
I had LUKS installed on my old raid5 system (via 3ware - 9500S-LP4).
Then the PC broke and I installed my Debian on a new one.
The raid controller also moved and works again.
The raid system still contains the LUKS encrypted partition.
How can I reinstall LUKS on my new Debian (Lenny)?

Any hints or tutorials ?

I scanned the internet, but I didn't find a tutorial I would trust.
I am also afraid to damage the data.
The unencrypted Data on the 2nd. raid partition is very valuable to me.

Thanks.
Rainer

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
  2009-08-11 13:40 [dm-crypt] reinstallation Rainer Maier
@ 2009-08-11 14:01 ` Hannes Erven
  2009-08-11 21:25   ` RaMaier
  0 siblings, 1 reply; 16+ messages in thread
From: Hannes Erven @ 2009-08-11 14:01 UTC (permalink / raw)
  To: Rainer Maier; +Cc: dm-crypt

Hi Rainer,


> How can I reinstall LUKS on my new Debian (Lenny)?

I guess the debian (and thus cryptsetup) installations on your old
machine weren't that up to date, right?

With the new debian lenny, you don't need to install anything: LUKS is
already included in the default cryptsetup package you should already
have installed (http://packages.debian.org/lenny/cryptsetup ).

From http://code.google.com/p/cryptsetup/:
"The former version of cryptsetup only had low-level operations for
dm-crypt ready, and around version cryptsetup-luks 1.0.5 was renamed to
be the official version of cryptsetup. "

You still might have to change your old scripts, if you have some, to
just call cryptsetup instead of cryptsetup-luks .


HTH, best regards

	-hannes

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
  2009-08-11 14:01 ` Hannes Erven
@ 2009-08-11 21:25   ` RaMaier
  2009-08-11 22:06     ` Moji
       [not found]     ` <20090811214229.GA4796@tansi.org>
  0 siblings, 2 replies; 16+ messages in thread
From: RaMaier @ 2009-08-11 21:25 UTC (permalink / raw)
  To: Hannes Erven, dm-crypt

Hi Hannes,
in the documents I keep. I found that I had encrypted /dev/sda2. The procedure I recorded was:
umount /dev/sda2
cryptsetup luksFormat /dev/sda2
cryptsetup luksOpen /dev/sda2 tresor
mkfs.ext3 /dev/mapper/tresor
mount /dev/mapper/tresor /tresor

What will happen if I repeat the steps ?
Should I just leave the mkfs.ext3 out ?
Would I be able to access my old data again ?
What does lufsFormat really do ? Format the partition ?
As I staded the data is pretty valuable to me.

thanks for your help.
Best regards
Rainer


-------- Original-Nachricht --------
> Datum: Tue, 11 Aug 2009 16:01:56 +0200
> Von: Hannes Erven <h.e@gmx.at>
> An: Rainer Maier <RaMaier@gmx.de>
> CC: dm-crypt@saout.de
> Betreff: Re: [dm-crypt] reinstallation

> Hi Rainer,
> 
> 
> > How can I reinstall LUKS on my new Debian (Lenny)?
> 
> I guess the debian (and thus cryptsetup) installations on your old
> machine weren't that up to date, right?
> 
> With the new debian lenny, you don't need to install anything: LUKS is
> already included in the default cryptsetup package you should already
> have installed (http://packages.debian.org/lenny/cryptsetup ).
> 
> >>From http://code.google.com/p/cryptsetup/:
> "The former version of cryptsetup only had low-level operations for
> dm-crypt ready, and around version cryptsetup-luks 1.0.5 was renamed to
> be the official version of cryptsetup. "
> 
> You still might have to change your old scripts, if you have some, to
> just call cryptsetup instead of cryptsetup-luks .
> 
> 
> HTH, best regards
> 
> 	-hannes
> 
> 
> 
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
  2009-08-11 21:25   ` RaMaier
@ 2009-08-11 22:06     ` Moji
  2009-08-11 22:40       ` RaMaier
       [not found]     ` <20090811214229.GA4796@tansi.org>
  1 sibling, 1 reply; 16+ messages in thread
From: Moji @ 2009-08-11 22:06 UTC (permalink / raw)
  To: dm-crypt

I do not entirely understand your question, so I apologize if my answer
is not what you are looking for.

If you repeated those steps then any information on /dev/sda2 will be
lost forever.

"luksFormat" writes the luks header information, that includes the key
that decrypts the rest of the partition(device). If there is an old key
it will write over it making any old data on that luks partition
effectively unrecoverable.

"luksOpen" uses your supplied key to decrypt the device key stored in
the header information and then maps it to /dev/mapper/.

If I understand your original post, the "/dev/sda2" is currently
unencrypted data? If that is the case then you MUST copy that data over
to another device while you set up then encrypted partition, then
transfer it back, as the steps you listed will erase your old partition.

-MJ

RaMaier@gmx.de wrote:
> Hi Hannes,
> in the documents I keep. I found that I had encrypted /dev/sda2. The procedure I recorded was:
> umount /dev/sda2
> cryptsetup luksFormat /dev/sda2
> cryptsetup luksOpen /dev/sda2 tresor
> mkfs.ext3 /dev/mapper/tresor
> mount /dev/mapper/tresor /tresor
> 
> What will happen if I repeat the steps ?
> Should I just leave the mkfs.ext3 out ?
> Would I be able to access my old data again ?
> What does lufsFormat really do ? Format the partition ?
> As I staded the data is pretty valuable to me.
> 
> thanks for your help.
> Best regards
> Rainer
> 
> 
> -------- Original-Nachricht --------
>> Datum: Tue, 11 Aug 2009 16:01:56 +0200
>> Von: Hannes Erven <h.e@gmx.at>
>> An: Rainer Maier <RaMaier@gmx.de>
>> CC: dm-crypt@saout.de
>> Betreff: Re: [dm-crypt] reinstallation
> 
>> Hi Rainer,
>>
>>
>>> How can I reinstall LUKS on my new Debian (Lenny)?
>> I guess the debian (and thus cryptsetup) installations on your old
>> machine weren't that up to date, right?
>>
>> With the new debian lenny, you don't need to install anything: LUKS is
>> already included in the default cryptsetup package you should already
>> have installed (http://packages.debian.org/lenny/cryptsetup ).
>>
>>> >From http://code.google.com/p/cryptsetup/:
>> "The former version of cryptsetup only had low-level operations for
>> dm-crypt ready, and around version cryptsetup-luks 1.0.5 was renamed to
>> be the official version of cryptsetup. "
>>
>> You still might have to change your old scripts, if you have some, to
>> just call cryptsetup instead of cryptsetup-luks .
>>
>>
>> HTH, best regards
>>
>> 	-hannes
>>
>>
>>
>> _______________________________________________
>> dm-crypt mailing list
>> dm-crypt@saout.de
>> http://www.saout.de/mailman/listinfo/dm-crypt
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
       [not found]     ` <20090811214229.GA4796@tansi.org>
@ 2009-08-11 22:25       ` RaMaier
       [not found]         ` <200908111839.19827.samm@sammaloney.com>
  0 siblings, 1 reply; 16+ messages in thread
From: RaMaier @ 2009-08-11 22:25 UTC (permalink / raw)
  To: Arno Wagner, dm-crypt

When I just enter 
cryptsetup luksOpen /dev/sda2 tresor 
I get the reply:
Command failed: No setup backend available

I guess it somehow has a relation to the mapper.
Any idea ?

Best regards
Rainer


-------- Original-Nachricht --------
> Datum: Tue, 11 Aug 2009 23:42:29 +0200
> Von: Arno Wagner <arno@wagner.name>
> An: RaMaier@gmx.de
> Betreff: Re: [dm-crypt] reinstallation

> I suspect luksFormat wipes the LUKS superblock and creates
> a new one, i.e. all data is permanently lost. mkfs.ext3
> will overwrote the filesystem metadata, i.e. the filesystem
> structure is lost.
> 
> However 
> > cryptsetup luksOpen /dev/sda2 tresor
> > mount /dev/mapper/tresor /tresor
> 
> should work, with sda2 replaced with whatever the 
> LUKS container now is in. Basically you just do what you
> did before to access (not create) the device, just 
> with a (potentially) different device identifier.
> 
> As to preventing partition loss, make a sector-wise
> backup copy, e.g. with dd or dd_rescue before risking it.
> 
> Arno
> 
> On Tue, Aug 11, 2009 at 11:25:16PM +0200, RaMaier@gmx.de wrote:
> > Hi Hannes,
> > in the documents I keep. I found that I had encrypted /dev/sda2. The
> procedure I recorded was:
> > umount /dev/sda2
> > cryptsetup luksFormat /dev/sda2
> > cryptsetup luksOpen /dev/sda2 tresor
> > mkfs.ext3 /dev/mapper/tresor
> > mount /dev/mapper/tresor /tresor
> > 
> > What will happen if I repeat the steps ?
> > Should I just leave the mkfs.ext3 out ?
> > Would I be able to access my old data again ?
> > What does lufsFormat really do ? Format the partition ?
> > As I staded the data is pretty valuable to me.
> > 
> > thanks for your help.
> > Best regards
> > Rainer
> > 
> > 
> > -------- Original-Nachricht --------
> > > Datum: Tue, 11 Aug 2009 16:01:56 +0200
> > > Von: Hannes Erven <h.e@gmx.at>
> > > An: Rainer Maier <RaMaier@gmx.de>
> > > CC: dm-crypt@saout.de
> > > Betreff: Re: [dm-crypt] reinstallation
> > 
> > > Hi Rainer,
> > > 
> > > 
> > > > How can I reinstall LUKS on my new Debian (Lenny)?
> > > 
> > > I guess the debian (and thus cryptsetup) installations on your old
> > > machine weren't that up to date, right?
> > > 
> > > With the new debian lenny, you don't need to install anything: LUKS is
> > > already included in the default cryptsetup package you should already
> > > have installed (http://packages.debian.org/lenny/cryptsetup ).
> > > 
> > > >>From http://code.google.com/p/cryptsetup/:
> > > "The former version of cryptsetup only had low-level operations for
> > > dm-crypt ready, and around version cryptsetup-luks 1.0.5 was renamed
> to
> > > be the official version of cryptsetup. "
> > > 
> > > You still might have to change your old scripts, if you have some, to
> > > just call cryptsetup instead of cryptsetup-luks .
> > > 
> > > 
> > > HTH, best regards
> > > 
> > > 	-hannes
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > dm-crypt mailing list
> > > dm-crypt@saout.de
> > > http://www.saout.de/mailman/listinfo/dm-crypt
> > 
> > -- 
> > Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3
> -
> > sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
> > _______________________________________________
> > dm-crypt mailing list
> > dm-crypt@saout.de
> > http://www.saout.de/mailman/listinfo/dm-crypt
> > 
> 
> -- 
> Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email:
> arno@wagner.name 
> GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25
> 338F
> ----
> Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans
> 
> If it's in the news, don't worry about it.  The very definition of 
> "news" is "something that hardly ever happens." -- Bruce Schneier 

-- 
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
  2009-08-11 22:06     ` Moji
@ 2009-08-11 22:40       ` RaMaier
  2009-08-11 23:34         ` Jonas Meurer
  0 siblings, 1 reply; 16+ messages in thread
From: RaMaier @ 2009-08-11 22:40 UTC (permalink / raw)
  To: Moji, dm-crypt

Sorry for the unclear statements.
Here are the answers:
I did not repeat the steps.
/dev/sda2 holds the encrypted data.

Here my description what has happened. Hopefully it becomes clearer now.
 
What I wrote were the initial steps I perforemed when I first set up the partition (/dev/sda2).
Again I did not repeat them now.
After my old PC had died I installed the RAID controller in a new PC and installed Debian. (/dev/hda) cryptsetup is now already included. (Thanks for the hint Arno)
Since it's a hardware controller the files on the not encrypted partition (/dev/sda1) were immediately available.
Now I am looking for the steps I have to perform to access the data in the encrypted partition (/dev/sda2) again, without destroying them.

When I now enter
cryptsetup luksOpen /dev/sda2 tresor
I get 
Command failed: No steup backend available

Best regards
Rainer


-------- Original-Nachricht --------
> Datum: Wed, 12 Aug 2009 01:06:31 +0300
> Von: Moji <lordmoji@gmail.com>
> An: dm-crypt@saout.de
> Betreff: Re: [dm-crypt] reinstallation

> I do not entirely understand your question, so I apologize if my answer
> is not what you are looking for.
> 
> If you repeated those steps then any information on /dev/sda2 will be
> lost forever.
> 
> "luksFormat" writes the luks header information, that includes the key
> that decrypts the rest of the partition(device). If there is an old key
> it will write over it making any old data on that luks partition
> effectively unrecoverable.
> 
> "luksOpen" uses your supplied key to decrypt the device key stored in
> the header information and then maps it to /dev/mapper/.
> 
> If I understand your original post, the "/dev/sda2" is currently
> unencrypted data? If that is the case then you MUST copy that data over
> to another device while you set up then encrypted partition, then
> transfer it back, as the steps you listed will erase your old partition.
> 
> -MJ
> 
> RaMaier@gmx.de wrote:
> > Hi Hannes,
> > in the documents I keep. I found that I had encrypted /dev/sda2. The
> procedure I recorded was:
> > umount /dev/sda2
> > cryptsetup luksFormat /dev/sda2
> > cryptsetup luksOpen /dev/sda2 tresor
> > mkfs.ext3 /dev/mapper/tresor
> > mount /dev/mapper/tresor /tresor
> > 
> > What will happen if I repeat the steps ?
> > Should I just leave the mkfs.ext3 out ?
> > Would I be able to access my old data again ?
> > What does lufsFormat really do ? Format the partition ?
> > As I staded the data is pretty valuable to me.
> > 
> > thanks for your help.
> > Best regards
> > Rainer
> > 
> > 
> > -------- Original-Nachricht --------
> >> Datum: Tue, 11 Aug 2009 16:01:56 +0200
> >> Von: Hannes Erven <h.e@gmx.at>
> >> An: Rainer Maier <RaMaier@gmx.de>
> >> CC: dm-crypt@saout.de
> >> Betreff: Re: [dm-crypt] reinstallation
> > 
> >> Hi Rainer,
> >>
> >>
> >>> How can I reinstall LUKS on my new Debian (Lenny)?
> >> I guess the debian (and thus cryptsetup) installations on your old
> >> machine weren't that up to date, right?
> >>
> >> With the new debian lenny, you don't need to install anything: LUKS is
> >> already included in the default cryptsetup package you should already
> >> have installed (http://packages.debian.org/lenny/cryptsetup ).
> >>
> >>> >From http://code.google.com/p/cryptsetup/:
> >> "The former version of cryptsetup only had low-level operations for
> >> dm-crypt ready, and around version cryptsetup-luks 1.0.5 was renamed to
> >> be the official version of cryptsetup. "
> >>
> >> You still might have to change your old scripts, if you have some, to
> >> just call cryptsetup instead of cryptsetup-luks .
> >>
> >>
> >> HTH, best regards
> >>
> >> 	-hannes
> >>
> >>
> >>
> >> _______________________________________________
> >> dm-crypt mailing list
> >> dm-crypt@saout.de
> >> http://www.saout.de/mailman/listinfo/dm-crypt
> > 
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
@ 2009-08-11 22:40 Sam
  0 siblings, 0 replies; 16+ messages in thread
From: Sam @ 2009-08-11 22:40 UTC (permalink / raw)
  To: dm-crypt; +Cc: RaMaier

Your problem is then with your Linux installation.

I would be guessing that your device mapper is not setup properly, or best 
case is simply not loaded by default for some reason.

Try this as root:

modprobe dm_mod

That will load the device mapper module (driver) and should be enough.

Then try your luksOpen command again.

If you get the same errror, then try also all of these in addition to the 
dm_mod:

modprobe crypto_blkcipher
modprobe cbc
modprobe dm_crypt
modprobe aes_generic
modprobe aes_i586

Some of these might fail with an error, but that could be just that they are 
already built into your kernel (and thus are permanently loaded -- that is 
okay).

Now try the luksOpen again. If it still doesn't work, then I do not know. 
However, it really should have worked by now at least.

If it did work: note that you will need to add these commands to your 
/etc/init.d/boot.local file (just add them to the end just like you typed them 
in the terminal). This will cause them to be loaded upon startup each time.

Hope that helps.

Sam

> When I just enter
> cryptsetup luksOpen /dev/sda2 tresor
> I get the reply:
> Command failed: No setup backend available
>
> I guess it somehow has a relation to the mapper.
> Any idea ?
>
> Best regards
> Rainer
>
>
> -------- Original-Nachricht --------
>
> > Datum: Tue, 11 Aug 2009 23:42:29 +0200
> > Von: Arno Wagner <arno@wagner.name>
> > An: RaMaier@gmx.de
> > Betreff: Re: [dm-crypt] reinstallation
> >
> > I suspect luksFormat wipes the LUKS superblock and creates
> > a new one, i.e. all data is permanently lost. mkfs.ext3
> > will overwrote the filesystem metadata, i.e. the filesystem
> > structure is lost.
> >
> > However
> >
> > > cryptsetup luksOpen /dev/sda2 tresor
> > > mount /dev/mapper/tresor /tresor
> >
> > should work, with sda2 replaced with whatever the
> > LUKS container now is in. Basically you just do what you
> > did before to access (not create) the device, just
> > with a (potentially) different device identifier.
> >
> > As to preventing partition loss, make a sector-wise
> > backup copy, e.g. with dd or dd_rescue before risking it.
> >
> > Arno
> >
> > On Tue, Aug 11, 2009 at 11:25:16PM +0200, RaMaier@gmx.de wrote:
> > > Hi Hannes,
> > > in the documents I keep. I found that I had encrypted /dev/sda2. The
> >
> > procedure I recorded was:
> > > umount /dev/sda2
> > > cryptsetup luksFormat /dev/sda2
> > > cryptsetup luksOpen /dev/sda2 tresor
> > > mkfs.ext3 /dev/mapper/tresor
> > > mount /dev/mapper/tresor /tresor
> > >
> > > What will happen if I repeat the steps ?
> > > Should I just leave the mkfs.ext3 out ?
> > > Would I be able to access my old data again ?
> > > What does lufsFormat really do ? Format the partition ?
> > > As I staded the data is pretty valuable to me.
> > >
> > > thanks for your help.
> > > Best regards
> > > Rainer
> > >
> > >
> > > -------- Original-Nachricht --------
> > >
> > > > Datum: Tue, 11 Aug 2009 16:01:56 +0200
> > > > Von: Hannes Erven <h.e@gmx.at>
> > > > An: Rainer Maier <RaMaier@gmx.de>
> > > > CC: dm-crypt@saout.de
> > > > Betreff: Re: [dm-crypt] reinstallation
> > > >
> > > > Hi Rainer,
> > > >
> > > > > How can I reinstall LUKS on my new Debian (Lenny)?
> > > >
> > > > I guess the debian (and thus cryptsetup) installations on your old
> > > > machine weren't that up to date, right?
> > > >
> > > > With the new debian lenny, you don't need to install anything: LUKS
> > > > is already included in the default cryptsetup package you should
> > > > already have installed (http://packages.debian.org/lenny/cryptsetup
> > > > ).
> > > >
> > > > >>From http://code.google.com/p/cryptsetup/:
> > > >
> > > > "The former version of cryptsetup only had low-level operations for
> > > > dm-crypt ready, and around version cryptsetup-luks 1.0.5 was renamed
> >
> > to
> >
> > > > be the official version of cryptsetup. "
> > > >
> > > > You still might have to change your old scripts, if you have some, to
> > > > just call cryptsetup instead of cryptsetup-luks .
> > > >
> > > >
> > > > HTH, best regards
> > > >
> > > > 	-hannes
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > dm-crypt mailing list
> > > > dm-crypt@saout.de
> > > > http://www.saout.de/mailman/listinfo/dm-crypt
> >
> > -
> >
> > > sicherer, schneller und einfacher!
> > > http://portal.gmx.net/de/go/atbrowser
> > > _______________________________________________
> > > dm-crypt mailing list
> > > dm-crypt@saout.de
> > > http://www.saout.de/mailman/listinfo/dm-crypt

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
       [not found]         ` <200908111839.19827.samm@sammaloney.com>
@ 2009-08-11 22:54           ` RaMaier
  2009-08-11 23:01             ` Sam
  2009-08-12  6:51             ` Milan Broz
  0 siblings, 2 replies; 16+ messages in thread
From: RaMaier @ 2009-08-11 22:54 UTC (permalink / raw)
  To: Sam, dm-crypt

I tried:

modprobe dm_mod
ioctl: 4.11.0-ioctl (2006-10-12) initialized: dm-devel@redhat.com
modprobe crypto_blkcipher
FATAL: Module crypto_blkcipher not found
modprobe cbc
modprobe dm_crypt
modprobe aes_generic
FATAL: Module aes_generic not found
modprobe aes_i586
cryptsetup luksOpen /dev/sda2 tresor
Command failed: No setup backend available

Best regards
Rainer


-------- Original-Nachricht --------
> Datum: Tue, 11 Aug 2009 18:39:19 -0400
> Von: Sam <samm@sammaloney.com>
> An: dm-crypt@saout.de
> CC: RaMaier@gmx.de
> Betreff: Re: [dm-crypt] reinstallation

> Your problem is then with your Linux installation.
> 
> I would be guessing that your device mapper is not setup properly, or best
> case is simply not loaded by default for some reason.
> 
> Try this as root:
> 
> modprobe dm_mod
> 
> That will load the device mapper module (driver) and should be enough.
> 
> Then try your luksOpen command again.
> 
> If you get the same errror, then try also all of these in addition to the 
> dm_mod:
> 
> modprobe crypto_blkcipher
> modprobe cbc
> modprobe dm_crypt
> modprobe aes_generic
> modprobe aes_i586
> 
> Some of these might fail with an error, but that could be just that they
> are 
> already built into your kernel (and thus are permanently loaded -- that is
> okay).
> 
> Now try the luksOpen again. If it still doesn't work, then I do not know. 
> However, it really should have worked by now at least.
> 
> If it did work: note that you will need to add these commands to your 
> /etc/init.d/boot.local file (just add them to the end just like you typed
> them 
> in the terminal). This will cause them to be loaded upon startup each
> time.
> 
> Hope that helps.
> 
> Sam
> 
> > When I just enter
> > cryptsetup luksOpen /dev/sda2 tresor
> > I get the reply:
> > Command failed: No setup backend available
> >
> > I guess it somehow has a relation to the mapper.
> > Any idea ?
> >
> > Best regards
> > Rainer
> >
> >
> > -------- Original-Nachricht --------
> >
> > > Datum: Tue, 11 Aug 2009 23:42:29 +0200
> > > Von: Arno Wagner <arno@wagner.name>
> > > An: RaMaier@gmx.de
> > > Betreff: Re: [dm-crypt] reinstallation
> > >
> > > I suspect luksFormat wipes the LUKS superblock and creates
> > > a new one, i.e. all data is permanently lost. mkfs.ext3
> > > will overwrote the filesystem metadata, i.e. the filesystem
> > > structure is lost.
> > >
> > > However
> > >
> > > > cryptsetup luksOpen /dev/sda2 tresor
> > > > mount /dev/mapper/tresor /tresor
> > >
> > > should work, with sda2 replaced with whatever the
> > > LUKS container now is in. Basically you just do what you
> > > did before to access (not create) the device, just
> > > with a (potentially) different device identifier.
> > >
> > > As to preventing partition loss, make a sector-wise
> > > backup copy, e.g. with dd or dd_rescue before risking it.
> > >
> > > Arno
> > >
> > > On Tue, Aug 11, 2009 at 11:25:16PM +0200, RaMaier@gmx.de wrote:
> > > > Hi Hannes,
> > > > in the documents I keep. I found that I had encrypted /dev/sda2. The
> > >
> > > procedure I recorded was:
> > > > umount /dev/sda2
> > > > cryptsetup luksFormat /dev/sda2
> > > > cryptsetup luksOpen /dev/sda2 tresor
> > > > mkfs.ext3 /dev/mapper/tresor
> > > > mount /dev/mapper/tresor /tresor
> > > >
> > > > What will happen if I repeat the steps ?
> > > > Should I just leave the mkfs.ext3 out ?
> > > > Would I be able to access my old data again ?
> > > > What does lufsFormat really do ? Format the partition ?
> > > > As I staded the data is pretty valuable to me.
> > > >
> > > > thanks for your help.
> > > > Best regards
> > > > Rainer
> > > >
> > > >
> > > > -------- Original-Nachricht --------
> > > >
> > > > > Datum: Tue, 11 Aug 2009 16:01:56 +0200
> > > > > Von: Hannes Erven <h.e@gmx.at>
> > > > > An: Rainer Maier <RaMaier@gmx.de>
> > > > > CC: dm-crypt@saout.de
> > > > > Betreff: Re: [dm-crypt] reinstallation
> > > > >
> > > > > Hi Rainer,
> > > > >
> > > > > > How can I reinstall LUKS on my new Debian (Lenny)?
> > > > >
> > > > > I guess the debian (and thus cryptsetup) installations on your old
> > > > > machine weren't that up to date, right?
> > > > >
> > > > > With the new debian lenny, you don't need to install anything:
> LUKS
> > > > > is already included in the default cryptsetup package you should
> > > > > already have installed
> (http://packages.debian.org/lenny/cryptsetup
> > > > > ).
> > > > >
> > > > > >>From http://code.google.com/p/cryptsetup/:
> > > > >
> > > > > "The former version of cryptsetup only had low-level operations
> for
> > > > > dm-crypt ready, and around version cryptsetup-luks 1.0.5 was
> renamed
> > >
> > > to
> > >
> > > > > be the official version of cryptsetup. "
> > > > >
> > > > > You still might have to change your old scripts, if you have some,
> to
> > > > > just call cryptsetup instead of cryptsetup-luks .
> > > > >
> > > > >
> > > > > HTH, best regards
> > > > >
> > > > > 	-hannes
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > dm-crypt mailing list
> > > > > dm-crypt@saout.de
> > > > > http://www.saout.de/mailman/listinfo/dm-crypt
> > >
> > > -
> > >
> > > > sicherer, schneller und einfacher!
> > > > http://portal.gmx.net/de/go/atbrowser
> > > > _______________________________________________
> > > > dm-crypt mailing list
> > > > dm-crypt@saout.de
> > > > http://www.saout.de/mailman/listinfo/dm-crypt

-- 
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
  2009-08-11 22:54           ` RaMaier
@ 2009-08-11 23:01             ` Sam
  2009-08-12  6:09               ` Rainer Maier
  2009-08-12  6:51             ` Milan Broz
  1 sibling, 1 reply; 16+ messages in thread
From: Sam @ 2009-08-11 23:01 UTC (permalink / raw)
  To: RaMaier; +Cc: dm-crypt

That is unfortunate.
Well, give us a bit more information. Try doing the following:

cryptsetup luksDump /dev/sda2

(this will just output some info on what encryption algorithm your partition 
uses)

Then paste what it says into an email. Just the first 6 lines would be enough 
for me (upto and including "Hash spec:").

Ie:

LUKS header information for /dev/sda7

Version:        1
Cipher name:    aes
Cipher mode:    xts-plain
Hash spec:      sha1

Regards,
Sam

> I tried:
>
> modprobe dm_mod
> ioctl: 4.11.0-ioctl (2006-10-12) initialized: dm-devel@redhat.com
> modprobe crypto_blkcipher
> FATAL: Module crypto_blkcipher not found
> modprobe cbc
> modprobe dm_crypt
> modprobe aes_generic
> FATAL: Module aes_generic not found
> modprobe aes_i586
> cryptsetup luksOpen /dev/sda2 tresor
> Command failed: No setup backend available
>
> Best regards
> Rainer
>
>
> -------- Original-Nachricht --------
>
> > Datum: Tue, 11 Aug 2009 18:39:19 -0400
> > Von: Sam <samm@sammaloney.com>
> > An: dm-crypt@saout.de
> > CC: RaMaier@gmx.de
> > Betreff: Re: [dm-crypt] reinstallation
> >
> > Your problem is then with your Linux installation.
> >
> > I would be guessing that your device mapper is not setup properly, or
> > best case is simply not loaded by default for some reason.
> >
> > Try this as root:
> >
> > modprobe dm_mod
> >
> > That will load the device mapper module (driver) and should be enough.
> >
> > Then try your luksOpen command again.
> >
> > If you get the same errror, then try also all of these in addition to the
> > dm_mod:
> >
> > modprobe crypto_blkcipher
> > modprobe cbc
> > modprobe dm_crypt
> > modprobe aes_generic
> > modprobe aes_i586
> >
> > Some of these might fail with an error, but that could be just that they
> > are
> > already built into your kernel (and thus are permanently loaded -- that
> > is okay).
> >
> > Now try the luksOpen again. If it still doesn't work, then I do not know.
> > However, it really should have worked by now at least.
> >
> > If it did work: note that you will need to add these commands to your
> > /etc/init.d/boot.local file (just add them to the end just like you typed
> > them
> > in the terminal). This will cause them to be loaded upon startup each
> > time.
> >
> > Hope that helps.
> >
> > Sam
> >
> > > When I just enter
> > > cryptsetup luksOpen /dev/sda2 tresor
> > > I get the reply:
> > > Command failed: No setup backend available
> > >
> > > I guess it somehow has a relation to the mapper.
> > > Any idea ?
> > >
> > > Best regards
> > > Rainer
> > >
> > >
> > > -------- Original-Nachricht --------
> > >
> > > > Datum: Tue, 11 Aug 2009 23:42:29 +0200
> > > > Von: Arno Wagner <arno@wagner.name>
> > > > An: RaMaier@gmx.de
> > > > Betreff: Re: [dm-crypt] reinstallation
> > > >
> > > > I suspect luksFormat wipes the LUKS superblock and creates
> > > > a new one, i.e. all data is permanently lost. mkfs.ext3
> > > > will overwrote the filesystem metadata, i.e. the filesystem
> > > > structure is lost.
> > > >
> > > > However
> > > >
> > > > > cryptsetup luksOpen /dev/sda2 tresor
> > > > > mount /dev/mapper/tresor /tresor
> > > >
> > > > should work, with sda2 replaced with whatever the
> > > > LUKS container now is in. Basically you just do what you
> > > > did before to access (not create) the device, just
> > > > with a (potentially) different device identifier.
> > > >
> > > > As to preventing partition loss, make a sector-wise
> > > > backup copy, e.g. with dd or dd_rescue before risking it.
> > > >
> > > > Arno
> > > >
> > > > On Tue, Aug 11, 2009 at 11:25:16PM +0200, RaMaier@gmx.de wrote:
> > > > > Hi Hannes,
> > > > > in the documents I keep. I found that I had encrypted /dev/sda2.
> > > > > The
> > > >
> > > > procedure I recorded was:
> > > > > umount /dev/sda2
> > > > > cryptsetup luksFormat /dev/sda2
> > > > > cryptsetup luksOpen /dev/sda2 tresor
> > > > > mkfs.ext3 /dev/mapper/tresor
> > > > > mount /dev/mapper/tresor /tresor
> > > > >
> > > > > What will happen if I repeat the steps ?
> > > > > Should I just leave the mkfs.ext3 out ?
> > > > > Would I be able to access my old data again ?
> > > > > What does lufsFormat really do ? Format the partition ?
> > > > > As I staded the data is pretty valuable to me.
> > > > >
> > > > > thanks for your help.
> > > > > Best regards
> > > > > Rainer
> > > > >
> > > > >
> > > > > -------- Original-Nachricht --------
> > > > >
> > > > > > Datum: Tue, 11 Aug 2009 16:01:56 +0200
> > > > > > Von: Hannes Erven <h.e@gmx.at>
> > > > > > An: Rainer Maier <RaMaier@gmx.de>
> > > > > > CC: dm-crypt@saout.de
> > > > > > Betreff: Re: [dm-crypt] reinstallation
> > > > > >
> > > > > > Hi Rainer,
> > > > > >
> > > > > > > How can I reinstall LUKS on my new Debian (Lenny)?
> > > > > >
> > > > > > I guess the debian (and thus cryptsetup) installations on your
> > > > > > old machine weren't that up to date, right?
> > > > > >
> > > > > > With the new debian lenny, you don't need to install anything:
> >
> > LUKS
> >
> > > > > > is already included in the default cryptsetup package you should
> > > > > > already have installed
> >
> > (http://packages.debian.org/lenny/cryptsetup
> >
> > > > > > ).
> > > > > >
> > > > > > >>From http://code.google.com/p/cryptsetup/:
> > > > > >
> > > > > > "The former version of cryptsetup only had low-level operations
> >
> > for
> >
> > > > > > dm-crypt ready, and around version cryptsetup-luks 1.0.5 was
> >
> > renamed
> >
> > > > to
> > > >
> > > > > > be the official version of cryptsetup. "
> > > > > >
> > > > > > You still might have to change your old scripts, if you have
> > > > > > some,
> >
> > to
> >
> > > > > > just call cryptsetup instead of cryptsetup-luks .
> > > > > >
> > > > > >
> > > > > > HTH, best regards
> > > > > >
> > > > > > 	-hannes
> > > > > >
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > dm-crypt mailing list
> > > > > > dm-crypt@saout.de
> > > > > > http://www.saout.de/mailman/listinfo/dm-crypt
> > > >
> > > > -
> > > >
> > > > > sicherer, schneller und einfacher!
> > > > > http://portal.gmx.net/de/go/atbrowser
> > > > > _______________________________________________
> > > > > dm-crypt mailing list
> > > > > dm-crypt@saout.de
> > > > > http://www.saout.de/mailman/listinfo/dm-crypt

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
  2009-08-11 22:40       ` RaMaier
@ 2009-08-11 23:34         ` Jonas Meurer
  2009-08-11 23:36           ` Jonas Meurer
  2009-08-12  6:19           ` Rainer Maier
  0 siblings, 2 replies; 16+ messages in thread
From: Jonas Meurer @ 2009-08-11 23:34 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]

Hello Rainer,

On 12/08/2009 RaMaier@gmx.de wrote:
> Here my description what has happened. Hopefully it becomes clearer now.
>  
> What I wrote were the initial steps I perforemed when I first set up
> the partition (/dev/sda2). Again I did not repeat them now.
> After my old PC had died I installed the RAID controller in a new PC
> and installed Debian. (/dev/hda) cryptsetup is now already included.
> (Thanks for the hint Arno)
> Since it's a hardware controller the files on the not encrypted
> partition (/dev/sda1) were immediately available.
> Now I am looking for the steps I have to perform to access the data in
> the encrypted partition (/dev/sda2) again, without destroying them.
> 
> When I now enter
> cryptsetup luksOpen /dev/sda2 tresor
> I get 
> Command failed: No steup backend available

please give some more information. i.e. paste the output of the
following commands (as root):

# dpkg -l cryptsetup

# cryptsetup --version

# cryptsetup luksDump /dev/sda2

# cat /proc/crypto

none of the commands modifies your partition, they only print
information about versions, partition types, crypto ciphers, kernel
crypto support, etc.

greetings,
 jonas

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
  2009-08-11 23:34         ` Jonas Meurer
@ 2009-08-11 23:36           ` Jonas Meurer
  2009-08-12  6:19           ` Rainer Maier
  1 sibling, 0 replies; 16+ messages in thread
From: Jonas Meurer @ 2009-08-11 23:36 UTC (permalink / raw)
  To: dm-crypt; +Cc: RaMaier

[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]

On 12/08/2009 Jonas Meurer wrote:
> Hello Rainer,
> 
> On 12/08/2009 RaMaier@gmx.de wrote:
> > Here my description what has happened. Hopefully it becomes clearer now.
> >  
> > What I wrote were the initial steps I perforemed when I first set up
> > the partition (/dev/sda2). Again I did not repeat them now.
> > After my old PC had died I installed the RAID controller in a new PC
> > and installed Debian. (/dev/hda) cryptsetup is now already included.
> > (Thanks for the hint Arno)
> > Since it's a hardware controller the files on the not encrypted
> > partition (/dev/sda1) were immediately available.
> > Now I am looking for the steps I have to perform to access the data in
> > the encrypted partition (/dev/sda2) again, without destroying them.
> > 
> > When I now enter
> > cryptsetup luksOpen /dev/sda2 tresor
> > I get 
> > Command failed: No steup backend available
> 
> please give some more information. i.e. paste the output of the
> following commands (as root):
> 
> # dpkg -l cryptsetup
> 
> # cryptsetup --version
> 
> # cryptsetup luksDump /dev/sda2
> 
> # cat /proc/crypto
> 
> none of the commands modifies your partition, they only print
> information about versions, partition types, crypto ciphers, kernel
> crypto support, etc.

and one more:

# dmsetup targets

greetings,
 jonas

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
  2009-08-11 23:01             ` Sam
@ 2009-08-12  6:09               ` Rainer Maier
  0 siblings, 0 replies; 16+ messages in thread
From: Rainer Maier @ 2009-08-12  6:09 UTC (permalink / raw)
  To: Sam, dm-crypt

here's the output:

Version:        1
Cipher name:    aes
Cipher mode:    cbc-essiv:sha256
Hash spec:      sha1
Payload offset: 1032
MK bits:        128

Best regards
Rainer

Sam schrieb:
> That is unfortunate.
> Well, give us a bit more information. Try doing the following:
> 
> cryptsetup luksDump /dev/sda2
> 
> (this will just output some info on what encryption algorithm your partition 
> uses)
> 
> Then paste what it says into an email. Just the first 6 lines would be enough 
> for me (upto and including "Hash spec:").
> 
> Ie:
> 
> LUKS header information for /dev/sda7
> 
> Version:        1
> Cipher name:    aes
> Cipher mode:    xts-plain
> Hash spec:      sha1
> 
> Regards,
> Sam
> 
>> I tried:
>>
>> modprobe dm_mod
>> ioctl: 4.11.0-ioctl (2006-10-12) initialized: dm-devel@redhat.com
>> modprobe crypto_blkcipher
>> FATAL: Module crypto_blkcipher not found
>> modprobe cbc
>> modprobe dm_crypt
>> modprobe aes_generic
>> FATAL: Module aes_generic not found
>> modprobe aes_i586
>> cryptsetup luksOpen /dev/sda2 tresor
>> Command failed: No setup backend available
>>
>> Best regards
>> Rainer
>>
>>
>> -------- Original-Nachricht --------
>>
>>> Datum: Tue, 11 Aug 2009 18:39:19 -0400
>>> Von: Sam <samm@sammaloney.com>
>>> An: dm-crypt@saout.de
>>> CC: RaMaier@gmx.de
>>> Betreff: Re: [dm-crypt] reinstallation
>>>
>>> Your problem is then with your Linux installation.
>>>
>>> I would be guessing that your device mapper is not setup properly, or
>>> best case is simply not loaded by default for some reason.
>>>
>>> Try this as root:
>>>
>>> modprobe dm_mod
>>>
>>> That will load the device mapper module (driver) and should be enough.
>>>
>>> Then try your luksOpen command again.
>>>
>>> If you get the same errror, then try also all of these in addition to the
>>> dm_mod:
>>>
>>> modprobe crypto_blkcipher
>>> modprobe cbc
>>> modprobe dm_crypt
>>> modprobe aes_generic
>>> modprobe aes_i586
>>>
>>> Some of these might fail with an error, but that could be just that they
>>> are
>>> already built into your kernel (and thus are permanently loaded -- that
>>> is okay).
>>>
>>> Now try the luksOpen again. If it still doesn't work, then I do not know.
>>> However, it really should have worked by now at least.
>>>
>>> If it did work: note that you will need to add these commands to your
>>> /etc/init.d/boot.local file (just add them to the end just like you typed
>>> them
>>> in the terminal). This will cause them to be loaded upon startup each
>>> time.
>>>
>>> Hope that helps.
>>>
>>> Sam
>>>
>>>> When I just enter
>>>> cryptsetup luksOpen /dev/sda2 tresor
>>>> I get the reply:
>>>> Command failed: No setup backend available
>>>>
>>>> I guess it somehow has a relation to the mapper.
>>>> Any idea ?
>>>>
>>>> Best regards
>>>> Rainer
>>>>
>>>>
>>>> -------- Original-Nachricht --------
>>>>
>>>>> Datum: Tue, 11 Aug 2009 23:42:29 +0200
>>>>> Von: Arno Wagner <arno@wagner.name>
>>>>> An: RaMaier@gmx.de
>>>>> Betreff: Re: [dm-crypt] reinstallation
>>>>>
>>>>> I suspect luksFormat wipes the LUKS superblock and creates
>>>>> a new one, i.e. all data is permanently lost. mkfs.ext3
>>>>> will overwrote the filesystem metadata, i.e. the filesystem
>>>>> structure is lost.
>>>>>
>>>>> However
>>>>>
>>>>>> cryptsetup luksOpen /dev/sda2 tresor
>>>>>> mount /dev/mapper/tresor /tresor
>>>>> should work, with sda2 replaced with whatever the
>>>>> LUKS container now is in. Basically you just do what you
>>>>> did before to access (not create) the device, just
>>>>> with a (potentially) different device identifier.
>>>>>
>>>>> As to preventing partition loss, make a sector-wise
>>>>> backup copy, e.g. with dd or dd_rescue before risking it.
>>>>>
>>>>> Arno
>>>>>
>>>>> On Tue, Aug 11, 2009 at 11:25:16PM +0200, RaMaier@gmx.de wrote:
>>>>>> Hi Hannes,
>>>>>> in the documents I keep. I found that I had encrypted /dev/sda2.
>>>>>> The
>>>>> procedure I recorded was:
>>>>>> umount /dev/sda2
>>>>>> cryptsetup luksFormat /dev/sda2
>>>>>> cryptsetup luksOpen /dev/sda2 tresor
>>>>>> mkfs.ext3 /dev/mapper/tresor
>>>>>> mount /dev/mapper/tresor /tresor
>>>>>>
>>>>>> What will happen if I repeat the steps ?
>>>>>> Should I just leave the mkfs.ext3 out ?
>>>>>> Would I be able to access my old data again ?
>>>>>> What does lufsFormat really do ? Format the partition ?
>>>>>> As I staded the data is pretty valuable to me.
>>>>>>
>>>>>> thanks for your help.
>>>>>> Best regards
>>>>>> Rainer
>>>>>>
>>>>>>
>>>>>> -------- Original-Nachricht --------
>>>>>>
>>>>>>> Datum: Tue, 11 Aug 2009 16:01:56 +0200
>>>>>>> Von: Hannes Erven <h.e@gmx.at>
>>>>>>> An: Rainer Maier <RaMaier@gmx.de>
>>>>>>> CC: dm-crypt@saout.de
>>>>>>> Betreff: Re: [dm-crypt] reinstallation
>>>>>>>
>>>>>>> Hi Rainer,
>>>>>>>
>>>>>>>> How can I reinstall LUKS on my new Debian (Lenny)?
>>>>>>> I guess the debian (and thus cryptsetup) installations on your
>>>>>>> old machine weren't that up to date, right?
>>>>>>>
>>>>>>> With the new debian lenny, you don't need to install anything:
>>> LUKS
>>>
>>>>>>> is already included in the default cryptsetup package you should
>>>>>>> already have installed
>>> (http://packages.debian.org/lenny/cryptsetup
>>>
>>>>>>> ).
>>>>>>>
>>>>>>>> >From http://code.google.com/p/cryptsetup/:
>>>>>>> "The former version of cryptsetup only had low-level operations
>>> for
>>>
>>>>>>> dm-crypt ready, and around version cryptsetup-luks 1.0.5 was
>>> renamed
>>>
>>>>> to
>>>>>
>>>>>>> be the official version of cryptsetup. "
>>>>>>>
>>>>>>> You still might have to change your old scripts, if you have
>>>>>>> some,
>>> to
>>>
>>>>>>> just call cryptsetup instead of cryptsetup-luks .
>>>>>>>
>>>>>>>
>>>>>>> HTH, best regards
>>>>>>>
>>>>>>> 	-hannes
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> dm-crypt mailing list
>>>>>>> dm-crypt@saout.de
>>>>>>> http://www.saout.de/mailman/listinfo/dm-crypt
>>>>> -
>>>>>
>>>>>> sicherer, schneller und einfacher!
>>>>>> http://portal.gmx.net/de/go/atbrowser
>>>>>> _______________________________________________
>>>>>> dm-crypt mailing list
>>>>>> dm-crypt@saout.de
>>>>>> http://www.saout.de/mailman/listinfo/dm-crypt
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
  2009-08-11 23:34         ` Jonas Meurer
  2009-08-11 23:36           ` Jonas Meurer
@ 2009-08-12  6:19           ` Rainer Maier
  2009-08-12  9:39             ` Jonas Meurer
  1 sibling, 1 reply; 16+ messages in thread
From: Rainer Maier @ 2009-08-12  6:19 UTC (permalink / raw)
  To: dm-crypt

Hi Jonas,
here is the output:

--------------------------------------------------------------------------------------------------------
sv3000:~# dpkg -l cryptsetup
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/Fehlgeschl. Konfiguration/
          Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/Halten/R=Neuinst notw/X=beide (Status, Fehler: 
GROSS=schlecht)
||/ Name                        Version                     Beschreibung
+++-===========================-===========================-======================================================================
un  cryptsetup                  <keine>                     (keine 
Beschreibung vorhanden)
sv3000:~#



--> directly in the kernel.

--------------------------------------------------------------------------------------------------------
sv3000:~# cryptsetup --version
cryptsetup 1.0.6
--------------------------------------------------------------------------------------------------------
sv3000:~# cryptsetup luksDump /dev/sda2
LUKS header information for /dev/sda2

Version:        1
Cipher name:    aes
Cipher mode:    cbc-essiv:sha256
Hash spec:      sha1
Payload offset: 1032
MK bits:        128
MK digest:

MK salt:

MK iterations:  10
UUID:           6c2a5824-5594-4516-885b-4a82a5be9554

Key Slot 0: DISABLED
Key Slot 1: ENABLED
         Iterations:             115171
         Salt:

         Key material offset:    136
         AF stripes:             4000
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED
sv3000:~#

--------------------------------------------------------------------------------------------------------
sv3000:~# cat /proc/crypto
name         : aes
driver       : aes-i586
module       : aes_i586
priority     : 200
refcnt       : 1
type         : cipher
blocksize    : 16
min keysize  : 16
max keysize  : 32

name         : md5
driver       : md5-generic
module       : kernel
priority     : 0
refcnt       : 1
type         : digest
blocksize    : 64
digestsize   : 16

sv3000:~#

--------------------------------------------------------------------------------------------------------
sv3000:~# dmsetup targets
-su: dmsetup: command not found
sv3000:~#


I cut the salt and digest.
Best regards
Rainer


Jonas Meurer schrieb:
> Hello Rainer,
> 
> On 12/08/2009 RaMaier@gmx.de wrote:
>> Here my description what has happened. Hopefully it becomes clearer now.
>>  
>> What I wrote were the initial steps I perforemed when I first set up
>> the partition (/dev/sda2). Again I did not repeat them now.
>> After my old PC had died I installed the RAID controller in a new PC
>> and installed Debian. (/dev/hda) cryptsetup is now already included.
>> (Thanks for the hint Arno)
>> Since it's a hardware controller the files on the not encrypted
>> partition (/dev/sda1) were immediately available.
>> Now I am looking for the steps I have to perform to access the data in
>> the encrypted partition (/dev/sda2) again, without destroying them.
>>
>> When I now enter
>> cryptsetup luksOpen /dev/sda2 tresor
>> I get 
>> Command failed: No steup backend available
> 
> please give some more information. i.e. paste the output of the
> following commands (as root):
> 
> # dpkg -l cryptsetup
> 
> # cryptsetup --version
> 
> # cryptsetup luksDump /dev/sda2
> 
> # cat /proc/crypto
> 
> none of the commands modifies your partition, they only print
> information about versions, partition types, crypto ciphers, kernel
> crypto support, etc.
> 
> greetings,
>  jonas
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
  2009-08-11 22:54           ` RaMaier
  2009-08-11 23:01             ` Sam
@ 2009-08-12  6:51             ` Milan Broz
  2009-08-12 12:25               ` Rainer Maier
  1 sibling, 1 reply; 16+ messages in thread
From: Milan Broz @ 2009-08-12  6:51 UTC (permalink / raw)
  To: RaMaier; +Cc: dm-crypt, Sam

RaMaier@gmx.de wrote:

> Command failed: No setup backend available

This should never happen, did you compile cryptsetup yourself
and with some extra parameters to configure?

(This says there is no backend in your binary and it cannot work at all,
actually plugins never worked properly and libdevmapper is only option to use here)

If so, do not add any plugin parameters to configure, or
just try to add --enable-libdevmapper only. Or better, use distro
compiled version.


Milan

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
  2009-08-12  6:19           ` Rainer Maier
@ 2009-08-12  9:39             ` Jonas Meurer
  0 siblings, 0 replies; 16+ messages in thread
From: Jonas Meurer @ 2009-08-12  9:39 UTC (permalink / raw)
  To: Rainer Maier; +Cc: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 2068 bytes --]

hey,

On 12/08/2009 Rainer Maier wrote:
> here is the output:

let's see ...

> sv3000:~# dpkg -l cryptsetup
> un  cryptsetup            <keine>           (keine Beschreibung vorhanden)

> sv3000:~# cryptsetup --version
> cryptsetup 1.0.6

interesting. so how did you install cryptsetup. did you compile it
yourself? why don't you use the cryptsetup version distributed within
debian? you can install it with 'apt-get install cryptsetup', this takes
care of required libraries and other dependencies as well (see below).

> sv3000:~# cryptsetup luksDump /dev/sda2
> LUKS header information for /dev/sda2
> 
> Version:        1
> Cipher name:    aes
> Cipher mode:    cbc-essiv:sha256
> Hash spec:      sha1
> Payload offset: 1032
> MK bits:        128
> MK digest:
> 
> MK salt:
> 
> MK iterations:  10
> UUID:           6c2a5824-5594-4516-885b-4a82a5be9554

ok, so the luks partition itself seems to be fine.

> sv3000:~# cat /proc/crypto
> name         : aes
> driver       : aes-i586
> module       : aes_i586
> priority     : 200
> refcnt       : 1
> type         : cipher
> blocksize    : 16
> min keysize  : 16
> max keysize  : 32
> 
> name         : md5
> driver       : md5-generic
> module       : kernel
> priority     : 0
> refcnt       : 1
> type         : digest
> blocksize    : 64
> digestsize   : 16

that one misses the cbc blockcipher at least. try 'modprobe cbc'. if
that doesn't work, check your kernel config. do you run a debian kernel
or a selfcompiled one? in the first case cbc should be available. in the
second you should know what to do to add cbc support to your kernel.

> sv3000:~# dmsetup targets
> -su: dmsetup: command not found

ah, that's interesting. so you seem to not have installed dmsetup. do
you have libdevmapper at all? i really suggest to use the debian
cryptsetup package and let the debian package system manage
dependencies. that way you can be sure that all required programs and
libraries are installed allong with cryptsetup.

greetings,
 jonas

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dm-crypt] reinstallation
  2009-08-12  6:51             ` Milan Broz
@ 2009-08-12 12:25               ` Rainer Maier
  0 siblings, 0 replies; 16+ messages in thread
From: Rainer Maier @ 2009-08-12 12:25 UTC (permalink / raw)
  To: Milan Broz; +Cc: dm-crypt, Sam

Hi Milan,
I think it works.
I kicked my self compiled version and installed the actual maintainer with apt.
At least the machine is now asking for the password.

Thank you very much
Best regards
Rainer

Milan Broz schrieb:
> RaMaier@gmx.de wrote:
> 
>> Command failed: No setup backend available
> 
> This should never happen, did you compile cryptsetup yourself
> and with some extra parameters to configure?
> 
> (This says there is no backend in your binary and it cannot work at all,
> actually plugins never worked properly and libdevmapper is only option to use here)
> 
> If so, do not add any plugin parameters to configure, or
> just try to add --enable-libdevmapper only. Or better, use distro
> compiled version.
> 
> 
> Milan
> 
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-08-12 12:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-11 13:40 [dm-crypt] reinstallation Rainer Maier
2009-08-11 14:01 ` Hannes Erven
2009-08-11 21:25   ` RaMaier
2009-08-11 22:06     ` Moji
2009-08-11 22:40       ` RaMaier
2009-08-11 23:34         ` Jonas Meurer
2009-08-11 23:36           ` Jonas Meurer
2009-08-12  6:19           ` Rainer Maier
2009-08-12  9:39             ` Jonas Meurer
     [not found]     ` <20090811214229.GA4796@tansi.org>
2009-08-11 22:25       ` RaMaier
     [not found]         ` <200908111839.19827.samm@sammaloney.com>
2009-08-11 22:54           ` RaMaier
2009-08-11 23:01             ` Sam
2009-08-12  6:09               ` Rainer Maier
2009-08-12  6:51             ` Milan Broz
2009-08-12 12:25               ` Rainer Maier
  -- strict thread matches above, loose matches on Subject: below --
2009-08-11 22:40 Sam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.