Re: automating cryptoapi startup & shutdown

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

 



On Tue, 11 Jun 2002 15:20:06 -0400, Wayne F Davis wrote:
> my modules.conf includes:
> alias cipher-aes-ecb cipher-aes
> alias cipher-aes-cbc cipher-aes
> 
> my fstab:
> /dev/loop0 /mnt/crypt ext3 defaults,loop,encryption=aes,keybits=128 1 0
> 
> ---
> 
> However, I can't mount the drive using mount ...
> # mount /mnt/crypt
> ioctl: LOOP_SET_FD: Device or resource busy

The device in your fstab should be /path/cryptfile.

> First, I have to setup the loopback device with losetup, after loading
> the modueles:
> # modprobe cipher-aes
> # modprobe cryptoloop

Ah yes, I'd forgotten about the cryptoloop module... one way to have it
loaded automatically is to add to your modules.conf:
	add above cipher-aes cryptoloop

> # losetup -e aes /dev/loop0 /path/cryptfile
> 
> Then, I can mount it:
> mount /dev/loop0 /mnt/crypt

Right, that's the long-hand way. When you give mount the "loop" option
it does the losetup automagically.

One problem is that journaling filesystems don't work well with a
file-backed loop---something to do with write-ordering. So, I'd recommend
using the "noauto" option in the fstab entry, so you can manually fsck it
before mounting if necessary.

HTH,

-- 
Ben Slusky                      | Save the whales.
sluskyb@stwing.org              | Feed the hungry.
sluskyb@paranoiacs.org          | Free the mallocs.
PGP keyID ADA44B3B      
-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux