Using ddrescue on a Mac

Haole Boy

Active Member
Reaction score
190
Aloha everyone. I'm working on a Mac Mini that might have missing data files. If this was a Windows machine I would use ddrescue to create a sector-by-sector copy of the drive before making any changes. Since this is a Mac, I'm kind of wandering in the wilderness and hoping one of you kind folks can help me.

First, is ddrescue a good tool to use for making a complete copy of the hard drive on a Mac? If not, feel free to suggest a better tool

Assuming ddrescue is a good tool, then the next question is what command to use on Mac to locate the drives to point ddrescue at? (I always image a complete drive and not partitions). I've found the 'diskutil list' command. My output for the 'source' drive looks like this:

Harrys-Air:~ harryz$ diskutil list
/dev/disk0 (internal):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 121.3 GB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_APFS Container disk1 121.0 GB disk0s2

/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +121.0 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 40.8 GB disk1s1
2: APFS Volume Preboot 44.8 MB disk1s2
3: APFS Volume Recovery 510.4 MB disk1s3
4: APFS Volume VM 2.1 GB disk1s4



What I'm unsure about is do I use /dev/disk0 or /dev/disk1 as my 'source' disk?

Mahalo,

Harry Z
 
In linux, I use 'fdisk -l'

It looks like you want ddrescue /dev/disk0 /dev/disk1 -d -r0 --force

assuming you want to copy the disk0 to disk1. The "Internal" disk is the one you want to copy... not the synthesized one.
 
In linux, I use 'fdisk -l'

It looks like you want ddrescue /dev/disk0 /dev/disk1 -d -r0 --force

assuming you want to copy the disk0 to disk1. The "Internal" disk is the one you want to copy... not the synthesized one.

That would disastrous if it would work. disk1 is a virtual disk of disk0 Notice that under disk1, which has a synthesized label, you see disk0s2 which refers to the the second partition.

I would not run dd from the native drive. I'd boot from parted magic and image using ddrescuse on that to a disk image on an attached USB drive.
 
It looks like you want ddrescue /dev/disk0 /dev/disk1 -d -r0 --force ...

The "Internal" disk is the one you want to copy... not the synthesized one.

OK. What my rather long-winded problem description was trying to ask was whether or not to use the synthesized disk as my source. Looks like the answer is 'no'.

Also, I tried using this command which I normally use on Linux Mint

sudo ddrescue -d /dev/disk0 name.img name.logfile

and got a 'Direct disc access not available' error. Did some googling, and replaced the -d with -v and it seemed to work. I will have to take a look and see if the --force parameter fixes the direct disk access not available error.

... I would not run dd from the native drive. I'd boot from parted magic and image using ddrescuse on that to a disk image on an attached USB drive.

I'm running ddrescue from an external drive with macOS 10.14.16 installed on it. Never considered that I could run Parted Magic on this machine. I'll have to give it a try with a Linux Mint USB stick I made to use on Windows PCs.

Mahalo to everyone who replied. Much appreciated!

Harry Z
 
My Linux Mint boot USB will boot on the Mac, but does not "see" the APFS internal hard drive. I'm assuming it's the APFS causing the issue here.

My Parted Magic USB hung during boot. Checking the PM web page, there does not seem to be support for APFS.

Oh, well. sounded like a good idea!

Harry Z
 
Thanx for the follow-up folks. I don't have the machine any more, so I can't try this again. Will give it a go whenever I get a Mac again. Might be a few months.....

Harry Z
 
Back
Top