Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

"OS X can't repair disk"

Using a mid-2010 Power Mac with 4 internal hard drives (1T each) and 3 external hard drives and running OS X 10.12.6 (Sierra).


Recently had one of the internal drives go bad and spent days recovering information stored on the disk. Since it's clear the internal drive has physical flaws, I purchased an external 4T G-Drive to use in place of the internal drive. This means I now have FOUR external hard drives.


During the recovery process, whenever I rebooted, I noticed a message about one of my external hard drives that said "OS X can't repair the disk "External A." You can still copy files on the disk but you can't save changes to files on the disk. Back up the disk and reformat it as soon as you can.


I ignored this thinking it must be a mistake since that particular hard drive (External A) was not involved in the process on which I was working.


So, finally the restoration of information to the brand new external G-Drive ("External C") was completed.However, when I rebooted, this "OS X can't repair" message popped up for BOTH the External A and External C drives.


Upon checking each, I see the permissions are messed up. Both say that I can "only read" the drives.


Not sure how that happened. Is this an easy fix? Since the G-Drive is brand new, I can't imagine that it's failing so the message to 'back up and erase' makes no sense to me.


Thoughts?

Mac Pro (Mid 2010), macOS Sierra (10.12.6), 16 GB 1333 MHz DDR3

Posted on Nov 12, 2017 11:15 AM

Reply
23 replies

Nov 12, 2017 11:31 AM in response to KatieOConnell

Firstly, you do not have a Power Mac. You have a Mac Pro.


Repair the Drive for El Capitan or Later


  1. Restart the computer and after the chime hold down the Command and R keys until the Utility Menu appears.
  2. Select Disk Utility and press the Continue button.
  3. Then select the indented (usually, Macintosh HD) volume entry from the side list.
  4. Click on the First Aid tab in the toolbar and wait for the Done button to activate. Click on it, then quit Disk Utility.
  5. Select Restart from the Apple menu.


If the above does not help:


Boot into single-user mode and at the prompt enter these commands pressing RETURN after each:


mount -uw /

chown root:admin /

chmod 1775 /

reboot


After rebooting open Terminal in the Utilities folder. Paste these commands into the Terminal application to avoid typos:


sudo su


Press RETURN. Enter your admin password when prompted. It will not be echoed to the screen. Press RETURN again. Now paste each of the following at the prompt and press RETURN after each.


chown root:admin /Applications

chmod 0775 /Applications

chown root:admin /Library

chmod 1775 /Library

chown root:admin /System

chmod 0775 /System

chown root:admin /Users

chmod 0775 /Users

chmod -R -N /Applications

chown -R :admin /Applications/*


I suggest you first print these instructions out using a large mono-spaced font so you can read them correctly. There are spaces in the lines that may not be easily observed.

Nov 14, 2017 12:16 PM in response to KatieOConnell

Is there an issue with your username which is displayed as "/////////////'? Or is it just hiding your username?


If the drives have the wrong permissions you may have such a problem or if your user account is not an Admin account. Select the drive then press Command-I to open the Get Info window. At the bottom you should see this:


User uploaded file


These are the correct permissions for any system drive. If yours are different then click on the lock icon and enter your Admin password. Then you can change the settings. Do not change Everyone from Read Only.


Here is something else you can try:


Fix Permissions for a Locked Drive


Open Terminal in the Utilities' folder. Paste the following commands at the prompt. Press RETURN after each. The first command will prompt for you to enter your admin password. It will not be echoed to the screen. After entering your password press RETURN again.


sudo chflags 0 /Volumes/*

sudo chmod a+rx /Volumes/*

killall Finder

Nov 25, 2017 12:05 PM in response to KatieOConnell

After such a long and arduous attempt to get disk permissions resolved, thought I'd post what finally worked:


Booted from a Disk Warrior CD and ran the "rebuild directory" option for each of the two disks that were locked.


I then rebooted from my system disk and – voila! – both external hard drives were unlocked.


Note: Running the same procedure from Apple's Disk Utility did NOT resolve the issue. However, Disk Warrior is far more robust and got the job done.

Nov 14, 2017 1:07 PM in response to KatieOConnell

So, then, I'm thinking the drives need to be replaced. There is one last thing to try but you will need to use more Terminal commands:


I looked first hand at this problem and the following commands unlocked and formatted the disk, although Disk Utility could not.

$ diskutil list

Should show something like this:

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *121.3 GB disk0

1: EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 120.5 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

/dev/disk1

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *64.0 GB disk1

1: EFI 209.7 MB disk1s1

2: Apple_CoreStorage 63.2 GB disk1s2

3: Apple_Boot Recovery HD 650.0 MB disk1s3

Then format the disk in question. In this case, disk1.

$ diskutil eraseDisk JHFS+ name disk1

You should see this:

Started erase on disk1

Unmounting disk

Creating the partition map

Waiting for the disks to reappear

Formatting disk1s2 as Mac OS Extended (Journaled) with name name

Initialized /dev/rdisk1s2 as a 59 GB HFS Plus volume with a 8192k journal

Mounting disk

Finished erase on disk1

The following web pages helped me figure this out and might be of use to somebody else.

https://discussions.apple.com/thread/4091299?start=0&tstart=0

http://derflounder.wordpress.com/2011/11/23/using-the-command-line-to-unlock-or- decrypt-your-filevault-2-encrypted-boot-drive/

Nov 13, 2017 12:35 PM in response to KatieOConnell

Yes, they are OK. It's the SIP which locks all sorts of files/folders to prevent the user from doing something damaging due to ignorance. Follow the instructions in the link or these:


  1. Restart using the Recovery HD by rebooting the computer and holding down the COMMAND and R keys until the Utility Menu appears.
  2. Select the Terminal from the Utilities' menu in the screen's menubar.
  3. At the prompt enter the command: csrutil disable ; reboot then press RETURN.


A message saying that System Integrity Protection has been disabled appears, and the Mac will then reboot itself automatically. The reboot is essential.


Try everything again from earlier. Afterwards, you should return to your Recovery HD and use the Terminal to enable the SIP using: csrutil enable ; reboot.

Nov 13, 2017 11:35 AM in response to Kappy

Kappy –


Followed your instructions precisely. All looked well until I input (via copy+paste) the chown bit. Dozens of lines appeared and it looks as if something failed:


(These are but the first couple of dozen)


Last login: Mon Nov 13 14:11:31 on console

KOs-Mac-Pro:~ KO$ sudo su

Password:

sh-3.2#

sh-3.2# chown root:admin /Applications

chown: /Applications: Operation not permitted

sh-3.2#

sh-3.2# chmod 0775 /Applications

sh-3.2#

sh-3.2# chown root:admin /Library

chown: /Library: Operation not permitted

sh-3.2#

sh-3.2# chmod 1775 /Library

chmod: Unable to change file mode on /Library: Operation not permitted

sh-3.2#

sh-3.2# chown root:admin /System

chown: /System: Operation not permitted

sh-3.2#

sh-3.2# chmod 0775 /System

chmod: Unable to change file mode on /System: Operation not permitted

sh-3.2#

sh-3.2# chown root:admin /Users

sh-3.2#

sh-3.2# chmod 0775 /Users

sh-3.2#

sh-3.2# chmod -R -N /Applications

chmod: Failed to clear ACL on file /Applications: Operation not permitted

chmod: Failed to clear ACL on file Down.gif: Operation not permitted

chmod: Failed to clear ACL on file GoodQuality.GIF: Operation not permitted

chmod: Failed to clear ACL on file HowTo.GIF: Operation not permitted

chmod: Failed to clear ACL on file logo.gif: Operation not permitted

chmod: Failed to clear ACL on file Open.GIF: Operation not permitted

chmod: Failed to clear ACL on file OpenAndRead.GIF: Operation not permitted

chmod: Failed to clear ACL on file Read.GIF: Operation not permitted

chmod: Failed to clear ACL on file Save.GIF: Operation not permitted

chmod: Failed to clear ACL on file Scan.GIF: Operation not permitted

chmod: Failed to clear ACL on file ScanAndRead.GIF: Operation not permitted

chmod: Failed to clear ACL on file Triangle.gif: Operation not permitted

chmod: Failed to clear ACL on file VeryDark.GIF: Operation not permitted

chmod: Failed to clear ACL on file VeryLight.GIF: Operation not permitted

chmod: Failed to clear ACL on file ActivateBlock.htm: Operation not permitted

chmod: Failed to clear ACL on file BlockTypes.htm: Operation not permitted

chmod: Failed to clear ACL on file BrightnessTips.htm: Operation not permitted

chmod: Failed to clear ACL on file ChangeBlockType.htm: Operation not permitted

chmod: Failed to clear ACL on file DeleteBlock.htm: Operation not permitted

chmod: Failed to clear ACL on file Features.htm: Operation not permitted

chmod: Failed to clear ACL on file hlp_toc.html: Operation not permitted

chmod: Failed to clear ACL on file hlp_wlcm.html: Operation not permitted

chmod: Failed to clear ACL on file HotKeys.htm: Operation not permitted

chmod: Failed to clear ACL on file Installation.htm: Operation not permitted

chmod: Failed to clear ACL on file InterfaceLang.htm: Operation not permitted

chmod: Failed to clear ACL on file MarkBlock.htm: Operation not permitted

chmod: Failed to clear ACL on file OpenImage.htm: Operation not permitted

chmod: Failed to clear ACL on file QuickStart.htm: Operation not permitted

chmod: Failed to clear ACL on file RecogLang.htm: Operation not permitted

chmod: Failed to clear ACL on file Recognition.htm: Operation not permitted

chmod: Failed to clear ACL on file SaveText.htm: Operation not permitted

chmod: Failed to clear ACL on file ScanImage.htm: Operation not permitted

chmod: Failed to clear ACL on file ScanParameters.htm: Operation not permitted

chmod: Failed to clear ACL on file Starting.htm: Operation not permitted

chmod: Failed to clear ACL on file SupportedFormats.htm: Operation not permitted

chmod: Failed to clear ACL on file SupportedLanguages.htm: Operation not permitted

chmod: Failed to clear ACL on file SystemRequirements.htm: Operation not permitted

chmod: Failed to clear ACL on file TechnialSupport.htm: Operation not permitted

chmod: Failed to clear ACL on file TextPresentation.htm: Operation not permitted

chmod: Failed to clear ACL on file Troubles.htm: Operation not permitted


.... etc


I was going to start over and try a second time but thought I'd check in with you first. Needless to say, I still cannot access either of the two external hard drives as I should be able.

Nov 13, 2017 12:00 PM in response to KatieOConnell

When you open the Terminal try this command: cd / which will put you in the topmost directory where all those commands run. This assures they will follow the right path. I know that the instructions say to use single-user mode, but I've always used it from the Recovery HD. You might give that a shot. The info was not written by me so I post it as-is. But it should work either way.

Nov 13, 2017 12:55 PM in response to KatieOConnell

I think you only need to do these:


sudo su


Press RETURN. Enter your admin password when prompted. It will not be echoed to the screen. Press RETURN again. Now paste each of the following at the prompt and press RETURN after each.


chown root:admin /Applications

chmod 0775 /Applications

chown root:admin /Library

chmod 1775 /Library

chown root:admin /System

chmod 0775 /System

chown root:admin /Users

chmod 0775 /Users

chmod -R -N /Applications

chown -R :admin /Applications/*

Nov 14, 2017 11:49 AM in response to Kappy

Kappy, I wish I had better news.


I followed all of your instructions: Booted into Recovery mode; used Terminal from the Utilities menu to disable the system integrity (truth be told, if there was a message, it flashed by so fast I couldn't read it) and it automatically rebooted.


I allowed it to boot AS NORMAL (is this correct? Did not need to be in single user mode? Or recovery mode again?) and proceeded with all command lines you indicated in your last message.


There has been no change. Both external hard drives are not allowing me to copy to or save anything on them.


Have I done something incorrectly?


At this point, I have no idea if the 'csrutil disable' command 'took' or not .... 😕

CORRECTION: I just looked under "about this mac" and it says:

System Software Overview:


System Version: macOS 10.12.6 (16G1036)

Kernel Version: Darwin 16.7.0

Boot Volume: Macintosh HD

Boot Mode: Normal

Computer Name: KO’s Mac Pro

User Name: /////////////

Secure Virtual Memory: Enabled

System Integrity Protection: Disabled

Time since boot: 12 minutes

Nov 14, 2017 1:40 PM in response to Kappy

Actually, the LAST thing I wish to do is to reformat either disk.


Ext Drive A has been functioning fine for years.


Ext Drive B is brand new. It was purchased for restoring a backup onto when the internal drive failed.


I actually remember having an issue like this once before, a long while back. It was ALSO when I had to restore a backup ... this time, it was onto the PRIMARY hard drive, where all the system files reside. That went well, but I 'lost' permissions on other internal drives.


Seems as though there's something about the 'restore' process that screws up permissions for other drives.

Nov 14, 2017 7:32 PM in response to KatieOConnell

With the advent of Sierra and High Sierra with the SIP, there is no way for permissions to suddenly change. All system permissions are locked to keep that from occurring. Remind me, do these drives work OK on any other Mac? If they do then you will know the problem isn't with the external drives and you can then focus attention on the internal drive and system installation and the hardware.

"OS X can't repair disk"

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