* [dm-crypt] Encrypted fs in file
@ 2016-04-03 4:07 doark
2016-04-03 8:41 ` Matthias Schniedermeyer
0 siblings, 1 reply; 4+ messages in thread
From: doark @ 2016-04-03 4:07 UTC (permalink / raw)
To: dm-crypt
Hello,
I wanted to make certain that I got this process right since I've never
done it before and I can't seem to find docs on the subject.
1. Cat /dev/zero into a new file till it is big enough.
2. Use cryptsetup on the file (format and open).
3. Use mkfs on the loop device.
4. Mount the loop device as if it were a block device.
Does this look correct to you?
Thanks, David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dm-crypt] Encrypted fs in file
2016-04-03 4:07 [dm-crypt] Encrypted fs in file doark
@ 2016-04-03 8:41 ` Matthias Schniedermeyer
2016-04-03 16:03 ` Sven Eschenberg
0 siblings, 1 reply; 4+ messages in thread
From: Matthias Schniedermeyer @ 2016-04-03 8:41 UTC (permalink / raw)
To: doark; +Cc: dm-crypt
On 03.04.2016 00:07, doark@mail.com wrote:
> Hello,
> I wanted to make certain that I got this process right since I've never
> done it before and I can't seem to find docs on the subject.
>
> 1. Cat /dev/zero into a new file till it is big enough.
> 2. Use cryptsetup on the file (format and open).
> 3. Use mkfs on the loop device.
> 4. Mount the loop device as if it were a block device.
>
> Does this look correct to you?
Nearly.
3) Not the loop device, but the dm-device, the loop it inbetween and is
handled automatically.
A symlink for the dm-device appears in /dev/mapper/ with the name you
provided for the open command.
Same for 4) You mount the dm-device
--
Matthias
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dm-crypt] Encrypted fs in file
2016-04-03 8:41 ` Matthias Schniedermeyer
@ 2016-04-03 16:03 ` Sven Eschenberg
2016-04-03 23:57 ` Arno Wagner
0 siblings, 1 reply; 4+ messages in thread
From: Sven Eschenberg @ 2016-04-03 16:03 UTC (permalink / raw)
To: dm-crypt
And regarding 1):
You might want to use dd for that and /dev/urandom. (Or use /dev/zero
and then zero out the inner device before creating the filesystem).
Regards
-Sven
Am 03.04.2016 um 10:41 schrieb Matthias Schniedermeyer:
> On 03.04.2016 00:07, doark@mail.com wrote:
>> Hello,
>> I wanted to make certain that I got this process right since I've never
>> done it before and I can't seem to find docs on the subject.
>>
>> 1. Cat /dev/zero into a new file till it is big enough.
>> 2. Use cryptsetup on the file (format and open).
>> 3. Use mkfs on the loop device.
>> 4. Mount the loop device as if it were a block device.
>>
>> Does this look correct to you?
>
> Nearly.
>
> 3) Not the loop device, but the dm-device, the loop it inbetween and is
> handled automatically.
>
> A symlink for the dm-device appears in /dev/mapper/ with the name you
> provided for the open command.
>
> Same for 4) You mount the dm-device
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dm-crypt] Encrypted fs in file
2016-04-03 16:03 ` Sven Eschenberg
@ 2016-04-03 23:57 ` Arno Wagner
0 siblings, 0 replies; 4+ messages in thread
From: Arno Wagner @ 2016-04-03 23:57 UTC (permalink / raw)
To: dm-crypt
Also refer to FAQ item 2.6
https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions
The zeroing out of the mapped container is advisable
if this needs high security, i.e. is not just for
experiments.
Regards,
Arno
On Sun, Apr 03, 2016 at 18:03:11 CEST, Sven Eschenberg wrote:
> And regarding 1):
>
> You might want to use dd for that and /dev/urandom. (Or use
> /dev/zero and then zero out the inner device before creating the
> filesystem).
>
> Regards
>
> -Sven
>
>
> Am 03.04.2016 um 10:41 schrieb Matthias Schniedermeyer:
> >On 03.04.2016 00:07, doark@mail.com wrote:
> >>Hello,
> >>I wanted to make certain that I got this process right since I've never
> >>done it before and I can't seem to find docs on the subject.
> >>
> >>1. Cat /dev/zero into a new file till it is big enough.
> >>2. Use cryptsetup on the file (format and open).
> >>3. Use mkfs on the loop device.
> >>4. Mount the loop device as if it were a block device.
> >>
> >>Does this look correct to you?
> >
> >Nearly.
> >
> >3) Not the loop device, but the dm-device, the loop it inbetween and is
> >handled automatically.
> >
> >A symlink for the dm-device appears in /dev/mapper/ with the name you
> >provided for the open command.
> >
> >Same for 4) You mount the dm-device
> >
> >
> >
> >
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-03 23:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-03 4:07 [dm-crypt] Encrypted fs in file doark
2016-04-03 8:41 ` Matthias Schniedermeyer
2016-04-03 16:03 ` Sven Eschenberg
2016-04-03 23:57 ` Arno Wagner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.