There is a chance to repair it with command line (in Terminal) with the terminal utility as described in Apple's support docs, shown below:
Use the command line and the fsck_hfs -l
command.
Start up your computer and log in as an administrator.
Open Terminal (/Applications/Utilities).
At the prompt, type the following command and then press Return to determine your filesytem ID:
df -hl
Look for some lines of text that look like this:
Filesystem Size Used Avail Capacity Mounted on
/dev/disk0s3 37G 20G 17G 55% /
/dev/disk0s5 37G 37G 641M 98% /Volumes/Storage
Make a note of the External Disk "disk" name that appears after /dev/, such as "/dev/disk0s3." This is your filesystem ID for your External volume.
At the prompt, type the following command and then press Return:
df -hl
Then type the following command, where "disk1" is your filesystem ID you noted in step 4, then press Return:
sudo fsck_hfs -l /dev/disk1
When prompted, enter your admin password, then press Return to begin the verification.
You should see messages like these during the disk check:
** /dev/rdisk0s3 (NO WRITE)
** Root file system
** Checking 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 Macintosh HD appears to be OK.
Hard disk drive failure
A few weeks ago I found similar symptoms with a colleague's iMac:
- sometimes it behaved as if no drive was installed
- sometimes during normal use, the Mac stopped working (not a total freeze; the reported symptoms were as if there was an I/O issue) – this was less likely to occur if the Mac was cool
- in FireWire target disk mode, every time I tried to fully optimise its disk, the Mac behaved as if the drive had disappeared.
A replacement hard disk solved the problems for the user.
Testing your own hard disk drive
If you have an external optical drive, you could perform a thorough backup then try the most powerful test of HDAT2.
Caution
A routine that is intended to reallocate bad blocks may lead to dataloss.
A clean installation might complete without error – and you might precede that with a single write of zeros throughout a volume – but still (I could/should have mentioned this in my first edition): I'd be wary.
If an entire drive has failed to present itself to software, at any time in the past, then to me that sounds a quiet but unforgettable alarm … expect the unexpected, and so on.
I should either:
a. no longer trust that hardware; or
b. perform extraordinarily time-consuming stress tests, which might reveal the nature of the failure and/or partially rebuild trust in the hardware.
In a geeky way I'm sometimes happy to spend/waste that time, but option (b) is not for everyone.
Related, in Ask Different
For bad and/or marginal blocks on hard disks, can anything be more effective than a single pass of zeros?
– all three answers were good. The accepted answer there links to a Tom Nelson article that includes:
use of Drive Genius (page 3) – in my experience not extending the scan significantly reduces the likelihood of detection of bad blocks
a Disk Utility approach to stress testing (page 4) – and for that stress test to be most effective, you should aim to repeatedly write over as much as possible of the disk before your clean installation of the OS.
(I wonder … can a Disk Utility approach be thorough enough to repeatedly write over the areas of disk that would be used for the GPT, and so on?)
Personally: if presented with a disk that might benefit from a multi-pass stress test, I would prefer HDAT2 to Disk Utility. Set aside the machine for a few days, allow HDAT2 to write repeatedly to the entire device …
Best Answer
I FIXED IT!. I didn't change the hardware parts or anything!. All I done was that I went on my Windows laptoo and when I clicked initialised in Disk Management, I clicked the second bullet point not the first!. After that, I just created a new volume and ran a recovery software on it. Done and dusted!