Macbook Pro - Mid 2012 A1278

I was wondering if anyone could give any advice on my Macbook Pro predicament.


I noticed it crashing a few times when just browsing the internet, spinning wheel and was having to force shutdown using the power.


After a few times, it would no longer boot fully, the gray progress bar would reach the top but hang there.


So I've tried:


Resetting the SMC and NVRAM

Tried booting to Recovery Mode - didn't work

Tried booting to Safe Mode - didn't work

Tried using Target Disk Mode with another Mac to access it. It seems to be working in that my Macintosh HD appears but then it just goes to perpetual spinning wheel.

Tried using Internet Recovery Mode - didn't work

I ran Verbose Mode and I got a DISK1 I/O error. (see below)


So I was wondering if there is anything I can do to try to access the hard-drive to recover the data and following that get the Mac booting up again.


Thanks

MacBook Pro 13", macOS 10.14

Posted on Apr 18, 2019 5:59 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 18, 2019 8:07 AM

The hard drive cable on the 13" model is known to have a high failure rate. You could try removing the drive and connecting it to your other Mac using a USB adapter/dock/enclosure. If you see it has trouble mounting, then unplug it immediately. Using a failing drive will cause the issue to get worse to the point data recovery will be impossible.


If you don't have a current backup, then your best option is to consider sending the drive to a professional data recovery service such as Drive Savers or Kroll Ontrack. Both of these are recommended by OEMs including Apple and both provide free estimates. I had a drive recovered for as little as $200 many years ago.


If you don't feel the data is worth the cost of a professional data recovery service, then the only option I know which can be successful is by using GNU ddrescue to clone the failing drive to another drive of equal size or larger. This utility works from an unmounted drive and it can ignore errors to try to retrieve as much data as possible. You may then be able to access the cloned drive from your other Mac to retrieve the data and if not, then you can run Disk Utility or third party repair tools such as Disk Warrior to try and repair the filesystem of the cloned drive so it can mount. If the clone cannot be repaired, then TestDisk might be able to access the unmountable cloned drive. I've successfully recovered data from hundreds of failing drives (most of them Macs) using this technique, but I usually perform the clone from a Linux boot drive since OSX can interfere with the cloning process. GNU ddrescue is also available for the Mac, but I don't have much luck with it since OSX gets in the way.

Similar questions

17 replies
Question marked as Top-ranking reply

Apr 18, 2019 8:07 AM in response to Grant Bennet-Alder

The hard drive cable on the 13" model is known to have a high failure rate. You could try removing the drive and connecting it to your other Mac using a USB adapter/dock/enclosure. If you see it has trouble mounting, then unplug it immediately. Using a failing drive will cause the issue to get worse to the point data recovery will be impossible.


If you don't have a current backup, then your best option is to consider sending the drive to a professional data recovery service such as Drive Savers or Kroll Ontrack. Both of these are recommended by OEMs including Apple and both provide free estimates. I had a drive recovered for as little as $200 many years ago.


If you don't feel the data is worth the cost of a professional data recovery service, then the only option I know which can be successful is by using GNU ddrescue to clone the failing drive to another drive of equal size or larger. This utility works from an unmounted drive and it can ignore errors to try to retrieve as much data as possible. You may then be able to access the cloned drive from your other Mac to retrieve the data and if not, then you can run Disk Utility or third party repair tools such as Disk Warrior to try and repair the filesystem of the cloned drive so it can mount. If the clone cannot be repaired, then TestDisk might be able to access the unmountable cloned drive. I've successfully recovered data from hundreds of failing drives (most of them Macs) using this technique, but I usually perform the clone from a Linux boot drive since OSX can interfere with the cloning process. GNU ddrescue is also available for the Mac, but I don't have much luck with it since OSX gets in the way.

Apr 18, 2019 10:14 AM in response to HWTech

Just to clarify, Error -35, I/O Error can not be caused by a bad cable. I/O Error is based on status from the drive controller after many re-tries, typically 1,000 re-tries.


The drive may have a Bad Cable as well as the Bad Blocks indicated by I/O Errors.


--------

MacOS installs over 350,000 files. Based on sheer numbers, It is more likely that the Bad Blocks are in a part of MacOS, not in your files. PROVIDED the drive is still pretty good, MacOS can be re-installed exactly as before in a few hours.


However, if you have no backup, ANY writes to a drive with errors could clobber some of your files. You are better off replacing that drive, installing MacOS on the new drive while it is in an external enclosure (to bypass cable issues) and then attempting salvage of your files from the old drive with tools like Data Rescue.

Apr 20, 2019 9:35 AM in response to Averyjohn

Yes it all looks good. Before you run the "ddrescue" commands make sure to mount the Knoppix Data partition so your log file is saved.


GNU ddrescue is already installed on Knoppix.


After you clone the drive and retrieve your data, you should erase the new drive and install a clean version of macOS. Even if the clone boots, you have no idea if any system files may have been damaged.


Good luck.

Apr 28, 2019 11:57 AM in response to Averyjohn

Chances are that is all it will recover, but you could run the last command again and terminate it early if you change your mind. With only 3MB potentially lost, that is very good.


It is doubtful it will boot, but it also doesn't hurt to try if you want, but don't use it this way permanently as we don't know what has been damaged. You will most likely need to connect it to your other Mac. Don't forget you may need to launch Disk Utility and manually mount the drive to unlock it and maybe even repair it with First Aid. If for some reason it won't mount, there are a few other things we can try to access the data from the clone.


Anxiously waiting to see how it goes! Good luck!

Apr 19, 2019 3:18 PM in response to HWTech

Thanks for this.

I might give this a go. I'm not too confident using Linux etc but could give this a try. The data on the drive isn't vitally important, but I would like it back if possible.


So just to clarify, if I was trying DDrescue, I would need to get a replacement HDD / SDD of a similar size to the Mac (say 500gb), attach that to my current Mac via a USB Enclosure.


Use a linux boot drive to boot up the mac and run DDRESCUE allowing me to clone the drive.


I would then eject the cloned drive and attach it to another Mac to try to access the files / run disk utility to try to repair it?


Thanks again for the suggestion.

Apr 19, 2019 5:14 PM in response to Averyjohn

You've got it! I would suggest reading some of the GNU ddrescue documentation to get a little understanding of the process. Some of the information will be overwhelming so don't worry.


The easiest option for Linux is to create a bootable Knoppix USB drive using Etcher (Mac/Windows/Linux). Option boot and select the orange icon labeled "EFI".


The most important part when using GNU ddrescue is to utilize the "log" file or "mapping" file option so if the cloning process is interrupted for any reason, you can resume it right where it left off. If this happens you will want to re-verify the source & destination locations especially if the system has been rebooted. Also do not try to mount the clone until you are finished or it could accidentally alter data.


Since Apple's boot process interferes with the normal boot process for Knoppix, I will have you manually mount the "Data" partition on the Knoppix USB drive. Click on the file cabinet icon on the Taskbar near the "Start" menu. In the left pane you may see an option labeled "Data" which if you click on it will mount it. If there is no "Data" option, then click on the "sdb3" option which should be the partition we want if you booted Knoppix with only the original internal drive connected. The URL bar for the file explorer should provide you with the path you will need to store the ddrescue "log" file. You may want to create a test folder or file and reboot and remount the "Data" partition to make sure the data is saved. If it does not work or the partition isn't formatted, let me know.


When using Linux to clone the drive with GNU ddrescue, you will first need to get the Linux identifiers for your drives. I would boot Knoppix and get the drive identifier for your internal source drive. Then plug in the destination drive and get the identifier for the destination drive. This is really important if the clone is interrupted and a reboot is performed as both drives may appear identical at that point. One easy method to get the drive identifier is by using GSmartControl which can be found by clicking the "Start" menu on the lower left of the Taskbar and navigating to "System Tools --> GSmartControl". You can also use the following command from a terminal (It is the black icon on the Taskbar near the Start menu on Knoppix).

sudo  lsblk -f



I will provide you with a sample command to use to perform the first phase of the clone. I'm going to use "/dev/sdX" to represent the source drive, "/dev/sdY" to represent the destination drive and "/media/sdb3" to represent the path to the Knoppix data partition. Please substitute the Linux drive identifiers for your devices as appropriate. The Linux drive identifiers are similar to the "diskN" designation Apple uses if this helps you.

sudo  ddrescue  --ask  -dDfvn   <path-to-source-drive>   <path-to-destination-drive>   <path-to-log-file>

sudo  ddrescue  --ask  -dDfvn   /dev/sdX   /dev/sdY   /dev/sdb3/clone-log.txt


The first line is just a generic version which "explains" each item. The second line is my sample command which you will modify with the Linux identifiers for your devices.


This command can be used to run GNU ddresecue again trying to get more data from the damaged areas. You can adjust the number of retry's depending how much data is left to retrieve and the severity of the errors. If you have lots of data, then I would try a low number at first. The only difference between this command and the previous one is the removal of the "n" option and the addition of "-r3" which is telling ddrescue to retry each section 3 times.

sudo  ddrescue  --ask  -dDfv -r3   /dev/sdX   /dev/sdY   /dev/sdb3/clone-log.txt 


You can access the manual pages for GNU ddrescue from the Linux command line using the following command:

man  ddrescue


To force quit the clone you just press Ctrl + C.


If the clone is unable to recover certain areas it is difficult to know whether to continue trying or to quit and hope for the best. Since we are cloning the whole drive, this includes empty areas, other partitons, and system files which are not needed for your recovery purposes. I usually make my decision to stop when it appears no more data is being rescued and the unrecovered portion is low. I will also look at the SMART data especially the RAW value for the "Reallocated Sector Count" and "Reallocated Event Count" and "Uncorrectable Errors" to see how the condition of the drive has worsened. This can be done using GSmartControl.


Please be aware that it will take hours if not days for this clone to complete depending on how bad the drive becomes. Most times a clone for a 500GB drive will be finished in a day or two, but I've left some go even longer.


Apr 19, 2019 5:15 PM in response to HWTech

Continued....


When you've decided you've retrieved as much as possible, you could see if the cloned drive will boot while connected externally (to eliminate a possible cable issue) or you can connect it to another Mac. When connecting the cloned drive to another Mac, if the drive is FileVaulted, you may need to launch Disk Utility and select the cloned drive and click "mount" to be prompted for the password to unlock it. If it won't mount, then run Disk Utility on the cloned drive, both on the physical device and the volume you want to mount. To see the physical device in Disk Utility, you may need to click on the drop down box just above the left pane and select "View All Devices". If you have access to another filesystem utility such as Disk Warrior you can try it as well to repair any errors to allow mounting.


If you have any questions or need further assistance please let me know. Also let us know how you make out so it may help other users in a similar situation.

Apr 20, 2019 8:22 AM in response to HWTech

I got this process rolling today. I've ordered a replacement drive that will ultimately be the replacement for this corrupted one. So I won't be able to try the whole cloning process for a few days.


I made the Knoppix boot disk and was able to boot in to it fine.


I think the Data folder was mounted as you suggested - see image attached

My current Hard Drive seems to come up as sda - again see image attached.


The other question I had was about downloading/installing ddrescue? Is it already built into Knoppix?



So does this all seem to in order to try the cloning process once I have the new drive connected?

Thanks again.


Apr 26, 2019 10:38 AM in response to Averyjohn

I believe the command I gave you should complete the first pass. If you it doesn't get 100% rescued on the first attempt and you have bad sectors with unrecovered data, then you will need to run the second variation of the command

sudo  ddrescue  --ask  -dDfv -r3   /dev/sdX   /dev/sdY   /dev/sdb3/clone-log.txt 

so it will attempt to retrieve more data from the damaged areas using a slightly different technique. Note: this command removes the "n" option (from -dDfvn) and adds the "-r3" option. You can re-run this command as much as you want or change the "-r3" retry value later. I keep running the clone until it appears that no new data is being rescued and the unrecovered portion is fairly small in size. It is a judgement call and you can terminate the clone at anytime pressing Control + C.


Please keep us updated on how this works out.


Good luck!

Apr 26, 2019 4:44 PM in response to HWTech

So it went through the first run and got to 99.9% rescued. Just wondering if you recommend that I keep going with the second command?


Also, ultimately when it is done, how would I go about actually trying to retrieve files from the cloned drive? Is it a case of connecting the external drive to another Mac and seeing if it will recognize it and then copy files from it?


Thanks


Apr 26, 2019 7:16 PM in response to Averyjohn

Go ahead and run the second command without the "n" and with the "-r3". See how much of the remaining section you can recover. It seems like you have about 3MB unrecovered which is good, but you should try the second run since the clone went well so far.

sudo  ddrescue  --ask  -dDfv -r3   /dev/sdX   /dev/sdY   /dev/sdb3/clone-log.txt 


If you have rebooted the system, make sure to mount the Knoppix Data partition and then double check the source & destination locations and verify that the Knoppix Data partition is still the same as well so you reference the log/mapping file for the second pass.


After you feel it is finished, you can try connecting the drive to another Mac to mount it. If it is FileVaulted, then you may need to use Disk Utility to manually mount it so Disk Utility prompts you for the FileVault password. It is also possible you will need to run First Aid on it. Things should go better from the clone since you are not fighting with I/O errors at every step.



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Macbook Pro - Mid 2012 A1278

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.