cryptoloop 2.6: encrypting /dev/hdaX broken?

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

 



I've been working on implementing an encrypted root filesystem using
Linux 2.6.0-test2-bk6's cryptoloop.  I am able to create a loopback
encrypted filesystem directly on /dev/hda5.  However, when I go to
populate the filesystem using tar, I get the following error after tar
writes all of its data:

EXT2-fs error (device loop0): ext2_check_page: bad entry in directory #69394: 
rec_len is too small for name_len - offset = 14332, inode = 70043, rec_len = 20, 
name_len = 19
tar: usr/share/man/man3/klogctl.3.gz: Cannot create symlink to 
`../man2/syslog.2.gz': Input/output error

When I unmount the loopback encrypted filesystem and run fsck.ext2 on
/dev/loop0, I find that the filesystem has hundreds of errors on it.

I think I have a good reason create the filesystem directly on /dev/hda5.
If my initrd has to mount something to get at a loopback filesystem
image then pivot_root'ing to the mounted loopback filesystem will fail.
The old root will contain a file in use (the loopback filesystem image).

At first I thought the problem was due to /dev/hda5 being much larger
than 4GB.  I tried using a smaller partition (2 GB) but still had the
same problem.

Now I wonder if the problem is because I am trying to create a loopback
encrypted filesystem directly on a partition instead of on a file.  I have
made all kinds of file-based loopback encrypted filesystems before with
no problems.

Also, creating a loopback filesystem directly on /dev/hda5 with *no
encryption* works *fine*.  In fact, I have implemented my entire encrypted
loopback root system including the initrd, etc.  It works great.
The only problem is that right now it is using plaintext loopback!

Any ideas?

--
Mike


-
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