Recovering data from troubled disk

A friend has a mac OS system with a troubled disk. I am trying to get the data off it for him from the main HFS+ partition.

I can mount the partition and see the directories etc.

I am trying to use gparted to copy the partition to a new disk. This seems to have hung. Possibly retries reading a poor patch?

I have used photorec before, which works OK, but then I lose all the directory structure and file names. Is there something intermediate that might successfully get the functioning parts of the partition and skip the dodgy bits? I guess some command line program that has some options for skipping bits?#

maybe this?

dd if=/dev/sda of=/dev/sdb bs=512 conv=noerror,sync

or

ddrescue

I do not know what the trouble is with the disk, but when you use tools like dd, you will copy over the trouble with it, because it will read all de bytes regardless of their meaning.

IMHO you should try to copy each and every directory/file individualy. Files that won’t copy because of read errors are lost then, but the others are saved.
It could even be that the read errors are in unused parts of the disk.

On 2014-12-09 10:46, blondandy wrote:
>
> A friend has a mac OS system with a troubled disk. I am trying to get
> the data off it for him from the main HFS+ partition.
>
> I can mount the partition and see the directories etc.
>
> I am trying to use gparted to copy the partition to a new disk. This
> seems to have hung. Possibly retries reading a poor patch?

Your intent is to recreate the old disk into a new, so that the mac
boots? Or to just retrieve as many files as possible?

The generic procedure is to image the troubled disk into a new one,
using tools like dd-rescue (not plain dd), and then try to repair the
filesystem on the new disk, and maybe boot it.

The other method is to simply copy all the files and directories that
you can copy to elsewhere. Some may fail, just skip them.

>
> I have used photorec before, which works OK, but then I lose all the
> directory structure and file names.

If it were ntfs, I could point you to a commercial but inexpensive tool
that does a better job (I used it). I actually got the link from the
photorec site itself… Maybe some of those tools work on HFS+, dunno.

> Is there something intermediate that
> might successfully get the functioning parts of the partition and skip
> the dodgy bits? I guess some command line program that has some options
> for skipping bits?#

yes, dd_rescue.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

You don’t mind to tell me what brand of the trouble drive? Just curious.

I had great results with ddrescue.

It took a while, and the error count got quite high, but then it does clever stuff (rereads and stuff) and the error count dropped to 2 by the time it was done.

My friend reports back that the disk I copied to works as the original did. Fantastic. First time I used linux on OSX partitions.

The disk was 1TB WD caviar black or blue (not green).

Thanks for feeding back on your success. That helps us all.