I have a Late 2011 MacBook Pro with 750GB HDD. I was running Yosemite 10.10.2. I had about 250GB of partitioned HDD that i wanted to add to my main partition 'Macintosh HD'. It let me remove the second partition but i couldn't do my normal drag and extend the 'Macintosh HD' partition to take full advantage of my HDD space. After hours of searching i plunged into recovery using Disk Utility and Terminal tried to extend the cold source to use the whole HDD. It still wasn't working so using my critical thinking skills i decided i would just use terminal to wipe the whole drive and start fresh just like i can do in Windows. This failed miserably. I can't do anything at this point. Every time i try to do anything it gives me cannot unmount error and when i try to back up from time machine the only thing its see's is a DISK0S1 that's only 210MB. It boots into recovery and that's about it. I would like to just get my MacBook running again and if possible using the full 750GB HDD. Im not sure if thats possible at this point. Also when i try to use Reinstall OS X it only see's DISK0S1.
We just has a similar issue last week at our office. Do you need to retrieve any of the data from the drive? If not:
1) Run Internet Recovery so the Macbook is not running off of the active drive (command+r at boot)
2) Open disk utility -> select drive -> partition -> 1 partition scheme, set format as appropriate, etc.
2.5) (if 2 fails) Go to Erase -> Name drive Macintosh HD and format as appropriate
3) Go to First Aid after creating partition and Repair Disk. Verify it comes back with no problems
4) Exit diskutil and run the OS installer. Will restore it back to factory shipped OS.
If you run into an issue using the Internet Recovery system due to a bad partition, use this article to create an external boot drive using IR: https://support.apple.com/en-us/HT202796