[dm-crypt] Basics

Arno Wagner arno at wagner.name
Wed Sep 30 17:00:03 CEST 2015

You are using /dev/sdb1 as your keyfile. cryptsetup
has a compiled-in size limit on keyfiles, which is
per default 8kB. If /dev/sdb1 is larger, you get the
error you observe.


On Wed, Sep 30, 2015 at 14:16:26 CEST, Mike Nagie wrote:
> Why is this happening? I'm trying to create encrypted luks partition 
> with a keyfile.
> cryptsetup luksFormat /dev/sda2 /dev/sdb1
> This will overwrite data on /dev/sda2 irrevocably.
> Are you sure? (Type uppercase yes): YES
> Maximum keyfile size exceeded.
> cryptsetup luksFormat /dev/sda2 /dev/sdb1 10.54s user 4.55s system 83% 
> cpu 18.1
> (and sometimes: command failed with code 22 invalid argument)
> cryptsetup open --type luks /dev/sda2 home -d /dev/sdb1
> Maximum keyfile size exceeded.
> cryptsetup open --type luks /dev/sda2 home -d /dev/sdb1  10.43s user 
> 4.64s system 99% cpu 15.103 total
> -- 
> You are so lucky!
> _______________________________________________
> dm-crypt mailing list
> dm-crypt at saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

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 mailing list