3

I have a Macbook pro 2015 with a 256 GB SSD and a Linux partition. I would like to remove the partition. Following the steps written in here, I got stuck in the Modify step. Once I execute the command gpt add -b 409649 ... and than I do the diskutil list command, it does not appear any disk with the size 60 GB.

output of terminal 1:

gpt -r show disk0:

Does any one know how to solve my problem?

  • Yes!!! I have my Mac back again! Thank you! You are the best!! – Alex C. Apr 26 '17 at 17:22
  • I either write a short answer or mark this question a duplicate of a q&a already answered (when I can find a q&a) – klanomath Apr 26 '17 at 17:26
2

By accident the OP took one command in the answer Remove Ubuntu and grow Mac partition literally and entered:

gpt add -b 409640 -i 2 -s 118430560 -t 53746F72-6167-11AA-AA11-00306543ECAC /dev/disk0

to add a partition table entry, though his original macOS volume was much larger. The command above creates a ~60 GB CoreStorage partition right after the EFI partition. No output of the previous partition table was available (sudo) gpt -r show diskX.

To recreate the partition table an external volume with a full macOS install, wxHexEditor and some knowledge about the typical sizes and internal structures of macOS recovery volumes is necessary.

  • Install macOS to a thumb drive and configure it.
  • Download and install wxHexEditor
  • Search for the typical start blocks of the Recovery HD like in this answer.
  • Recreate the Recovery HD with gpt add -i 3 ...
  • Recreate the main macOS volume between EFI and Recovery HD partition gpt add -i 2 ...
  • Verify the disk and the volumes with diskutil verify[Disk|Volume] diskYsX
  • Expand the recovered main volume

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .