You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

How I installed Mountain Lion on Un-repairable Hard Disk.

My Recommendations for Avoiding Trouble, Avoiding Risk, and Saving Time.

1) Make a boot clone first!!!
http://www.bombich.com/

http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html

2) Fix and repair your hard disk with Disk Utility and fsck_hfs before installing Mountain Lion!

(Otherwise the installer will write-lock the disk preventing repair.)

Mountain Lion Aborted Installation—Claimed Hard Disk Failed, Couldn't be Repaired, and Should be Replaced

I have a 2011 MacBook Pro. Installation of Mountain Lion aborted claiming the hard disk could not be repaired by Disk Utility, should be backed up immediately, and replaced. It didn't make sense that the drive was booting up the computer for installation, but needed replacing. I removed the drive, put it in an external enclosure, and backed up the drive using a working Mac Mini, and Carbon Copy Cloner.

Hard Disk Was Write-Locked—Not Failing

Booting in Single User mode (hold command and S keys down while bootup is proceeding). I then typed in the fsck command given after Single User bootup. It informed me the drive was write-locked and read only. Now things were starting to make sense. Disk Utility couldn't repair the drive because it was write-locked! Maybe it could have been unlocked by the "chflags nouchg /Volumes/volume" or "chflags noschg /Volumes/volume" commands (http://hints.macworld.com/article.php?story=20031017061722471), but I didn't try it. Unlocking the drive is really worht a try because it could save hours of coppying through a slow USB interface.


I formatted my laptop drive after copying it to another large external drive. Then I used Carbon Copy Cloner to clone Snow Leopard from my Mac Mini to my freshly formatted original laptop drive. I unsellected the "Users" folder so I would only get the operating system—saving lots of hours copying data I don't need. Then I put the drive back in my laptop, and it booted with Snow Leopard. Checked the volume with Disk Utility and was informed the drive is fine. I removed the drive and connected it externally to my Mac Mini and ran fsck_hsf a few times in the terminal, which showed problems were found and fixed.


sudo fsck_hfs -fy /dev/rdisk1s2

Password:

** /dev/rdisk1s2 (NO WRITE)

Executing fsck_hfs (version diskdev_cmds-491.6~3).

** Verifying volume when it is mounted with write access.

** Checking Journaled HFS Plus volume.

** Checking extents overflow file.

** Checking catalog file.

** Checking multi-linked files.

** Checking catalog hierarchy.

** Checking extended attributes file.

** Checking volume bitmap.

Volume bitmap needs minor repair for under-allocation

** Checking volume information.

Invalid volume file count

(It should be 550614 instead of 550591)

Invalid volume free block count

(It should be 175459733 instead of 175460263)

** The volume MacBookPro HD was found corrupt and needs to be repaired.

3) sudo fsck_hfs /dev/rdisk1s2

Password:

** /dev/rdisk1s2 (NO WRITE)

Executing fsck_hfs (version diskdev_cmds-491.6~3).

** Verifying volume when it is mounted with write access.

** Checking Journaled HFS Plus volume.

fsck_hfs: Volume is journaled. No checking performed.

fsck_hfs: Use the -f option to force checking.

[karl_ihrig] 4) sudo fsck_hfs -f /dev/rdisk1s2

** /dev/rdisk1s2 (NO WRITE)

Executing fsck_hfs (version diskdev_cmds-491.6~3).

** Verifying volume when it is mounted with write access.

** Checking Journaled HFS Plus volume.

** Checking extents overflow file.

** Checking catalog file.

** Checking multi-linked files.

** Checking catalog hierarchy.

** Checking extended attributes file.

** Checking volume bitmap.

** Checking volume information.

** The volume MacBookPro HD appears to be OK.

5) sudo fsck_hfs -fy /dev/rdisk1s2

** /dev/rdisk1s2 (NO WRITE)

Executing fsck_hfs (version diskdev_cmds-491.6~3).

** Verifying volume when it is mounted with write access.

** Checking Journaled HFS Plus volume.

** Checking extents overflow file.

** Checking catalog file.

** Checking multi-linked files.

** Checking catalog hierarchy.

** Checking extended attributes file.

** Checking volume bitmap.

** Checking volume information.

** The volume MacBookPro HD appears to be OK.

6) sudo fsck_hfs -fy /dev/disk1s2

** /dev/rdisk1s2 (NO WRITE)

Executing fsck_hfs (version diskdev_cmds-491.6~3).

** Verifying volume when it is mounted with write access.

** Checking Journaled HFS Plus volume.

** Checking extents overflow file.

** Checking catalog file.

** Checking multi-linked files.

** Checking catalog hierarchy.

** Checking extended attributes file.

** Checking volume bitmap.

** Checking volume information.

** The volume MacBookPro HD appears to be OK.


I put the drive back in the laptop and repeated the fsck commands after a Single User boot. (Omited the sudo commands and used /dev/disk0s2.)

Downloaded and Successfully Installed Mountain Lion on "Unreparable" Drive

I downloaded the Mountan Lion installation application to my laptop, ran it, and had a smooth install.

More Trouble Migraiting My Applications and Directory

I expect to use up more time changing my computer name, migrating applications and rsyncing my User Directory. I will post how I achieve this.

I Hope People Avoid Trouble and Problems are Solved

I hope everyone will avoid trouble by making boot clone of their whole disk before attempting an install of ML and repairing their disk with Disk Utility and fsck before ML installer prevents it with a write-lock. Please see the first section.

I hope this solves other peoples problems with 'unreparable' disks. I believe this proves disks are repairable when ML says otherwise.
Good luck everyone!

Posted on Jul 29, 2012 12:16 PM

Reply
26 replies

Jul 29, 2012 8:11 PM in response to spritrig

I have been able to restore my user data (copied from the write-locked drive to to a backup drive with Carbon Copy Cloner) back to my laptop drive with a clean Mountain Lion install with the UNIX rsync command at the ternminal command line.


rsync -a "/Volumes/Backup Vol/Users/karl/projects" /Users/karl


The -v option prints the filenames to the screen, which may slow the rsync. So, I prefer to use Activity Monitor Disk Usage pie chart to monitor progress.

Jul 31, 2012 4:27 PM in response to troca

Was there a message indicating they didn't work?


I didn't get chflgs to work either, but I didn't try. Did you try:


chflags nouchg /

chflags noschg /


If those don't work, what about:


chflags -R nouchg /

chflags -R noschg /


Did you try it from Single User boot? Or is the drive in an external enclosure?


So, what was the status of the drive doing an fsck in single user mode? Did it say it is write-locked or read-only?


1) Turn the computer on while holding Command + S keys.


2) Type at the prompt "fsck" and "fsk_hfs".


What is the response?


Copy the drive if you already don't have a copy of it.

Aug 3, 2012 8:28 PM in response to troca

Please how do you do this? I am not as computer techie savvy as you are. Have an IMac 2008 and while installing Mountain Lion, it claimed there was something wromg with the HD and like everyone else, in disk utility the repair is grayed and not selectable. I have tried using Time Machine to restore, but cannot becaue the HD is locked. Looks like I will have to make a trip to the Genius store!

Aug 3, 2012 9:35 PM in response to dtigerbme

Hi dtigerbme,


I think troca has the critical genius solution. 🙂 I know troca said he tried 100's of things, but it is so nice he shared!


First do troca's genius move of restoring bootability from your hard drive, and fix your drive with Disk Utility.


  1. Power on in safe mode. Power on while holding the shift key. http://support.apple.com/kb/HT1564http://youtu.be/J5uG8kfEcX8
  2. System Preferences --> Startup Disk, then select your hard drive.
  3. Restart here (Apple-->restart) only if steps 4 and 5 doesn't work first.
  4. Start Disk Utility hit Searchlight, type "disk u", press return.
  5. (Verify disk) (Repair Disk)


Hope it works!


Make a boot clone or backup of your drive before installing Mountain Lion!


Your iMac meets the specifications for Mountain Lion. http://www.apple.com/osx/specs/

Aug 4, 2012 9:55 AM in response to Karl Ihrig

Thanks for the recap Karl.


Unfortunately even after being able to restart with the old Lion disk, I'm not able to fix the Invalid Volume count problem. I tried from the Disk Utility starting with the disk, with the recovery partition, single user mode and made no diference; still same problem and DU is unable to fix it.


Also tried starting again with DiskWarrior but the disk is never displayed 😟

Aug 4, 2012 11:59 AM in response to troca

troca, you certainly helped dtigerbme! Isn't that encouraging?


I recommend you copy your drive as soon as possible. I really don't think the drive is bad, but you may have to format it and copy back to it. Hopefully not. Clone or backup the drive before trying this recipe. Any time you have errors on a drive, back it up. A failing drive has lmited life. However, I don't think these drives are really failing, but that is my opinion and I break a lot of things.


Let's try this recepie for you:


  1. Start in Single User Mode. Power on while holding the Command + S keys.
  2. At the prompt, type "fsck_hfs -fy" or "fsck -fy" and hit return.
  3. Do it again.
  4. Enter the command "reboot".

Just googled "volume count disk utility" and got the same recipe to fix it.


http://counterjumper.com/post/19265700171/how-to-fix-invalid-volume-free-block-c ount-error-in


So my recipe is to try to fix the drive without taking it out of the computer, which requires you can boot it up.


troca it looks like Apple has said that error is benign and can be ignored in 2010.
http://support.apple.com/kb/TS2028?viewlocale=en_US&locale=en_U

I do believe fsck will fix it though.

Some other results from the same search:

http://forums.macrumors.com/showthread.php?t=1071850

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

Aug 4, 2012 1:44 PM in response to dtigerbme

ditigerbme, I think you meant me, Karl. Yes, Time Machine is fine. The big difference between a clone and TM backup is that a clone is bootable. The most important information to backup is your information. An operating system is always available by purchase. You can't purchase your data back when it is lost. So have a backup of it. If you use Time Machine that's great.


http://pondini.org/TM/Clones.html

How I installed Mountain Lion on Un-repairable Hard Disk.

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