Accidently deleted some small sized partitions when installing WIndows(Bootcamp). OSX Partition wont boot
The snap shot of the distutil output helps, but I would have also included the output from the commands:
sudo gpt -r show /dev/disk0
sudo fdisk /dev/disk0
Either command would give me the exact start and size of disk0s1. I have read that the EFI partition is not necessary to boot to OS X. My recovery flash drive does not have an EFI partition and I can boot using it. To create the image you posted, you had to boot your computer and that image does not show a EFI partition either.
The image shows me two things wrong. First, you are suppose to have a GPT partition scheme and what is shown is MBR. (Yes, I know, the letters MBR do not appear in the picture.) Second, the "0xAC" appears where there should be either "0xAF" or "Apple_HFS". This means you probably have a Core Storage partition. I assume you have installed Yosemite.
Assuming your partition is still intact and is a Core Storage partition, then do the following.
First: Run the above commands to get the start and size of the slice. Post something, if you can not understand the output.
Second: Reset the partition scheme back to GPT. Enter the commands:
sudo diskutil unmountDisk /dev/disk0
sudo gpt create -f /dev/disk0
Third: Restore the desired partition. Assume start
and size
represent the integers from the first step, enter the commands:
sudo diskutil unmountDisk /dev/disk0
sudo gpt add -b start -s size -t 53746F72-6167-11AA-AA11-00306543ECAC /dev/disk0
At this point, you should be able to enter the ls
command to see a directory listing. If not, check the disk utility to see if the partition is mounted.
Fourth, try to boot the computer. You may need to hold down the option key at startup.
If you can access the partition and even boot the computer, you are not out of the woods yet. You will probably need to backup your stuff and reload the computer from scratch. Yes, reloading can be avoided, but that is the subject for a different question.
Also, you probably want to change the Core Storage partition back to HFS+. See if you can get the computer to boot, then we can address this problem.