How to know a LUKS header is corrupt

disk-encryptiondmcryptluks

My computer froze for a long time and I pressed the reset button. After reboot, all FIVE luks-encrypted (LUKS 1) file systems will no longer open. The message I get is "No key available with this passphrase." I am sure I am using the right password. I have been using the same password for all file systems for years. I have backups for all those volumes except one so I would like to analyze my options for it. I have tried 'cryptsetup isLuks' and 'cryptsetup luksDump' on all the file systems and all of them are successful, I mean, they are Luks partitions and I can dump their headers and see their slots. However, on research, I found similar cases where people say their headers have been damaged beyond repair. I don't know how to identify that. How do I do that? Thank you for any information.

Best Answer

I found this page:

https://bbs.archlinux.org/viewtopic.php?pid=1846810#p1846810

Also this page:

https://www.linuxquestions.org/questions/linux-general-1/need-help-to-recover-luks-partition-4175613302/#post5756030

More specifically,

"You can tell fairly quickly whether there is any chance of recovery. Run "hexedit -s /dev/sdx" and search for the hex string "4C 55 4B 53 BA BE" at the start of a sector. (That's the ASCII string "LUKS" followed by the hex bytes 0xBA and 0xBE.) If you don't find that within the first few megabytes of the disk, the LUKS header is gone."

All the five file systems that refuse to open have that string intact in their headers so they all seem to be not damaged. Now, why all of them won't open is a separate issue and I suspect I will never find out what happened.

Related Topic