7

I've got a 2.5 inch 5200RPM 320G HDD to recover data from. As I've been told, a child has stepped on the laptop and broke it. They gave me the laptop and motherboard seems to be completely fine. There's no any signs of being stepped on. The HDD also seems fine at the first glance. I connected it over a sata<->usb cable and started a ddrescue (without specifying mapfile). It took 13 days to complete the first stage and go to trimming. At that point, ddrescue told that 99.39% of disk was rescued, but unfortunately, the disk moved and the fragile connection broke, leaving me with I/O errors and this message:

     ipos:    8623 MB, non-trimmed:  837763 kB,   current rate:       0 B/s                                                                                                                                         
     opos:    8623 MB, non-scraped:    1095 MB,   average rate:    280 kB/s                                                                                                                                         
non-tried:        0 B,  bad-sector:    2449 kB,     error rate:   13824 B/s                                                                                                                                         
  rescued:  318137 MB,   bad areas:       4784,       run time: 13d  3h 34m                                                                                                                                         
pct rescued:   99.39%, read errors:     45_212, remaining time: 19d 16h 16m                                                                                                                                         
                               time since last successful read:          6s                                                                                                                                         
Trimming failed blocks... (forwards)                                                                                                                                                                                
ddrescue: /dev/sda: Unaligned read error. Is sector size correct?  

For now, I've started the ddrescue again on the same outfile, but as far as I know, it will take another 13 days to scan it through. I'm aware that it's a bad idea to connect it over such cable and without mapfile, but I thought that the process will be faster. Anyways, I have a backup outfile for any experiments and I think that 99.39% is pretty much enough, so I'd like to try to mount the file and take a look at the data inside. Unfortunately, I cannot:

[root@foxserver ~]# mount -o loop sda.iso /mnt/iso
mount: /mnt/iso: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.

What I tried so far:

  1. ntfsfix. It couldn't recover and told me to use chkdsk.
  2. fsck. But I couldn't even run it, it just always prints the help message no matter what options I pass.

I've got another 2.5 inch 320GB HDD and I could try to write this image to that disk, boot into windows installation and try to chkdsk, but I don't really want to, because I'd like to use free, libre and open source software to do my job.

1 Answer 1

9

There is --generate-mode to try and guess a missing mapfile. Essentially it generates a mapfile that considers zeroes in the image as non-tried blocks.

ddrescue --generate-mode /dev/sda sda.img sda.generate.map

As for mounting, you have to consider that a full disk image usually contains a partition table. You can map partitions to block devices with losetup --partscan.

losetup --find --show --read-only --partscan sda.img

Then see if you can proceed with /dev/loopXpY:

# blkid /dev/loop*
/dev/loop0p3: BLOCK_SIZE="512" UUID="0A21987541C98DF9" TYPE="ntfs" PARTUUID="5e8a18b2-31c7-4c65-8015-be6d7d073d47"

And mount it read-only:

# mount -o loop,ro /dev/loop0p3 /mnt/test

If you still get generic mount error messages, check dmesg. Some filesystems might require more specific mount options.

2
  • @Leca notice that the image isn't a (CD/DVD) ISO file, but it's a raw disk image Commented May 25 at 16:45
  • If you're about the .iso extension, that just force of a habit. Thank you for your concern tho! Commented May 25 at 20:34

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.