partitioning - Mac doesn't recognize partitions after cloning drive

07
2014-07
  • Alec Gorge

    I was given a 500GB HDD (~200GB used) that was starting to fail (OS X wouldn't boot because it failed boot-time checks). I used 2 USB enclosures and Data Rescue 3 to clone the failing disk to a brand new 500GB HDD.

    Unfortunately, around 99.6% of the way through cloning the bad drive, it seemed to fail. Processing the first 96% of the drive in 5 hours the last 3.6% had taken 12 and the number of failed sectors was starting to accumulate quicker and quicker. I believe it finished copying Macintosh HD before it got to the Recovery HD partition.

    The failing drive has 3 partitions (EFI, Macintosh HD and Recovery HD) and all 3 show up in TestDisk's "Analyse" feature--however Macintosh HD is now called Customer for some reason: TestDisk

    Mac doesn't recognize the partitions however: enter image description here

    I'm not sure if it is relevant but I did a deep scan with Data Rescue 3 and it found all of the files on the disk.

    How can I fix this drive so that I can put it back in the laptop and boot off of it again?

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    partitioning - Is there a way to do a sector level copy/clone from one hard drive to another?
  • irrational John

    Without going into distracting details, I'm attempting to duplicate the contents of the 500GB drive in my MacBook to another 500GB drive. But this is turning out to be an unexpected hassle because the drive contains both the OS X partition and an NTFS partition with Win 7 via Apple's Boot Camp.

    With the exception of Clonezilla, the tools I have looked at so far all have some limitation. The Mac tools don't want to deal with the NTFS partition. The Windows tools are totally clueless about either the HFS+ partition and/or the hybrid MBR/GPT Boot Camp partitioning.

    Clonezilla looked like it would do what I want but apparently I can't figure out how to use it. After doing what I thought was a sector to sector copy I found that only the NTFS partition had been migrated. The others were apparently empty. (And frankly, I'm not positive Clonezilla migrated the partition table correctly either).

    Note: It takes over 2 hours using SATA to read/write all sectors with these drives. So I'm not up for using trial & error to narrow in on the right combination of Clonezilla options to use.

    I'm beginning to think that maybe the answer is to boot Linux (probably Ubuntu) and then use some ancient BSD command. Trouble is I don't know what command (or parameters to use) in order to do a sector level copy from one drive to another. As far as I know the drives have the same number of sectors so this should be trivial. Sigh.


    Yes, dd does work. (Phew!)

    I especially appreciated the link in the answer to the corresponding question/exchange on serverfault.com as I never would have thought to look there.

    Here are some additional tweaks I used after learning about them from the exchange on serverfault.

    • Don't use the default transfer size of 512 bytes. In my case I used the form
      dd if=/dev/sda of=/dev/sdb bs=8192
      since this significantly increased the data transfer rate. (It happened that the size of both my drives was a multiple of 8192. Not sure if that mattered, but it felt safer to do it that way).

    • There is a way to get some progress status from the dd command. Apparently dd displays its current transfer status when it receives the right signal. I used the method suggested in this serverfault answer. However, I used an interval of 120 seconds, not 10 as I didn't want to get "flooded" with progress info.

    It took about 2 hours 20 minutes to completely clone my 500GB drive to another 500GB drive. The final status message from dd was
    500107862016 bytes (500 GB) copied, 8353.86 s, 59.9 MB/s

    What it lacks in terms of options this process certainly makes up for in simplicity and completeness. :-)


  • Related Answers
  • James T

    In linux the dd command can do what you want.

    http://serverfault.com/questions/4906/using-dd-for-disk-cloning

    Just make sure not to clone the empty drive onto the drive you want to clone.