MacOS – Mac will not boot into OSX after installing windows 10

bootcampdisk-utilitymacmacos

Please help me I'm completely desparate. I have tried to install Windows 10 and it completely messed up my macbook pro system, I cannot boot into my mac, and it's full with things I desperately need.

My OSX doesn't show up in the Macs start up when pressing "option". Also, Pressing "boot into os x" from windows doesn't work either but just boots into windows OS all over again.

Using internet recovery mode, I see in diskutility all the drives except the boot camp drive are unmounted and grey, and their names changed from "macintosh hd" etc that they were to default names, and they are impossible to mount.

Attached the screenshot of my disk utility, and of diskutil list, diskutil cs list (nothing) and -r show /dev/disk0

disk utility
diskutil list
-r show /dev/disk0

The mac system should be installed on the one labeled disk0s2.. I have no idea what's going on and how it happend

Best Answer

The GUID types for partitions 2 and 3 are wrong. The both current values are DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, which indicates two "Windows Recovery Environment" partitions. The procedure given below can correct type partition types, but there is no guarantee the data (OS X) did not get overwritten while installing Windows.

  1. Boot using Internet Recovery.
  2. Enter the command given below to get the GPT partition data.

    gpt -r show /dev/disk0
    

    Below is an example of from my computer. Your output will be very different.

    gpt show: /dev/disk0: Suspicious MBR at sector 0
           start        size  index  contents
               0           1         MBR
               1           1         Pri GPT header
               2          32         Pri GPT table
              34           6         
              40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
          409640        2008         
          411648   394530816      2  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
       394942464   394530816      3  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
       789473280    97654784      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
       887128064      262144      4  
       887390208   478769528      5  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
      1366159736     1269536      6  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
      1367429272   195995208         
      1563424480   388568960      7  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
      1951993440     1269544      8  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
      1953262984      262144      9  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      1953525128           7         
      1953525135          32         Sec GPT table
      1953525167           1         Sec GPT header
    
  3. From your output, you will need to record the start and size integer values for the rows with the index of 2 and 3.
  4. Enter the following commands. Replace the values of start and size with the integer values you recorded for row with the index of 2.

    diskutil unmountDisk /dev/disk0
    gpt remove -i 2 /dev/disk0
    diskutil unmountDisk /dev/disk0
    gpt add -i 2 -b start -s size -t 48465300-0000-11AA-AA11-00306543ECAC /dev/disk0
    
  5. Again, enter the following commands. Replace the values of start and size with the integer values you recorded for row with the index of 3.

    diskutil unmountDisk /dev/disk0
    gpt remove -i 3 /dev/disk0
    diskutil unmountDisk /dev/disk0
    gpt add -i 3 -b start -s size -t 426F6F74-0000-11AA-AA11-00306543ECAC /dev/disk0
    
  6. Try to boot to OS X.