Screwed up Mac partition, Bootcamp functioning - Please help!

Discussion in 'Windows, Linux & Others on the Mac' started by Lordsharaf, Jul 15, 2015.

  1. Lordsharaf macrumors newbie

    Lordsharaf

    Joined:
    Jul 15, 2015
    #1
    The other day, I resized the mac partition while having a functioning Bootcamp-partition. As if that wasn't enough, I also upgraded Yosemite to El Capitan Beta 1.
    El Capitan worked, but when I discovered that the Bootcamp-partition didn't show up in the boot options, I tried to fix it with testdisk, and even gdisk. The latter, which totally screwed up my mac-partition.

    I got the question-mark when I rebooted, so nothing was functioning.
    So I installed Windows 10 and erased the bootcamp-partition.
    I can live with bootcamp-files gone, but not the Mac-files gone.

    Now, I've installed Mac onto an USB. This is very, very slow, but it works.

    The problem is that according to Disk Utility, my Mac-partition, disk0s1, is in exFat. I have no idea why.
    Thus, the original Mac-partition does not show up from either of the OS:es installed, more than disk0s1.

    My logs

    TESTDISK:


    TestDisk 7.0, Data Recovery Utility, April 2015
    Christophe GRENIER <grenier@cgsecurity.org>
    http://www.cgsecurity.org

    Disk /dev/disk0 - 121 GB / 113 GiB - 236978176 sectors (RO)
    Partition Start End Size in sectors
    P EFI System 40 409639 409600 [EFI]
    D Mac HFS 409640 147093543 146683904
    D MS Data 61460521 149088256 87627736
    D Mac HFS 14781872 149088255 1269536
    D MS Data 149088256 236715991 87627736
    D Mac HFS 235708600 236978135 1269536


    I think the "EFI System" belongs to Windows.
    The first Mac HFS is the partition I'm trying to save. (Unable to list files)
    The second Mac HFS is the recovery of the Mac, which is also corrupt.

    I don't know what I should do next. Didn't dare to "write partition structure to disk" after I clicked enter. Should I?


    TERMINAL


    1. sudo gdisk -l /dev/disk0

    123s-MacBook-Pro:~ a123$ sudo gdisk -l /dev/disk0
    GPT fdisk (gdisk) version 1.0.0

    Warning: Devices opened with shared lock will not have their
    partition table automatically reloaded!
    Partition table scan:
    MBR: MBR only
    BSD: not present
    APM: not present
    GPT: present

    Found valid MBR and GPT. Which do you want to use?
    1 - MBR
    2 - GPT
    3 - Create blank GPT

    Your answer: 2
    Using GPT and creating fresh protective MBR.
    Disk /dev/disk0: 236978176 sectors, 113.0 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 4C6D1D10-9602-47E3-921A-73EBD34F9700
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 236978142
    Partitions will be aligned on 8-sector boundaries
    Total free space is 262157 sectors (128.0 MiB)

    Number Start (sector) End (sector) Size Code Name
    1 40 409639 200.0 MiB EF00 EFI System Partition
    2 409640 147818719 70.3 GiB AF05 Macintosh HD
    3 147818720 149088255 619.9 MiB AB00 Recovery HD
    4 149088256 236715991 41.8 GiB 0700 DOS_FAT_32_Untitled_2



    2. sudo gtp -r -vv show disk0

    123s-MacBook-Pro:~ a123$ sudo gpt -r -vv show disk0

    WARNING: Improper use of the sudo command could lead to data loss
    or the deletion of important system files. Please double-check your
    typing when using sudo. Type "man sudo" for more information.

    To proceed, enter your password, or type Ctrl-C to abort.

    Password:
    gpt show: disk0: mediasize=121332826112; sectorsize=512; blocks=236978176
    gpt show: disk0: MBR at sector 0
    gpt show: disk0: Pri GPT at sector 1
    gpt show: error: bogus map
    gpt show: unable to open device 'disk0': No such file or directory



    3. sudo fdisk /dev/disk0

    123s-MacBook-Pro:~ a123$ sudo fdisk /dev/disk0
    Disk: /dev/disk0 geometry: 14751/255/63 [236978176 sectors]
    Signature: 0xAA55
    Starting Ending
    #: id cyl hd sec - cyl hd sec [ start - size]
    ------------------------------------------------------------------------
    1: 07 0 0 2 - 1023 254 63 [ 1 - 149088255] HPFS/QNX/AUX
    *2: 07 1023 254 63 - 1023 254 63 [ 149088256 - 87627736] HPFS/QNX/AUX
    3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
    4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused




    What can I do to repair this corrupted partition?
    Thank you very much in advance.
     
  2. barbu macrumors regular

    barbu

    Joined:
    Jul 8, 2013
    Location:
    ott.on.ca
    #2
    DiskWarrior might be a good option at this point.
     
  3. Lordsharaf thread starter macrumors newbie

    Lordsharaf

    Joined:
    Jul 15, 2015
    #3
    It couldn't rebuild it.
    Funny that it says that it's a Windows-drive.
     

    Attached Files:

Share This Page