2

I've been working on a duel boot mac os and Kali setup for my macbook pro and recently made a little mistake. I had originally divided the core partition one for Macintosh HD and one for my Kali OS, which I then divided further into a ~4Gb swap, ~1Gb boot EFI partition, and around 168Gb for the linux filesystem. I was using rEFInd to dual boot, had gotten everything setup just fine, but seemed to have one more EFI partition than I needed. I went to erase the EFI partition which I had manually created using diskutil, but something went wrong. When I restarted the computer the boot up was all wrong, I went to boot into recovery mode, it went straight to internet recovery, and when I pulled up the disk utility the Macintosh HD partition was completely missing. I've gone into terminal and run 'diskutil list /dev/disk0' (disk 0 is my HDD) and the result was:

/dev/disk0 (internal, physical):
    #:                      TYPE NAME                              SIZE      IDENTIFIER
    0:     GUID_partition_scheme                                  *500.1 GB  disk0
    1:                       EFI NO NAME                           209.7 MB  disk0s1
    2:             FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF            324.9 GB  disk0s2
    3:                Apple_Boot Recovery HD                       650.0 MB  disk0s3
    4:                Linux Swap                                   4.9 GB    disk0s4
    5:      Microsoft Basic Data NONAME                            999.3 MB  disk0s5
    6:     Linux Filesystem Data Kali                              168.2 GB  disk0s6

I ran 'gpt -r show /dev/disk0' and the result was:

    start      size   index    contents
        0         1            PMBR
        1         1            Pri GPT header
        2        32            Pri GPT table
       34         6
       40    409600       1    GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
   409640 634475920       2    GPT part - FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
634885560   1269536       3    GPT part - 48465300-0000-11AA-AA11-00306543ECAC
636155096       808
636155904   9613312       4    GPT part - 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F
645769216    264192
646033408   1951744       5    GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
647985152       896
647986048 328524936       6    GPT part - 0FC63DAF-8483-4772-8E79-3D69D8477DE4
976510984    262151
976773135        32            Sec GPT table
976773167         1            Sec GPT header

I ran 'diskutil umountDisk /dev/disk0' then 'gpt destroy /dev/disk0', unmounted the disk again, and proceded to rebuild the guid partition table using 'gpt add' and unmounting the disk as suggested in this.

Followed those directions and now I've got:

-bash-3.2# diskutil list /dev/disk0
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk0
   1:                        EFI NO NAME                 209.7 MB   disk0s1
   2:          Apple_CoreStorage                         324.9 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:                 Linux Swap                         4.9 GB     disk0s4
   5:       Microsoft Basic Data NONAME                  999.3 MB   disk0s5
-bash-3.2# gpt -r show /dev/disk0
      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6         
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  634475920      2  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
  634885560    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  636155096        808         
  636155904    9613312      4  GPT part - 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F
  645769216     264192         
  646033408    1951744      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  647985152  328787983         
  976773135         32         Sec GPT table
  976773167          1         Sec GPT header

It's no longer letting me unmount disk 0, or add the last partition because it says disk 0 is in use. I tried restarting my macbook since the only thing left missing is the linux file system partition, but it's giving me the same issues, normal boot gives the login, then the loading, then the blank screen with the 'no' symbol on it, and disk utility is not finding disk0s2.

Any help I'd be grateful for.

Edit:

I managed to get the linux filesystem partition back in the gpt, I removed the hdd and looked at it from my linux mint system, mint recognized the apple core storage partition as such, but it seems to think it’s unformatted. On performing a hexdump of the first 3 lines however, I can clearly see that a) all of the data that was on the harddrive is still there, and b) it’s definitely a core storage mac extended format partition so that’s where I’m stuck.

You must log in to answer this question.

Browse other questions tagged .