Return-Path: Received: from mail01.freesources.org (mx01.freesources.org [80.237.252.149]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Thu, 27 Aug 2009 20:40:01 +0200 (CEST) Received: from dslb-088-069-167-238.pools.arcor-ip.net ([88.69.167.238] helo=resivo.wgnet.de) by mail01.freesources.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MgjtA-0006lC-BO for dm-crypt@saout.de; Thu, 27 Aug 2009 18:40:01 +0000 Received: from resivo by resivo.wgnet.de with local (Exim 4.69) (envelope-from ) id 1Mgjt9-0001Mf-3X for dm-crypt@saout.de; Thu, 27 Aug 2009 20:39:59 +0200 Date: Thu, 27 Aug 2009 20:39:59 +0200 From: Jonas Meurer Message-ID: <20090827183958.GD24973@resivo.wgnet.de> References: <20090827145703.GA11409@fancy-poultry.org> <4A96A9D8.4070904@gmail.com> <20090827162838.GB24973@resivo.wgnet.de> <4A96BC64.9020308@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A96BC64.9020308@redhat.com> Subject: Re: [dm-crypt] volume unrecognized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On 27/08/2009 Milan Broz wrote: > Jonas Meurer wrote: > >> cryptsetup luksDump $DEVICE > >> > >> Find the payload number > >> > >> dd if=$DEVICE of=luks_header_bakup count=$PAYLOAD > >> > >> To restore them just reverse if and of in dd > >> > >> dd if=$luks_header_backup of=$DEVICE count=$PAYLOAD > > > > you should add bs=1 to the dd commandline. default is 512, which would > > result in $PAYLOAD*512 bytes being read/written. > > Nope, payload offset in dump _is_ in 512 byte sector units. > bs=512 is correct. > > (You will save all (even unused) keyslots here, but this is not problem) oups, i should have read the docs before spreading bullshit. sorry for that. greetings, jonas