* [dm-crypt] Attaching loopback device failed
@ 2020-07-26 18:23 Fourhundred Thecat
2020-07-26 18:41 ` Milan Broz
0 siblings, 1 reply; 2+ messages in thread
From: Fourhundred Thecat @ 2020-07-26 18:23 UTC (permalink / raw)
To: dm-crypt
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 ?
thanks,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dm-crypt] Attaching loopback device failed
2020-07-26 18:23 [dm-crypt] Attaching loopback device failed Fourhundred Thecat
@ 2020-07-26 18:41 ` Milan Broz
0 siblings, 0 replies; 2+ messages in thread
From: Milan Broz @ 2020-07-26 18:41 UTC (permalink / raw)
To: Fourhundred Thecat, dm-crypt
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-26 18:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-26 18:23 [dm-crypt] Attaching loopback device failed Fourhundred Thecat
2020-07-26 18:41 ` Milan Broz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).