Friday, January 31, 2020

Recovering corrupted encrypted partition

Hello,
Recently my 6.6-stable machine lost power while on, which aparently
corrupted a softraid crypto partition (not a boot partition) that was
mounted. Trying to decrypt it with the same bioctl command i usually
use fails with the error:
softraid0: invalid metadata format

I tried bioctl's "-R" and "-C force" options, which fail with the same
error.

After searching all over the mailing list archives, I couldn't find a
solution that didn't destroy data. Some people suggested zeroing the
first megabyte and reconfiguring the disklabel, but I'm not sure if that
would overwrite my existing data.

It seems that recovering the partition itself is not easy/possible at
the moment. However, could I manually decrypt the data? I tried running
openssl enc -d -aes-256-xts -salt -k <password>
at numerous byte offsets from the start of the partition, but so far it
has been failing with the error "bad magic number".

Any other ideas?

No comments:

Post a Comment