[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems encrypting disk partitions in 2.4.3
On Wed, May 09, 2001 at 04:04:37PM -0400, Tad Truex wrote:
>
> Greetings,
>
> I have been trying to get loopback encryption working with the 2.4.3
> patches. I applied the pathes to a fresh copy of the kernel source and a
> fresh copy of util-linux-2.11b. Both sets of patches applied cleanly.
> Everything seems to build OK. When I tested it on a regular file (using
> 128 bit serpent) it seemed to work just fine. When I attempted it on a
> disk partition, it croaked with the following message.
>
> [root@bailey mount]# ./mount -t ext2 /dev/loop0 /mnt
> mount: wrong fs type, bad option, bad superblock on /dev/loop0,
> or too many mounted file systems
>
>
> (This is the patched mount from the 2.11b release of util-linux). Is it
> obvious that I missed something, or is the 2.4 series not quite ready
> (this worked quite reliably under the 2.2.17 kernel I have been using).
>
There are two things I've noticed. I've on occasion had to
do the mkfs TWICE.
dd if=/dev/zero of=/dev/md0 bs=1k count=17639128
losetup -e twofish /dev/loop0 /dev/md0
Password:
Init (up to 16 hex digits):
mkfs -t ext2 /dev/loop0
mount -t ext2 /dev/loop0 /mnt
losetup -d /dev/loop0
and redo the losetup and mkfs. Search me...
Also, if you are doing large file systems... I have
tried to get a patch to a number of people about a problem
with the 2.11b, but no one ever answered.
The patches are missing a very important compiler switch that allows
us to work with files larger than 2GB. Edit the file MCONFIG and
modify the CFLAGS value to include -D_FILE_OFFSET_BITS=64:
CFLAGS := -g $(CFLAGS) $(OPT) -I$(LIB) $(WARNFLAGS) \
$(CURSESFLAGS) $(SLANGFLAGS) \
-DSBINDIR=\"$(SBINDIR)\" \
-DUSRSBINDIR=\"$(USRSBINDIR)\" \
-DLOGDIR=\"$(LOGDIR)\" \
-DVARPATH=\"$(VARPATH)\" \
-DLOCALEDIR=\"$(LOCALEDIR)\" \
-D_FILE_OFFSET_BITS=64
--
------------------------------------------------------
Use Linux: A computer Dale Amon, CEO/MD
is a terrible thing Village Networking Ltd
to waste. Belfast, Northern Ireland
------------------------------------------------------
Linux-crypto: cryptography in and on the Linux system
Archive: http://mail.nl.linux.org/linux-crypto/