2

I have the standard single drive inside my MBP. The issue is inside my external usb drive.

The HDD had 4 (visible) partitions:

  • My Passport (Core Storage volume) 959 gb
  • SSD (backup for my mbp) 339 gb
  • A linux partition, which I have formatted called lin 140 gb.
  • and i'm not sure why this Boot OS X one appeared, but it has 134 mb.
  • Lasty there is disk2s5, which is filevault encrypted using Yosemite.

    It used to be called HDD though. This is the drive I really want to recover and I do not care about anything else on the hdd, but this partition.

I have read some of the other instructions, but would really appreciate if someone could guide me a little more with this. I don't want to risk messing this partition up, because it has music and media that is really vital and important to me. I would be forever grateful if someone could help.

/dev/disk0
    #:                       TYPE NAME                        SIZE   IDENTIFIER
    0:      GUID_partition_scheme                        *121.3 GB   disk0
    1:                        EFI EFI                     209.7 MB   disk0s1
    2:          Apple_CoreStorage                         120.5 GB   disk0s2
    3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
    #:                       TYPE NAME                        SIZE   IDENTIFIER
    0:                  Apple_HFS Macintosh HD           *120.1 GB   disk1
                             Logical Volume on disk0s2
                             A55BEF41-A7E8-48E8-968E-78E38DEFC708
                             Unlocked Encrypted
/dev/disk2
    #:                       TYPE NAME                     SIZE      IDENTIFIER
    0:      GUID_partition_scheme                        *2.0 TB     disk2
    1:                        EFI EFI                     209.7 MB   disk2s1
    2:                  Apple_HFS SSD                     399.4 GB   disk2s2
    3:                 Apple_Boot Recovery HD             650.0 MB   disk2s3
    4:                  Apple_HFS Boot OS X               134.2 MB   disk2s4
    5: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF               500.0 GB   disk2s5
    6:                 Apple_Boot Boot OS X               134.2 MB   disk2s6
    7:                  Apple_HFS My Passport             959.0 GB   disk2s7
    8:                  Apple_HFS lin                     140.6 GB   disk2s9
hz:~ hn$ sudo gpt -r show /dev/disk2
       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   779980464      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
   780390104     1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
   781659640      262144      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
   781921784   976562504      5  GPT part - FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
  1758484288      262144      6  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  1758746432  1873040464      7  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  3631786896      262144         
  3632049040   274652232      8  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  3906701272      262151         
  3906963423          32         Sec GPT table
  3906963455           1         Sec GPT header

Update after the Recovery HD was removed (by accident?):

/dev/disk2
  #:                       TYPE NAME                    SIZE       IDENTIFIER
  0:      GUID_partition_scheme                        *2.0 TB     disk2
  1:                        EFI EFI                     209.7 MB   disk2s1
  2:                  Apple_HFS SSD                     399.4 GB   disk2s2
  3:                  Apple_HFS Boot OS X               134.2 MB   disk2s3
  4: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF               500.0 GB   disk2s4
  5:                 Apple_Boot Boot OS X               134.2 MB   disk2s5
  6:                  Apple_HFS My Passport             959.0 GB   disk2s6
  7:                  Apple_HFS lin                     140.6 GB   disk2s7

 sudo gpt -r show /dev/disk2
     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   779980464      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
 780390104     1269536         
 781659640      262144      3  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
 781921784   976562504      4  GPT part - FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
1758484288      262144      5  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
1758746432  1873040464      6  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
3631786896      262144         
3632049040   274652232      7  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
3906701272      262151         
3906963423          32         Sec GPT table
3906963455           1         Sec GPT header

hn:~ hnn$ diskutil umountDisk /dev/disk2
 Unmount of all volumes on disk2 was successful
hn:~ hnn$ sudo gpt remove -i 5 /dev/disk2
/dev/disk2s5 removed
hn:~ hnn$ diskutil umountDisk /dev/disk2
Unmount of all volumes on disk2 was successful
hn:~ hnn$ sudo gpt add -i 5 -b 781921784 -s 976562504 -t 53746F72-6167-11AA-AA11-00306543ECAC /dev/disk2
gpt add: /dev/disk2: error: no space available on device
2

The partition disk2s5 has the wrong partition type. It should be 53746F72-6167-11AA-AA11-00306543ECAC instead of FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF!

To solve this boot to Macintosh HD (disk0s2/disk1), open Terminal and enter:

  • to get an overview:

    diskutil list
    

    below I assume the external disk has the disk identifier disk2

    sudo gpt -r show /dev/disk2
    
  • unmount disk2:

    diskutil umountDisk /dev/disk2
    
  • remove the partition entry with the index 5 (and the type FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF):

    sudo gpt remove -i 5 /dev/disk2
    
  • re-add the same partition entry but with the proper type:

    diskutil umountDisk /dev/disk2
    sudo gpt add -i 5 -b 781921784 -s 976562504 -t 53746F72-6167-11AA-AA11-00306543ECAC /dev/disk2
    
  • the external file vault volume (disk2s5) should be mounted automatically and you will be asked for the password. If not, enter diskutil cs list and diskutil cs unlockVolume lvUUID (with lvUUID: the Logical Volume UUID inside the second Logical Volume Group)


Update because the Recovery HD partition was removed somehow:

  • Remove all partitions:

    diskutil umountDisk /dev/disk2
    sudo gpt destroy /dev/disk2
    diskutil umountDisk /dev/disk2
    sudo gpt create -f /dev/disk2
    
  • re-add all partitions one by one:

    sudo gpt add -i 1 -b 40 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B /dev/disk2
    sudo gpt add -i 3 -b 780390104 -s 1269536 -t 426F6F74-0000-11AA-AA11-00306543ECAC /dev/disk2
    sudo gpt add -i 4 -b 781659640 -s 262144 -t 426F6F74-0000-11AA-AA11-00306543ECAC /dev/disk2
    sudo gpt add -i 6 -b 1758484288 -s 262144 -t 426F6F74-0000-11AA-AA11-00306543ECAC /dev/disk2
    sudo gpt add -i 8 -b 3631786896 -s 262144 -t 426F6F74-0000-11AA-AA11-00306543ECAC /dev/disk2
    sudo gpt add -i 10 -b 3906701272 -s 262144 -t 426F6F74-0000-11AA-AA11-00306543ECAC /dev/disk2
    sudo gpt add -i 2 -b 409640 -s 779980464 -t 48465300-0000-11AA-AA11-00306543ECAC /dev/disk2
    diskutil umountDisk /dev/disk2
    sudo gpt add -i 7 -b 1758746432 -s 1873040464 -t 48465300-0000-11AA-AA11-00306543ECAC /dev/disk2
    diskutil umountDisk /dev/disk2
    sudo gpt add -i 9 -b 3632049040 -s 274652232 -t 48465300-0000-11AA-AA11-00306543ECAC /dev/disk2
    diskutil umountDisk /dev/disk2
    sudo gpt add -i 5 -b 781921784 -s 976562504 -t 53746F72-6167-11AA-AA11-00306543ECAC /dev/disk2
    

I have chosen a "non-sequential" adding of partitions to unmount disk2 less often!

  • I seem to get an error nearly at the end. I have added the progress above, but here is the ending notes. sudo gpt add -i 5 -b 781921784 -s 976562504 -t 53746F72-6167-11AA-AA11-00306543ECAC /dev/disk2 Password: gpt add: /dev/disk2: error: no space available on device – uuresearcher Jun 6 '16 at 11:52
  • @uuresearcher Hmm your first gpt ... disk2 is different compared to your second gpt .. disk2. Why? – klanomath Jun 6 '16 at 11:58
  • @uuresearcher You removed your partition -i 3 meanwhile! That's a recovery HD! – klanomath Jun 6 '16 at 12:00
  • I see what you mean. I see that the recovery HD is no longer listed. – uuresearcher Jun 6 '16 at 12:07
  • @uuresearcher Updated answer to reflect the missing Recovery HD – klanomath Jun 6 '16 at 12:21

You must log in to answer this question.

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