public inbox for cryptsetup@lists.linux.dev
 help / color / mirror / Atom feed
From: Dominik Rak <dominik@prograk.pl>
To: cryptsetup <cryptsetup@lists.linux.dev>
Subject: label written on top of the header
Date: Wed, 25 Jun 2025 16:05:59 +0200 (CEST)	[thread overview]
Message-ID: <438242573.9620.1750860359542.JavaMail.zimbra@prograk.pl> (raw)

hello
i have overwritten a part of the luks2 header with an mbr label but the 2nd binary header and 2nd json area and everything after it is fully intact
i am coming back to this after a long long break because when i saw "By far the most questions on the cryptsetup mailing list are from people that managed to damage the start of their LUKS partitions, i.e. the LUKS header. In most cases, there is nothing that can be done to help these poor souls recover their data." i decided to give up
but now i decided to do some more digging and it seems to me that it is recoverable

i created a new volume with the same settings to see how it should look like and then on a copy of the original drive i changed the starting part to be the same as the one from the new volume (the LUKS ... @ ... sha256 ...) and the rest from the 2nd binary header and 2nd json in the place where the 1st ones should be using hexedit and then that looked like a normal working luks header

but that didnt work, so now im here
if the command is:
cryptsetup luksOpen <device> <name>
then does the <name> matter in decryption? or can it be anything? because if it cant be anything then i dont remember it nor have access to it after such a long time

also after creating a few sample volumes i have noticed that the area where the 1st binary header and 1st json area are compared to the area where the 2nd binary header and 2nd json area are is not identical because there is some undocumented something, unspecified in the https://gitlab.com/cryptsetup/LUKS2-docs/blob/main/luks2_doc_wip.pdf , if its not random then it was overwritten by the label

and the last thing i can think of, does the uuid of the device matter in decryption?

im sorry for bothering but please tell me what to do, if anything can be done

             reply	other threads:[~2025-06-25 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-25 14:05 Dominik Rak [this message]
2025-06-25 14:16 ` label written on top of the header 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=438242573.9620.1750860359542.JavaMail.zimbra@prograk.pl \
    --to=dominik@prograk.pl \
    --cc=cryptsetup@lists.linux.dev \
    /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