[dm-crypt] Broken LUKS header

Andreas Aßmann fonic.maxxim at live.com
Wed Sep 3 11:03:46 CEST 2014


Hi everyboy,

I got a (serious) problem with a broken LUKS header.

A little background:
I've
 been using dm-crypt / LUKS for many years without ever having any 
problems until now. On one of my Linux boxes, I have three encrypted 
volumes for root (/dev/sda2), swap (/dev/sda3) and home (/dev/sdb1).

My problem:
A
 few days ago, I tried to add a key file to all three volumes using 
'cryptsetup luksAddKey'. The command succeeded for sda2 and sda3. Adding
 the key file to sdb1, however, failed with 'Invalid Key Slot 6, Invalid
 Key Slot 7'. It seems the LUKS header of sdb1 was corrupted in the 
process. Probing the header using 'cryptsetup luksDump' fails with the 
same error message.

Fortunately, sdb1 was unlocked and mounted 
when this happened - I was still able to access data on this volume and 
from what I've seen, everything is still intact, so I created a complete
 backup right away using rsync. However, I would feel much better if I 
could repair the header to verify that the backup I made actually 
contains all data from sdb1.

I also created a 1:1 backup of sdb1 
using dd. On this backup, I tried 'keyslot_checker' and 'cryptsetup 
repair'. The first didn't work at all, the latter reported invalid 
offsets for key slots 6 and 7 and fixed them. However, I was unable to 
open the volume using my normal passphrase afterwards, so that didn't 
work out as expected.

Help would be greatly appreciated. Sorry for my bad English, I am not a native speaker.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20140903/08241822/attachment.html>


More information about the dm-crypt mailing list