[dm-crypt] Missing keyslot or broken header or still some hope?

Michael Kjörling michael at kjorling.se
Fri Nov 4 21:08:41 CET 2016

On 4 Nov 2016 20:35 +0100, from zero.tonin at web.de:
> I suspected a hw issue and thus, at least, ran the vendor's
> diagnostic tools, but no issue could be found, including memory and
> HDD - would it more likely be something related to the disk itself
> (bad sectors, broken read-heads et cetera?)

My first assumption would not be that the disk is physically broken
yet still manages to read data in any meaningful way, but silent data
corruption is a real thing, despite HDD manufacturers' attempts at
correcting or at least detecting any failed reads. That said, though,
your LUKS header looks _sane_; I would expect silent corruption to
yield essentially random data for the full sector.

> Great idea to test the drive on a different machine - would a dd
> copy suffice for that, as I am afraid I do not posses the skills to
> take my laptop apart.

A binary copy as made by e.g. dd should absolutely be sufficient. In
fact, it's probably a good idea to make such a copy in any case;
having that copy will allow you to experiment.

If you can spare the disk space, make one copy, and then duplicate it,
then work on one of those copies while making sure to not touch the
other; that way, no matter what you do and no matter what happens to
the physical media from that point onwards, you can always go back to
the original copy and make a new working copy.

I _strongly_ recommend ddrescue over dd; ddrescue is far better suited
for this use case. It also gives you a nice progress indication while
it is working.

Michael Kjörling • https://michael.kjorling.semichael at kjorling.se
                 “People who think they know everything really annoy
                 those of us who know we don’t.” (Bjarne Stroustrup)

More information about the dm-crypt mailing list