public inbox for dm-crypt@saout.de
 help / color / mirror / Atom feed
From: "Konstantin V. Gavrilenko" <k.gavrilenko@arhont.com>
To: dm-crypt@saout.de
Subject: [dm-crypt] LUKS Header crruption
Date: Sun, 28 Jul 2019 12:57:50 +0100 (BST)	[thread overview]
Message-ID: <265658862.16.1564315066873.JavaMail.gkos@xpska> (raw)
In-Reply-To: <1590255742.9.1564314256863.JavaMail.gkos@xpska>

Hi List,

as a result of executing a command from the history, after a reboot, when the disk letters were changed, I have accidentally overwritten the LUKS header with the raid superblock one :(

Now I can not open the cryptodisk with the "luksOpen" as it states the "No key available with this passphrase."


However, when I run "luksDump" the header information is available

# cryptsetup luksDump /dev/sdd1                                                                                                                                      
LUKS header information for /dev/sdd1

Version:        1
Cipher name:    aes
Cipher mode:    xts-plain64
Hash spec:      sha256
Payload offset: 4096
MK bits:        256
MK digest:      a6 a6 de 04 5a 19 9f 97 54 a9 79 bf f8 c1 37 89 69 44 34 76 
MK salt:        7a 0b 8e cc 68 06 35 ec 09 fc 5e f9 90 e3 c9 ef 
                8b 11 96 10 4c 25 ab 89 a1 48 df fe 6a 88 20 96 
MK iterations:  232809
UUID:           0f91c412-6f6a-405d-8040-5cc17ad17b47

Key Slot 0: ENABLED
        Iterations:             3724958
        Salt:                   c4 52 ac 04 59 8a d1 4f 7a 3c 5d e8 d3 50 1a c4 
                                11 20 0b 66 66 81 78 09 9f 7a f4 c1 dc 80 d4 40 
        Key material offset:    8
        AF stripes:             4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED



The RAID superblock that was written by mdadm is default, version 1.2	that is located 4K from the beginning of the device.


Providing that I have no backup of the original header and I know wht was written, is there a way to restore the header and get the data?


Konstantin 

       reply	other threads:[~2019-07-28 12:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1590255742.9.1564314256863.JavaMail.gkos@xpska>
2019-07-28 11:57 ` Konstantin V. Gavrilenko [this message]
2019-07-28 21:00   ` [dm-crypt] LUKS Header crruption Arno Wagner
2019-07-29  7:25     ` Uwe Menges
2019-07-29  9:28       ` Arno Wagner
     [not found] <1313728220.30.1564401565268.JavaMail.gkos@xpska>
2019-07-29 12:08 ` Konstantin V. Gavrilenko
2019-07-29 13:56   ` Robert Nichols
2019-07-29 14:33     ` Milan Broz

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=265658862.16.1564315066873.JavaMail.gkos@xpska \
    --to=k.gavrilenko@arhont.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox