[dm-crypt] LUKS keyslot 4 is invalid
arno at wagner.name
Wed Nov 26 00:15:16 CET 2014
Then do it manually.
1. Look up the header size. It should be either 1'052'672 Bytes or 2MiB.
What you need is the key-size.
cryptsetup luksDump <device>
MK bits: 256
for 1'052'672 Bytes or the same with 512 for 2MiB.
If that does nto work, and you do not know the size of your mater
key, dump 2MiB. Note: Do not change the filesystem if you
want to restor a header that may be too large! With that,
resyoting up to 1MiB of the filesystem is still safe.
2. Copy it manually. There are a nu,ber of options to do this, I
head -c 1052672 <device> > header_backup.dmp
head -c 2M <device> > header_backup.dmp
for a 2MiB header.
Verify the size of the file to be sure.
Keep that file safe, and you can try
cryptsetup repair <device>
I also just added this procedure to FAQ Item 6.2.
On Tue, Nov 25, 2014 at 22:50:57 CET, Jarosław K wrote:
> *Hi Arno,Thanks for response.Unfortunatelly:root at s4per-debian:/home/s4per#
> cryptsetup luksHeaderBackup --header-backup-file luksbackup
> /dev/mapper/isw_echheajchc_MirrorNumer klucza LUKS 4 jest nieprawidłowy.*
> ---> LUKS keyslot 4 is invalid
> 2014-11-19 23:52 GMT+01:00 Jarosław K <s4per89 at gmail.com>:
> > Hi all,
> > I have an encrypted RAID 1 volume for /home directory. I set it to mount
> > automatically after login (based on
> > http://nanonanonano.net/linux/debian/enchome). All of it works perfect
> > during a few months. Until today ... After login I saw a "clean" user
> > profile on my Debian. I know that, my encrypted drive didn't mount
> > correctly. Unfortunately, manually mount failed too:
> > root at s4per-debian:/home/s4per# cryptsetup luksOpen
> > /dev/mapper/isw_echheajchc_Mirror crypt
> > Numer klucza LUKS 4 jest nieprawidłowy. ---> LUKS keyslot 4 is invalid
> > (?)
> > I have read something about this issue, and now i think it could be
> > problem with LUKS headers. But unfortunatelly i have no any backup of it.
> > In Poland we says "Polish wise after the event". Now I know, that I should
> > make some backup of headers.
> > I kindly request for some help.
> > My OS: Debian Sid AMD64
> > Regards,
> > s4per
> Jarosław Kołata
> dm-crypt mailing list
> dm-crypt at saout.de
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno at wagner.name
GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
A good decision is based on knowledge and not on numbers. -- Plato
If it's in the news, don't worry about it. The very definition of
"news" is "something that hardly ever happens." -- Bruce Schneier
More information about the dm-crypt