From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Mon, 2 Aug 2010 19:34:06 +0200 (CEST) Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 1BF9718BA85 for ; Mon, 2 Aug 2010 13:33:30 -0400 (EDT) Message-Id: <1280770406.18055.1387939849@webmail.messagingengine.com> From: "Willie" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" References: <1280697096.16046.1387795841@webmail.messagingengine.com><20100801230113.GA14693@tansi.org><1280704838.643.1387808231@webmail.messagingengine.com> <20100802002730.GA15890@tansi.org> <1280738327.12803.1387859489@webmail.messagingengine.com><4C5696E2.1000509@redhat.com> <4C56CB65.1060804@redhat.com> In-Reply-To: <4C56CB65.1060804@redhat.com> Date: Mon, 02 Aug 2010 10:33:26 -0700 Subject: Re: [dm-crypt] How to gather LUKS parameters from active device (if LUKS header lost) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On Mon, 02 Aug 2010 15:43 +0200, "Milan Broz" wrote: > > > On 08/02/2010 11:58 AM, Milan Broz wrote: > > If you see dm-crypt mapping there mapped to proper drive, you can still recreate > > LUKS header with some some magic. > > Well, here is the idea how to reconstruct LUKS header from active mapping > if header is lost but mapping is still active. > (Note: if device is not active, recovery is impossible). > > - it will change LUKS UUID! > - no passphrase needed, it asks for new one (root access required of > course) > - cryptsetup 1.1.x required. > > Do not save master key file (second param) to unencrypted filesystem! > > I'll add something similar to cryptsetup distro into DOC install, > for now take this as an idea - see attached script (it will not touch > device, > only saves master key to file and print required parameters for > cryptsetup). > > BEWARE: NO GUARANTEES AT ALL. NOT PROPERLY TESTED. > > Example: > If you have mapped device named "luks_sdb", script will produce this: > > #