[Solved]
I recently installed Kali Linux onto my MacBook Air 2015, and shortly after, realized that I needed to install Refind to get the full functionality. I deleted the partition, which is 20 Gb, from disk utility in MacOS. I closed my laptop for a while, and when I came back, I was met with the Grub Rescue screen. I tried some things in Grub Rescue to no avail, so I booted into Internet Recovery Mode.
I opened the terminal and used $ diskutil list
and $ gpt -r show disk0
, which you can see the results of below.
I followed the directions at this post How can I make my Mac partition bootable again? I used gpt remove -i 3 disk0
and gpt remove -i 2 disk0
I then learned that I have an APFS container from dd if=/dev/disk0 skip=409640 count=3 |vis -c
. Therefore, I used gpt add -i 4 -b 409640 -s 2542739416 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0
as the directions specify. Of course, when I did this I got an error:
gpt add: disk0: Suspicious MBR at sector 0
gpt add: disk0: error: no space available on device
I researched this, and found this. I tried both gpt destroy disk0
and gpt create disk0
to which both returned an error: gpt destroy/create: disk0: Suspicious MBR at sector 0
. It seems like this person had the same problem, and went down the wrong road so to speak. Perhaps I can avoid making the same mistake.
I am really not sure what to do from here. Any help would be appreciated. Thank you!
edit: So thanks to David Anderson, I was able to correct the "gpt add: disk0: error: no space available on device
" error.
I then added the third partition, which I think is for recovery(?), using gpt add -i 3 -b 227212504 -s 1269536 -t 426F6F74-0000-11AA-AA11-00306543ECAC disk0
. The fourth picture is the most recent output of gpt -r show disk0
.
Moving on, I tried diskutil verifyDisk disk0
to which i got the error: Error: -69846: Unrecongnized Filesystem.
(Also in image 4) Not sure what to do about that. In fact, that was the original error it returned when I booted into grub rescue.
Also in the fourth image is the output of diskutil verifyVolume disk0s2
. Which seems error free.
output after successfully adding partitions 2 and 3.
Booted successfully to my machine after deleting that third partition and holding down option at the startup manager screen. Thanks for your help!
gpt add -i 1 -b 40 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk0
andgpt add -i 2 -b 409640 -s 197570600 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0
For now, ignore theSuspicious MBR at sector 0
error message. – David Anderson Dec 23 '18 at 03:38disk0s1 added
. Good. The second command returnedgpt add: disk0: error: no space available on device
. Same as before. – Roscoe Turner Dec 23 '18 at 04:11gpt -r show /dev/disk0
andfdisk /dev/disk0
. – David Anderson Dec 23 '18 at 07:10gpt add -i 2 -b 409640 -s 197570600 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0
, but you instead enteredgpt add -i 2 -b 409640 -s 2542739416 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0
– David Anderson Dec 23 '18 at 17:50gpt remove -i 3 disk0
. – David Anderson Dec 24 '18 at 16:13