3

I've tried to install Kali Linux as dual boot with macOS. I've partitioned 20 GB on the side from 250 GB for that purpose but the installation didn't go as planned. So I decided to reboot macOS and just delete the partition.

When I went to Disk Utility, I didn't find the 20 GB partition anywhere, so based on google I've deleted them using the Terminal, but I ended up having FFFFFFF as a partition type on the 230 GB partition.

Apple tech told me to restart the device, and it wouldn't boot (obviously). I found a post here where somebody had same issue, but the last step didn't work.

I got stuck at Re-add the partition 2 and 3

diskutil umountDisk /dev/disk1
sudo gpt add -b 928144008 -i 3 -s 262144 -t 426F6F74-0000-11AA-AA11-00306543ECAC /dev/disk1
diskutil umountDisk /dev/disk1
sudo gpt add -b 409640 -i 2 -s 927734368 -t 53746F72-6167-11AA-AA11-00306543ECAC /dev/disk1

In recovery mode I've diskutil list

-bash-3.2# diskutil list
/dev/disk0 (internal, physical):
#:                       TYPE NAME                    SIZE        IDENTIFIER
0:      GUID_partition_scheme                        *251.0 GB   disk0
1:                        EFI EFI                     209.7 MB   disk0s1
/dev/disk1 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        +2.1 GB     disk1
1:                  Apple_HFS OS X Base System        2.0 GB     disk1s1
/dev/disk2 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +5.2 MB     disk2
/dev/disk3 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +524.3 KB   disk3
/dev/disk4 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +524.3 KB   disk4
/dev/disk5 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +524.3 KB   disk5
/dev/disk6 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +524.3 KB   disk6
/dev/disk7 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +524.3 KB   disk7
/dev/disk8 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +6.3 MB     disk8
/dev/disk9 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +2.1 MB     disk9
/dev/disk10 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +1.0 MB     disk10
/dev/disk11 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +524.3 KB   disk11
/dev/disk12 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +524.3 KB   disk12
/dev/disk13 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +1.0 MB     disk13
/dev/disk14 (disk image):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                            untitled               +6.3 MB     disk14

When I run fdisk /dev/disk0

-bash-3.2# fdisk /dev/disk0
Disk: /dev/disk0 geometry: 30515/255/63 [490234752 sectors]
Signature: 0xAA55
         Starting       Ending
#: id  cyl  hd sec -  cyl  hd sec [     start -       size]
 ------------------------------------------------------------------------
1: EE    0   0   1 - 1023 254  63 [         1 -     409639] <Unknown ID>
*2: DA 1023 254  63 - 1023 254  63 [    409640 -  449218744] <Unknown ID>
3: 83 1023 254  63 - 1023 254  63 [ 449630208 -   24027136] Linux files*
4: 82 1023 254  63 - 1023 254  63 [ 473657344 -   16576512] Linux swap

When I run gpt -r show /dev/disk0

-bash-3.2# gpt -r show /dev/disk0
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  449218744      2  MBR part 218
  449628384       1824        
  449630208   24027136      3  MBR part 131
  473657344   16576512      4  MBR part 130
  490233856        863        
  490234719         32         Sec GPT table
  490234751          1         Sec GPT header

What can I do to recover my macOS partition?

5
  • Is this related to apple.stackexchange.com/questions/310783/…?
    – nohillside
    Jan 1 '18 at 10:33
  • YES it is......
    – Talaq
    Jan 1 '18 at 10:35
  • can you help me fix it?
    – Talaq
    Jan 1 '18 at 10:39
  • I've added the content of the other question on top here (and deleted the first one) so we have everything in one place. It might help to know how the last step of the solution in apple.stackexchange.com/questions/239759/… failed.
    – nohillside
    Jan 1 '18 at 11:02
  • The answer there doesn't work anymore because the MBR seems to be protected by SIP in High Sierra (and later) in contrary to older sys versions. You probably have to disable SIP (csrutil disable), reboot to Internet Recovery Mode and try it again. Additionally I would zero the MBR (sudo dd if=/dev/zero of=/dev/disk0 bs=512 count=1)
    – klanomath
    Jan 1 '18 at 12:24

You must log in to answer this question.

Browse other questions tagged .