Encrypting disks

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

 



Hello,

   I'm new to the list. Sorry about the strange subscribe message
earlier. I pasted to the wrong address.I have a question about
encrypting whole disks and a problem I had.

   I patched my 2.4.7 kernel with the latest int'l kernel patch
and I'm not sure how much bearing that has, but I would like to 
mount an entire disk (in my case /dev/hda1) as encrypted rather than
using a file. The problem I had was there was a power outtage,
and the encrypted disk was forceably unmounted. When I rebooted
and tried to mount it, I got loads of illegal blocks and inode
errors. In short, the entire partition got trashed. Is this because
I was mounting the entire disk rather than a file? This is how I had
set it up:

losetup -e aes -k 256 /dev/loop0 /dev/hda
<entered in password>
mkfs.ext2 -m 0 /dev/loop0
<makes the ext2 partition just fine>
<copy data to the partition>

system is acting just fine with the partition. It is on an
automounter so it unmounts it when it's not needed.. HOWEVER...

10 days later.. machine loses power. I boot up, the clear partitions
fsck alright. When I do the losetup and attempt to mount, I get errors
that the drive has to be checked. So I fsck it. What appears
to happen is, the files still seem to be there, but garbage appears
in the beginning of all of them. Some of the files are extremely
garbled and I end up having to wipe the entire partition.

Is there a way to prevent this from happening? I'd really like to
use the encyption, but not if it's going to be unstable like this.

Thanks!

Tom

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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