Re: loop-aes does not work with sector sizes != 512 byte

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

 



Jari Ruusu wrote:
> 
> Peter Niemayer wrote:
> > I tried with kernel 2.4.18 and loop-AES-1.6b.
> [snip]
> > Any idea?
> 
> Strace output didn't help: I wanted to see that mount() system call
> parameters were sane... and they were sane. Were there any kernel error
> messages? 

dmesg says:

sd.c:Bad block number requested I/O error: dev 08:10, sector 2
EXT2-fs: unable to read superblock

> Can you modify your test script so that mkfs always creates filesystem with
> 2 KB soft block size (mkfs -t ext2 -b 2048 /dev/loop0), and that it displays
> the soft block size of both /dev/sdb (blockdev --getbsz /dev/sdb) and
> /dev/loop0 (blockdev --getbsz /dev/loop0) _after_ failed mount attempt?

No problem:

------------------------------------------------------------------------------
blockdev /dev/sdb result: 2048

blockdev /dev/loop0 result: 2048

mkfs output:
mke2fs 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/09
Filesystem label=
OS type: Linux
Block size=2048 (log=1)
Fragment size=2048 (log=1)
77824 inodes, 310352 blocks
15517 blocks (5.00%) reserved for the super user
First data block=0
19 block groups
16384 blocks per group, 16384 fragments per group
4096 inodes per group
Superblock backups stored on blocks: 
        16384, 49152, 81920, 114688, 147456

Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

fsck output:
e2fsck 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/09
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/loop0: 11/77824 files (0.0% non-contiguous), 4923/310352 blocks

mount output:
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       or too many mounted file systems
blockdev /dev/sdb result: 2048
blockdev /dev/loop0 result: 1024
------------------------------------------------------------------------------

So obviously, the /dev/loop0 blocksize is wrong after the mount-attempt.
I tried to insert a "blockdev --setbsz 2048 /dev/loop0" right before the
mount command, but without success.

Also, in the mount man-page, there is written:

   THE LOOP DEVICE
       One further possible type is a mount via the loop device. For example, the command

         mount /tmp/fdimage /mnt -t msdos -o loop=/dev/loop3,blocksize=1024

       will  set  up  the loop device /dev/loop3 to correspond to the file /tmp/fdimage, and then mount this
       device on /mnt.  This type of mount knows about six options, namely loop, offset,  encryption, pseed,
       phash and loinit that are really options to losetup(8).  If the mount requires a passphrase, you will
       be prompted for one unless you specify a file descriptor to read from instead with the -p option.  If
       no  explicit loop device is mentioned (but just an option `-o loop' is given), then mount will try to
       find some unused loop device and use that.  If you are not so unwise as to make /etc/mtab a  symbolic
       link  to  /proc/mounts then any loop device allocated by mount will be freed by umount.  You can also
       free a loop device by hand, using `losetup -d', see losetup(8).

I tried to use that "blocksize=2048" option, but I only get another error
message in the "dmesg", then:

  EXT2-fs: Unrecognized mount option blocksize

Next idea? :-)


Regards,

Peter Niemayer
-
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