All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] luks partition table altered by linux-swap
Date: Mon, 28 Sep 2009 17:03:15 +0200	[thread overview]
Message-ID: <4AC0D033.5040309@redhat.com> (raw)
In-Reply-To: <20090928144819.GB7395@resivo.wgnet.de>

Jonas Meurer wrote:
> On 28/09/2009 anton ivanov wrote:
> i don't know redhat cryptsetup management, but maybe a swap filesystem
> was created (mkswap) on the disk in question? in that case, the luks
> and/or raid headers might have been overwritten ...

IIRC mkswap in 5.3 do not overwrite first two sectors (so visible LUKS
header is intact) but it probably overwrites part of the first keyslot area.
(I think this changed in new version, there mkswap wipe first 4k.)

If this happens, you are out of luck - it will detect LUKS header but
keyslot is lost and unusable.

(Unfortunately other keyslots are unused, so you cannot use other passphrase.)

> Just curious maybe there is some cryptsetup ability to recover
> partition table on disk without luksFormat but using already stored
> metadata on the drive.

You must first decrypt the data, then you can search in them. Data offset
is known - see LUKS dump and payload offset (in sectors). But without
master key (iow without valid kesylot) you cannot decrypt it anyway.

Milan

  parent reply	other threads:[~2009-09-28 15:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-28 11:09 [dm-crypt] luks partition table altered by linux-swap anton ivanov
2009-09-28 14:28 ` Heinz Diehl
2009-09-28 14:29   ` anton ivanov
2009-09-28 14:48     ` Jonas Meurer
2009-09-28 14:56       ` anton ivanov
2009-09-29  8:27         ` Jonas Meurer
2009-09-29  8:31           ` anton ivanov
2009-09-28 15:03       ` Milan Broz [this message]
2009-09-28 16:33         ` anton ivanov
2009-09-28 17:44           ` anton ivanov
2009-09-29  8:01             ` Jonas Meurer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AC0D033.5040309@redhat.com \
    --to=mbroz@redhat.com \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.