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

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

 



Just to follow up for future googlers.

This process worked for me. However, I was fortunate -- I didn't need the conv=noerror,sync and the block size issue didn't seem to effect me ($ dd bs=512 if=/dev/hdb11 of=hdb11.dmg -- seemed to work just fine)

Once I had *several copies* of the data I started playing around and after being unable to find the superblock, I ran

$ losetup -e AES128 /dev/loop0 hdb11.dmg
$ e2fsck -f -y /dev/loop0

just for the heck of it (with the assumption that it would *destroy the data* in that *copy*).   It spat a boatload of horrible error messages at me.  Then I mounted it, looked in the lost+found directory, and 99% of my files were there.

Thanks for the help Jari.  And sorry to bug the crypto list on what turned out to be a ext2fs issue.


Thanks, Mike




Jari Ruusu wrote:

Jari Ruusu wrote:


$ 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



Above dd command is completely wrong!

This time I looked at dd source, and learned that conv=noerror without
conv=sync will *remove* incorrectly read blocks from output. IOW, output
length will be shorter than expected, and that file system sector positions
will be incorrect.

Correct way to restore your data is something like this:

$ losetup -e AES128 /dev/loop0 /dev/hdb11
$ blockdev --setbsz 512 /dev/hdb11
$ losetup /dev/loop1 /dev/loop0
$ blockdev --setbsz 512 /dev/loop0
$ dd bs=512 if=/dev/loop0 of=hdb11.dmg conv=noerror,sync
                                      ^^^^^^^^^^^^^^^^^
$ losetup -d /dev/loop1
$ losetup -d /dev/loop0

$ e2fsck -f -y -b 8193 hdb11.dmg        # 1K soft block size file system
   or         ^^^^^^^
$ e2fsck -f -y -b 32768 hdb11.dmg       # 4K soft block size file system
              ^^^^^^^^
$ mount -r -t ext2 hdb11.dmg /mnt/hdb11 -o loop





-
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