Re: cryptsetup: luksFormat: requires <device> as arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/07/2020 15:42, Fourhundred Thecat wrote:
> Hello,
> 
> I am trying to create a new detached luks header, but the command fails:
> 
> 
>    cryptsetup -v --type luks1 --cipher aes-xts-plain64 --key-size 512
> --hash sha512 --use-random luksFormat /dev/null --header LUKS-HEADER
> --align-payload=0

Do not use /dev/null, it is not a block device (/dev/null is a char device)!

Just use your data device. Cryptsetup need to check sector size, check if device is
not used by fs etc.

It is not writing anything there (unless it requires wipe).

> 
>    WARNING!
>    ========
>    This will overwrite data on LUKS-HEADER irrevocably.
> 
>    Are you sure? (Type uppercase yes): YES
>    Enter passphrase for LUKS-HEADER:
>    Verify passphrase:
>    Device /dev/null is not compatible.
>    Command failed with code -3 (out of memory).
> 
> 
> And when I ommit /dev/null, then I get another error:
> 
> 
>    cryptsetup: luksFormat: requires <device> [<new key file>] as arguments
> 
> 
> Why does cryptsetup require a device, when I am formatting the detached
> luks header? No device is involved at this point. All I want is to
> create header file.

As said above. If you need to fake it, use header instead of data device (IOW use it twice).

Milan
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
https://www.saout.de/mailman/listinfo/dm-crypt



[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux