Cant boot osx after creating partition

So I'm having an issue with my boot. I had both osx and windows 10 (via bootcamp) installed before and I decided to create a new empty partition by resizing my current osx one. After doing that I wanted to install windows again using the newly created partition and the old windows partition I had. But it seems like I may have deleted an incorrect partition too cause not only wasn't I able to install windows, but also my whole boot messed up. I couldn't boot in any OS.


After looking stuff and trying different things I finally could install windows, but I still cant boot OSX and I don't even see the disk if I go to This PC in windows, I only see the windows disk.


gdisk is showing this


Partition table scan:

MBR: hybrid

BSD: not present

APM: not present

GPT: present


Can someone help me get my OSX running again?

Posted on May 27, 2017 5:05 PM

Reply
19 replies

May 27, 2017 8:24 PM in response to masquino

Since you are in Internet Recovery, please run and post the output of


diskutil repairDisk disk0

fdisk /dev/disk0


If you have a 32+GB Flash drive, How to set up and use an external Mac startup disk - Apple Support and match the version of OS X on your internal disk and this flash drive. You can also use a USB HDD to boot from, instead of a flash drive. Install Gdisk on this external boot disk.

May 27, 2017 8:16 PM in response to Loner T

It's a mid 2011 macbook pro.

As far as the gdisk output, I messed up even further and I cant boot windows neither now. So I dont have access to gdisk (that i know of)


Does this help though (and please if there's a better way to format this log do tell me)?


-bash-3.2# diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *240.1 GB disk0

1: EFI 209.7 MB disk0s1

2: Apple_CoreStorage 185.4 GB disk0s2

3: Microsoft Basic Data 40.0 GB disk0s3

/dev/disk1

#: TYPE NAME SIZE IDENTIFIER

0: Apple_HFS Macintosh HD *185.0 GB disk1

/dev/disk2

#: TYPE NAME SIZE IDENTIFIER

0: Apple_partition_scheme *1.4 GB disk2

1: Apple_partition_map 30.7 KB disk2s1

2: Apple_Driver_ATAPI 2.0 KB disk2s2

3: Apple_HFS Mac OS X Base System 1.4 GB disk2s3

/dev/disk3

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk3

/dev/disk4

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk4

/dev/disk5

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk5

/dev/disk6

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk6

/dev/disk7

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk7

/dev/disk8

#: TYPE NAME SIZE IDENTIFIER

0: untitled *6.3 MB disk8

/dev/disk9

#: TYPE NAME SIZE IDENTIFIER

0: untitled *2.1 MB disk9

/dev/disk10

#: TYPE NAME SIZE IDENTIFIER

0: untitled *1.0 MB disk10

/dev/disk11

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk11

/dev/disk12

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk12

/dev/disk13

#: TYPE NAME SIZE IDENTIFIER

0: untitled *1.0 MB disk13

-bash-3.2# gpt -vv -r show /dev/disk0

gpt show: /dev/disk0: mediasize=240057409536; sectorsize=512; blocks=468862128

gpt show: /dev/disk0: Suspicious MBR at sector 0

gpt show: /dev/disk0: Pri GPT at sector 1

gpt show: /dev/disk0: Sec GPT at sector 468862127

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 362053176 2 GPT part - 53746F72-6167-11AA-AA11-00306543ECAC

362462816 28275104

390737920 78123008 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

468860928 1167

468862095 32 Sec GPT table

468862127 1 Sec GPT header

May 27, 2017 8:45 PM in response to Loner T

repairDisk outputed Problems where encountered and fdisk couldn't find the drive after that. I'm rebooting now to be able to see the drive again and I'll post the exact output.


EDIT


So here's the output of fdisk /dev/disk0 first. This I might have messed up, I did something suggested by someone on some other forum and that was the expected result. But I don't how that would help me.


Disk: /dev/disk0 geometry: 674/64/63 [2720500 sectors]

Signature: 0x0

Starting Ending

#: id cyl hd sec - cyl hd sec [ start - size]

------------------------------------------------------------------------

1: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused


As for the repairDisk command, now it's returning this.

Unable to repair this whole disk: The target disk is too small for this operation (-69771)

May 27, 2017 8:59 PM in response to masquino

Ignoring all the IR disks/disk images, you have


-bash-3.2# diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *240.1 GB disk0

1: EFI 209.7 MB disk0s1

2: Apple_CoreStorage 185.4 GB disk0s2

3: Microsoft Basic Data 40.0 GB disk0s3

/dev/disk1

#: TYPE NAME SIZE IDENTIFIER

0: Apple_HFS Macintosh HD *185.0 GB disk1


Is disk1 external?


masquino wrote:



So here's the output of fdisk /dev/disk0 first. This I might have messed up, I did something suggested by someone on some other forum and that was the expected result. But I don't how that would help me.


Disk: /dev/disk0 geometry: 674/64/63 [2720500 sectors]

Signature: 0x0

Starting Ending

#: id cyl hd sec - cyl hd sec [ start - size]

------------------------------------------------------------------------

1: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

Can you provide a link to what was 'suggested' on this forum? The end state is that you removed the Hybrid MBR. Your 2011 Mac requires a Hybrid MBR to support Windows, otherwise Windows will not either boot at all or boot correctly.



As for the repairDisk command, now it's returning this.

Unable to repair this whole disk: The target disk is too small for this operation (-69771)

Check the output of diskutil list and ensure you are trying to repair disk0. This error is due to the renumbering of disks when rebooted, and you repairing the following disk. This disk is not repairable because it is invalid. You are missing the GPT and EFI partition.


-bash-3.2# diskutil list


/dev/disk1

#: TYPE NAME SIZE IDENTIFIER

0: Apple_HFS Macintosh HD *185.0 GB disk1


I suggest leaving this disk alone, till your Mac can successfully boot from the internal disk.

May 27, 2017 9:28 PM in response to Loner T

Here's the link to what I did. I thought following the accepted answer there was a good idea (clearly it wasn't)


https://apple.stackexchange.com/questions/251860/accidently-deleted-some-small-s ized-partitions-when-installing-windows-osx-part


As for the disk1, I don't know what that is. I don't have any other disk connected right now, I don't even own another disk.


EDIT


I checked diskutil list and it seems as the repairDisk command was ok, but the error still happens.


-bash-3.2# diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: Apple_partition_scheme *1.4 GB disk0

1: Apple_partition_map 30.7 KB disk0s1

2: Apple_Driver_ATAPI 2.0 KB disk0s2

3: Apple_HFS Mac OS X Base System 1.4 GB disk0s3

/dev/disk1

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk1

[.... the other really small disks you saw in this post earlier...]

-bash-3.2# diskutil repairDisk /dev/disk0

Unable to repair this whole disk: The target disk is too small for this operation (-69771)

May 27, 2017 9:29 PM in response to masquino

masquino wrote:


Here's the link to what I did. I thought following the accepted answer there was a good idea (clearly it wasn't)


https://apple.stackexchange.com/questions/251860/accidently-deleted-some-small-s ized-partitions-when-installing-windows-osx-part


Neither answer is valid in your case. The disk in the link was manipulated and Recovery HD and EFI were deleted. In your case, disk0 still has EFI and GPT.


Please reboot and check if you still see more than one disk. I suggest installing OS X on an internal disk as a first step.

May 27, 2017 9:47 PM in response to Loner T

You mean external disk, right? I don't have any other internal disk to install to.


Before posting this I rebooted yet another time, and the diskutil list and diskutil repairDisk outputs changed again. So I might as well leave it here. In any case I'll buy a 32GB flash drive tomorrow and follow that guide on booting from and come back to you.


-bash-3.2# diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *240.1 GB disk0

1: EFI 209.7 MB disk0s1

2: Apple_CoreStorage 185.4 GB disk0s2

3: Microsoft Basic Data 40.0 GB disk0s3

/dev/disk1

#: TYPE NAME SIZE IDENTIFIER

0: Apple_HFS Macintosh HD *185.0 GB disk1

/dev/disk2

#: TYPE NAME SIZE IDENTIFIER

0: Apple_partition_scheme *1.4 GB disk2

1: Apple_partition_map 30.7 KB disk2s1

2: Apple_Driver_ATAPI 2.0 KB disk2s2

3: Apple_HFS Mac OS X Base System 1.4 GB disk2s3

/dev/disk3

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk3

/dev/disk4

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk4

/dev/disk5

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk5

/dev/disk6

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk6

/dev/disk7

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk7

/dev/disk8

#: TYPE NAME SIZE IDENTIFIER

0: untitled *6.3 MB disk8

/dev/disk9

#: TYPE NAME SIZE IDENTIFIER

0: untitled *2.1 MB disk9

/dev/disk10

#: TYPE NAME SIZE IDENTIFIER

0: untitled *1.0 MB disk10

/dev/disk11

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk11

/dev/disk12

#: TYPE NAME SIZE IDENTIFIER

0: untitled *524.3 KB disk12

/dev/disk13

#: TYPE NAME SIZE IDENTIFIER

0: untitled *1.0 MB disk13

-bash-3.2# diskutil repairDisk /dev/disk0

Repairing the partition map might erase disk0s1, proceed? (y/N) y

Started partition map repair on disk0

Checking prerequisites

Checking the partition list

Checking for an EFI system partition

Checking the EFI system partition's size

Checking the EFI system partition's file system

Checking all HFS data partition loader spaces

Reviewing boot support loaders

Checking Core Storage Physical Volume partitions

Checking storage system

Problems were encountered during repair of the partition map

Error: -69716: Storage system verify or repair failed

Underlying error: 1: POSIX reports: Operation not permitted

May 27, 2017 9:53 PM in response to masquino

Ok, one last thing. Now it somehow boots into windows again. So here's the output of the 'p' command from gdisk.


Type device filename, or press <Enter> to exit: 0:
Partition table scan:
MBR: hybrid
BSD: not present
APM: not present
GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): p
Disk 0:: 468862128 sectors, 223.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 41E86903-6676-4B95-833F-F32543E3CE42
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 468862094
Partitions will be aligned on 8-sector boundaries
Total free space is 28276277 sectors (13.5 GiB)

Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 409640 362462815 172.6 GiB AF05 Macintosh HD
3 390737920 468860927 37.3 GiB 0700 Windows_NTFS_Untitl...

May 27, 2017 10:14 PM in response to masquino

You have a CS LVG (about 185GB) which has an HFS LV, hence they show up as two different disks. diskutil cs list should show us the same information.


If Windows is booting correctly, we should leave it alone.


Can you boot into Internet Recovery and post the diskutil cs list output? We need an OS X version on an external disk that matches your internal OS X version, before a repair is attempted on the CS LV/LVG.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Cant boot osx after creating partition

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.