Re: [dm-crypt] Attaching loopback device failed

Milan Broz <[email protected]>
Newsgroups de.saout.dm-crypt
Message-ID <[email protected]>
On 26/07/2020 20:23, Fourhundred Thecat wrote:
> Hello,
> 
> I have both luks headerand key in files
> 
> # ls
> LUKS-HEADER  key
> 
> the directory is read-only (chattr -R +i .)
> 
> When I try to luksOpen my paretition, I get following error:
> 
>   # cryptsetup --allow-discards luksOpen /dev/sda2 sda2 --header
> LUKS-HEADER --key-file key
>   Attaching loopback device failed (loop device with autoclear flag is
> required).
>   Device LUKS-HEADER doesn't exist or access denied.
> 
> when I change the current directory to read-write (chattr -R -i .) then
> it works.
> 
> But why does cryptsetup need luks header and key to be writable ?

It should not. Can you run the command with --debug and post the output?

Does it work if you activate it with read-only flag (--readonly / -r)?

Fopr these reports, we always need version (kernel, utility, crypto backend etc),
debug output should include all these versions.

Milan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.