9

I want to do a clean install of el capitan OS. I booted to recovery mode, chose reinstall os x and followed the steps. So far so good. When it came to choose the destination disk where I wanted to install the OS, it did not show any hard drive, i.e Macintosh HD was not shown so I could select it. I figured I had to format it first. So I close the installation and went to Disk Utility. The problem is Disk Utility is stuck at loading and does not show anything.

My OS is corrupted, that is the reason why I want to do a fresh installation. With corrupted I mean, I can boot my system only if I go to single-mode and mount the hard drive with mount -uw / and then exit. But this is not a long term solution. I search everywhere in the web and there are many solutions out there, but none worked form me.

I tried erasing and formatting the hard drive when in single-mode with the help of diskutil. But this did not work because the DiskManagement Framework was missing. So I tried loading the files manually with launchctl. But still I can not use diskutil in single-mode.

I tried also fsck, it did not do any good.

I ran out of options. I don't know what to do.

Here is an image when I try to erase the partition via Disk Utility

enter image description here

And here is an image when I try to reinstall the OS. No Hard disk is shown to select

enter image description here

  • First of all what is model/year of the Mac? Can you boot to internet recovery? – David Anderson May 19 '16 at 22:56
  • Plug in a USB drive. Does Disk Utility find it? – Allan May 20 '16 at 0:21
  • @Allan no, it is stuck always at loading – michaels May 22 '16 at 9:46
5

A solution for getting the disk utility unstuck is opening Terminal and running this:

sudo ps ax | grep hfs

You will see a line that looks like this:

**970**   ??  U      2:08.88 /System/Library/Filesystems/hfs.fs/Contents/Resources/./fsck_hfs -y /dev/disk2s4

Take note of that first number and run this:

sudo kill -9 970 # (use your own number here)

The Disk Utility gets automatically unstuck. If your hard drive shows up, but the drives are grayed out, try restarting into Recovery mode (pressing Cmd+R after booting). After a couple of restarts you might be able to finally run First Aid on your drive.

  • 1
    You are god! I did not have to use sudo in recovery though! – satheeshwaran Apr 6 '17 at 6:32
  • how did it resolve? – kosmos Aug 1 '17 at 4:38
2

I suspect that your hard drive is in the process of crashing. I am basing my reasoning off this statement:

My OS is corrupted, that is the reason why I want to do a fresh installation. With corrupted I mean, I can boot my system only if I go to single-mode and mount the hard drive with mount -uw / and then exit. But this is not a long term solution. I search everywhere in the web and there are many solutions out there, but none worked form me.

To verify that this is the case, there are a couple steps to take...

Check the SMART status.

Boot like you described,then run the command:

diskutil list

You will get a listing of your drives. Chances are it will be /dev/disk0, but it may be different. Just make note of which one is labeled "Macintosh HD" as you noted in your question.

Then, issue the command:

diskutil info /dev/disk0 | grep -i smart

If it returns back anything but the word "Verified", your drive is crashing. OS X usually doesn't get corrupt unless the user does something very outlandish and very deliberate. Most often it is because the HDD is beginning to fail and bad sectors are cropping up.

Run Apple Hardware Test/Diagnostics

I am just going to guess and say you have a pre-June 2013 Mac Product, so you will run Apple Hardware Test.

Simply hold down the D key while booting from a powered off state (power supply plugged in if you are on a Macbook) and then run the "Extended Diagnostics".

If you have a post-June 2013 product, launching Diagnostics is the same procedure, just a different set of tools.

Replace the Drive..

You didn't mention which Mac you have specifically but replacing a hard drive is actually quite easy. There are a couple of other posts here on Ask Different that go into this exact procedure. I will link them for reference.

Each of these posts has detailed answer and references on how to replace your drive, and even do a memory upgrade while you have it open.

  • I tried all of the above. I checked the smart status and it returned "Verified". I also ran the Apple Diagnostics ( my macbook is early-mid 2014) and still no issues found. Any other ideas? – michaels May 22 '16 at 9:50
  • Ok..create a USB installer. You will need a blank USB flash of at least 8GB. Boot like you normally do, download OS X El Cap from App Store and create bootable USB. Then try to do install. Even if it doesn't work, you will want to have this USB handy. Then we'll go from there. – Allan May 22 '16 at 12:46
  • I created a bootable USB but again, when I try to install Macintosh HD is not shown. – michaels May 22 '16 at 18:12
  • HD is not shown, but you are able to get into Disk Utility? – Allan May 22 '16 at 19:17
  • no I wasn't. Everything is the same as before. – michaels May 22 '16 at 20:27
0

You should be able to load Disk Utility from the OS X Installation.

When you boot into recovery mode, have a look at the menu bar at the top of the screen and there should be a utilities drop down with Disk Utility in there. From that Disk Utility you should have no problem formatting your drive.

0

I had this problem where I couldn't see my external usb hdd with ntfs format in mac os and I tried DiskUtil where it stuck at loading.

None of above worked for me. But I found this piece of command which miraculously made my hdd drive visible in mac:

set devmgr_show_nonpresent_devices=1

Got it from here:

https://www.online-tech-tips.com/computer-tips/external-hard-drive-not-recognized/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .