Return-Path: Received: from sargon.lncsa.com (mail.ipv6.lncsa.com [IPv6:2001:7a8:820::10]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Thu, 23 Sep 2010 15:21:18 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by sargon.lncsa.com (Postfix) with ESMTP id 94ACE302555B for ; Thu, 23 Sep 2010 15:21:17 +0200 (CEST) Received: from sargon.lncsa.com ([127.0.0.1]) by localhost (sargon.lncsa.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WEMBF70hXCbw for ; Thu, 23 Sep 2010 15:21:17 +0200 (CEST) Received: from zenon.apartia.fr (zenon.apartia.fr [10.0.3.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "zenon.apartia.fr", Issuer "ca.apartia.fr" (verified OK)) by sargon.lncsa.com (Postfix) with ESMTP id 760ED3025553 for ; Thu, 23 Sep 2010 15:21:17 +0200 (CEST) Received: from galba.apartia.fr (galba.apartia.fr [10.0.3.119]) by zenon.apartia.fr (Postfix) with ESMTP id BCF485B93F8DD for ; Thu, 23 Sep 2010 15:21:09 +0200 (CEST) Date: Thu, 23 Sep 2010 15:21:16 +0200 From: Louis-David Mitterrand Message-ID: <20100923132116.GA4097@apartia.fr> References: <20100923090234.GA4126@apartia.fr> <20100923094447.GA4021@resivo.wgnet.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100923094447.GA4021@resivo.wgnet.de> Subject: Re: [dm-crypt] using decrypt_derived on a second (non-swap) partition List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On Thu, Sep 23, 2010 at 11:44:51AM +0200, Jonas Meurer wrote: > Hey Louis, > > this mailinglist is not the right place to discuss distribution specific > features. decrypt_derived is a keyscript which is provided by the debian > cryptsetup package. please use the debian bugtracking system > (bugs.debian.org) or pkg-cryptsetup-devel@lists.alioth.debian.org > instead. Hi, Can I have similar functionality without using debian's decrypt_derived? > On 23/09/2010 Louis-David Mitterrand wrote: > > Is it possible to use the decrypt_derived script to mount a second > > (non-swap) partition with the same passphrase as the root partition? > > > > I tried the following et /etc/crypttab: > > > > cmd1 /dev/md1 none luks > > # cmd2 /dev/md2 none luks > > cmd2 /dev/md2 cmd1 keyscript=/lib/cryptsetup/scripts/decrypt_derived,luks > > > > (/dev/mapper/cmd2 is mounted on /backup) > > > > But I get this error when running "/etc/init.d/cryptdisks restart": > > > > galba:/home/ldm# /etc/init.d/cryptdisks restart > > Stopping remaining crypto disks...cmd1 (busy)...cmd2 (stopped)...done. > > Starting remaining crypto disks...cmd1 (running)...cmd2 (starting)... > > No key available with this passphrase. > > No key available with this passphrase. > > No key available with this passphrase. > > cmd2 (failed)...failed. > > done. > > you need to add the relevant key to /dev/md2 first. > see section '9. The "decrypt_derived" keyscript' at > /usr/share/doc/cryptsetup/README.initramfs.gz for more information. > > in short, do the following: > > get the key: > $ /lib/cryptsetup/scripts/decrypt_derived cmd1 > > add the new key: > $ cryptsetup luksAddKey /dev/md2 > [ paste the derived key as new passphrase ] > > afterwards, unlocking md2 with the derived key should work. Yes it works well, thanks.