[Linux-disciples] Re: Creating an encrypted device
Stephen R Laniel
steve at laniels.org
Sun Feb 13 15:42:39 EST 2005
On Thu, Feb 10, 2005 at 11:53:52PM -0500, Stephen R Laniel wrote:
> So then, to create an encrypted filesystem on cryptsys, I
> can do
>
> cryptsetup create cryptvol1 /dev/loop0
Hmm. I'm having a hard time getting this to work. Here's
what I did:
1) Created an 4-gig empty file and created an ext3
filesystem on it:
dd if=/dev/zero of=cryptdev bs=4096 count=1048576
mkfs.ext3 cryptdev
2) Created a loopback device that simulates a block device
on cryptdev:
losetup /dev/loop0 cryptdev
3) Loaded the dm-crypt and aes modules:
modprobe dm-crypt
modprobe aes
4) Tried to make /dev/loop0 into an encrypted device sitting
atop cryptdev:
cryptsetup create cryptdev /dev/loop0
and then, just to make sure,
cryptsetup create /dev/loop0 cryptdev
No luck: I get "Command failed: Invalid argument" errors,
suggesting that cryptsetup is looking for a block special
device with the right major and minor numbers.
Any idea how to get this to work?
--
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
More information about the Linux-disciples
mailing list