Re: Hard drive overheated, now can't get into loop-AES partitions...

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

 



Mike M wrote:
> Its crashed out several times and I've been dd'ing all my data off my
> old drive onto a new drive with
> 
> $ dd  bs=512 if=/dev/hdb11 of=hdb11.dmg

You may want to set kernel's soft block size to 512 bytes prior to trying
'dd bs=512' command. That is because kernel will send soft block size read
requests to disk driver regardless of what read size requests user space
program sends to kernel.

At least on my 2.4 kernel here, the default soft block size is always set on
first device open:

$ blockdev --setbsz 512 /dev/hda7       # use count now == 0
$ blockdev --getbsz /dev/hda7           # use count now == 0
1024
$ losetup /dev/loop0 /dev/hda7          # use count now == 1
$ blockdev --setbsz 512 /dev/hda7       # use count now == 1
$ blockdev --getbsz /dev/hda7           # use count now == 1
512
$ losetup -d /dev/loop0                 # use count now == 0
$ blockdev --getbsz /dev/hda7           # use count now == 0
1024

Above example uses loop device to bump up the use count of /dev/hda7
partition so that when blockdev opens that device, the open won't be the
first one, and the undesirable revert-to-default thingy does not apply.

In your case you may want to try something like this:

$ losetup /dev/loop0 /dev/hdb11
$ blockdev --setbsz 512 /dev/hdb11
$ dd bs=512 if=/dev/hdb11 of=hdb11.dmg conv=noerror
$ losetup -d /dev/loop0

> mount: wrong fs type, bad option, bad superblock on /dev/loopX,
>            or too many mounted file systems
>            (could this be the IDE device.....

Superblock data is badly damaged.
Try this on a *copy* of your encrypted data:

$ losetup -e AES128 /dev/loop0 hdb11.dmg
$ e2fsck -f -y -b 8193 /dev/loop0       # 1K soft block size file system
    or         ^^^^^^^
$ e2fsck -f -y -b 32768 /dev/loop0      # 4K soft block size file system
               ^^^^^^^^
$ mount -r -t ext2 /dev/loop0 /mnt/hdb11
$ losetup -d /dev/loop0

-- 
Jari Ruusu  1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9  DB 1D EB E3 24 0E A9 DD

-
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