1

[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.


diskutil list ------------gpt -r show disk0

old gpt -r show and fdisk output


output after successfully adding partitions 2 and 3. verifyDisk output


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 and gpt add -i 2 -b 409640 -s 197570600 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0 For now, ignore the Suspicious MBR at sector 0 error message. – David Anderson Dec 23 '18 at 3:38
  • Thanks for your comment. the first command returned disk0s1 added. Good. The second command returned gpt add: disk0: error: no space available on device. Same as before. – Roscoe Turner Dec 23 '18 at 4:11
  • There is something missing in your question. Did you get the error message "disk0: error: device contains a MBR" after entering "gpt create disk0"? To make sure I am clear about the current state of your partition tables, post the output from gpt -r show /dev/disk0 and fdisk /dev/disk0. – David Anderson Dec 23 '18 at 7:10
  • I do not get that error at the moment. I edited the post to include a picture of the output of those two statements. – Roscoe Turner Dec 23 '18 at 17:38
  • The second command that I posted for you to enter was gpt add -i 2 -b 409640 -s 197570600 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0, but you instead entered gpt add -i 2 -b 409640 -s 2542739416 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0 – David Anderson Dec 23 '18 at 17:50

You must log in to answer this question.

Browse other questions tagged .