Re: loop-aes: cannot mount crypted cdrom when ide-scsi

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

 



Michael Hanke wrote:
> I've put a loop-file (backup.img) on cdrom, with a IDE cdwriter.
> 
> Now, if I want to mount the image file from the harddisk before burning,
> I successfully
> 
> echo $password | mount -t ext2 -p 0 -o loop=/dev/loop2,encryption=AES128 /backup.iso /backup-cd/
> 
> But, the cd cannot be mounted from the cdrom drive:
> echo $password | mount -t ext2 -p 0 -o loop=/dev/loop2,encryption=AES128 /dev/sr1 /backup-cd/
> mount: wrong fs type, bad option, bad superblock on /dev/loop2,
>        or too many mounted file systems
> 
> Of course with linux one has to use ide-scsi for a IDE cdwriter, without
> which I've never had burnt the cd.
> 
> Then I reboot the computer *without* the kernel option 'hdc=ide-scsi' .
> 
> And now
> echo $password | mount -t ext2 -p 0 -o loop=/dev/loop2,encryption=AES128 /dev/hdc /backup-cd/
> 
> works alright.
> 
> The blocksize of the original loop-file was 1024, don't know if that's
> of any interest.

Soft blocksize of 1024 is the problem here, because 1024 is not integer
multiple of hard sectorsize of 2048. I have noticed that ide cdrom code has
workarounds for partial hard sector reads, but scsi code does not appear to
do that.

So, create your ext2 filesystem with 2048 or 4096 soft blocksize like this:

    mkfs -t ext2 -b 4096 /dev/loop2
                 ^^^^^^^
and it should work with ide-scsi code also.

Regards,
Jari Ruusu <jari.ruusu@pp.inet.fi>

-
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