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
And here is an image when I try to reinstall the OS. No Hard disk is shown to select