First of all, I apologize that I cannot remember exactly what version of Mac OS I am running, but I am 99% sure it's Yosemite.
I recently tried to delete a second partition I had been using for a Ubuntu distro. While I was trying to erase the partition, the minus button was grayed out, but I found that if I clicked the minus on the other small partitions (I'm assuming retrospectively that it was the disk utility partition and something else) then I was able to delete the Ubuntu partition, so that's what I did.
So now my hard drive has one partition, disk0s2 with about 900gb and then an extra free space of 99.8gb. The free space can't be partitioned or reconfigured in any way, attempting to do so starts up a progress bar that never gets beyond 'preparing'. disk0s2 is unmounted, the mount button is blue and not grayed out, but clicking it does nothing.
Restarting and running in disk utility mode (I believe that's what it's called, CMD+R), does work, restarting holding OPT shows only the EFI boot, which takes me to GNU Grub version 2.02, which is also what happens when restarting normally. I thought that maybe inserting a USB and downloading Mac OS onto that from the disk utility start up might be a way of solving this problem, but my computer won't mount the USB (the mount button is not grayed out but clicking it does nothing) so it doesn't show up when trying to reinstall the OS.
What should I do? I have access to an external hard drive with enough space to put what was on my hard drive if that is possible, but obviously I would prefer to be able to recreate the disk utility partition (?) and remount disk0s2.
Here is the result of running diskutil in terminal:
Best Answer
You should be able to repair you existing partition so you can boot to OS X. The steps are given below. Here, I assume you were using Yosemite or some other version of OS X that installs to a "Mac OS Extended (Journaled)" formatted volume. Also, I assume encryption was not being used.
Enter the following command to get the GUID Partition Table (GPT) entries.
An example output is shown below.
Enter the commands given below to change the GPT.
Where
<start>
and<size>
are integers taken from the row with index equal to 2 in the table shown in step 2. An example is shown below.You will need to replace
409640
and1757812496
with the values shown in your GPT table.Restart the Mac back to OS X.
Enter the command given below in a Terminal application window to reclaim the free space.
An example is shown below.
Addition Comments
disk0s1
). You should consider removing Grub.