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: