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!