I'm running a Debian GNU/Linux (unstable) system with a
custom compiled kernel 2.4.9. I have installed the
CryptoAPI stuff and it works no problem, but for ext2
support with mount. I'm not sure whether it's an issue
with mount or the kernel or what, but see for
yourself. Appropriate loop modules are loaded and I've
tried this with different crypto modules. (Yes, I am
using devfs as well)
------------------------------------------
rune:~# dd if=/dev/urandom of=crypto.bin bs=1024k
count=10
10+0 records in
10+0 records out
rune:~# losetup -e twofish /dev/loop/0 crypto.bin
Available keysizes (bits): 128 192 256
Keysize: 128
Password :fubar
rune:~# losetup /dev/loop/0
/dev/loop/0: [0301]:33304 (twofish-cbc) offset 0,
undefined encryption
rune:~# mke2fs /dev/loop/0
mke2fs 1.24a (02-Sep-2001)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
2560 inodes, 10240 blocks
512 blocks (5.00%) reserved for the super user
First data block=1
2 block groups
8192 blocks per group, 8192 fragments per group
1280 inodes per group
Superblock backups stored on blocks:
8193
Writing inode tables: done
Writing superblocks and filesystem accounting
information: done
This filesystem will be automatically checked every 30
mounts or
180 days, whichever comes first. Use tune2fs -c or -i
to override.
rune:~# e2fsck /dev/loop/0
e2fsck 1.24a (02-Sep-2001)
/dev/loop/0: clean, 11/2560 files, 342/10240 blocks
rune:~# mount -t ext2 /dev/loop/0 /mnt/crypt
mount: wrong fs type, bad option, bad superblock on
/dev/loop/0,
or too many mounted file systems
------------------------------------------
Here's what kern.log had to say about it:
------------------------------------------
Sep 19 14:59:47 rune kernel: attempt to access beyond
end of device
Sep 19 14:59:47 rune kernel: 07:00: rw=0, want=10241,
limit=10240
Sep 19 14:59:47 rune kernel: EXT2-fs: unable to read
group descriptors
------------------------------------------
I've tried recompiling the util-linux binaries to no
avail (debian's appear to be sufficiently patched with
cryptoapi hooks to begin with anyway) my best guess is
that the problem is unique to EXT2 as I've been using
reiserfs successfully (which works incredibly well, I
might add. Bravo). I find it strange that e2fsck
works while mount doesn't, however. Ah well, hope this
is some help.
Logged In: NO
it seems you didnt activate the 512byte based IV
calculation, just read it up in the README
waht would work is to re-mke2fs directly after the failed
mount attempt, and then try to mount that filesystem...
Logged In: YES
user_id=330646
The right sequence of commands to use the loopback crypto fs
is:
dd if=/dev/urandom of=crypto.bin bs=1024k
losetup -e twofish /dev/loop/0 crypto.bin
mke2fs /dev/loop/0
losetup -d /dev/loop/0
mount /dev/loop/0 /mnt/crypt -o loop,encryption=twofish
I just set this up myself, and it works great.
Logged In: YES
user_id=330646
Oops.. small mistake in the mount statement:
dd if=/dev/urandom of=crypto.bin bs=1024k count=10
losetup -e twofish /dev/loop/0 crypto.bin
mke2fs /dev/loop/0
losetup -d /dev/loop/0
mount crypto.bin /mnt/crypt -o loop,encryption=twofish
Logged In: YES
user_id=338784
Try doing e2fsck -f /dev/loop/0
and see if it still detects no problem.
I had a similar problem due to a
broken partition table, which seems
to disagree strongly with crypto.
Send the result of the e2fsck -f
here.
Logged In: NO
Ive had this problem before, but fixed it by running
mke2fs twice in a row -- go figure!