AleDig92

Q: Mac partition corrupted after creating a new partition

I have a MacBook Pro Retina 13" late 2013 with the last version of Yosemite installed (10.10.4) and Windows 8.1 in BootCamp and everything worked well so far.

One day I needed more space in my Windows so I decided to enlarge the partition, so (in Mac OS) I used the Disk Utility to resize the partition of Mac creating free allocable space. Everything fine so far, both OS worked well.

 

The problem started here, when I allocated the free space created before.

Now the system doesn't recognize my Mac partition anymore.

When I turn on my laptop it can only run Windows or the EFI Boot.


I've tryed to enter EFI to solve the problem with Disk Utility but I can't solve it with "Repair Disk".

I post some screenshot to make it clear. (Sorry they're in italian)

Obviously the problem is in disk0s2

IMG_20150722_215634.jpg

IMG_20150722_215324.jpg

IMG_20150722_215226.jpg

IMG_20150722_215307.jpg


Apparently the problem is that now disk0s2 is in MS-DOS (FAT) when it should be Mac file system.

If I press on "Repair disk" it shows the error above and says something like: The exit error code in file system check is 8.

 

Is there a way to repair it? I really don't want to lose my data reinstalling OS X.

 

Thanks for your help.

I hope I've been clean enough in describing my problem.

MacBook Pro with Retina display, OS X Yosemite (10.10.4)

Posted on Jul 22, 2015 1:41 PM

Close

Q: Mac partition corrupted after creating a new partition

  • All replies
  • Helpful answers

Previous Page 2
  • by AleDig92,

    AleDig92 AleDig92 Jul 22, 2015 2:53 PM in response to AleDig92
    Level 1 (0 points)
    Jul 22, 2015 2:53 PM in response to AleDig92

    Please help me Loner T, you're my only hope! - cit.

  • by Loner T,

    Loner T Loner T Jul 22, 2015 3:00 PM in response to AleDig92
    Level 7 (24,661 points)
    Safari
    Jul 22, 2015 3:00 PM in response to AleDig92

    Please post the output of highlighted command. I have included an example from my machine where OS X is installed.

     

    dd if=/dev/rdisk0s1 count=1 2>/dev/null | hexdump -C

    Password:

    00000000  eb 58 90 42 53 44 20 20  34 2e 34 00 02 01 20 00  |.X.BSD  4.4... .|

    00000010  02 00 00 00 00 f0 00 00  20 00 10 00 00 00 00 00  |........ .......|

    00000020  00 40 06 00 4f 0c 00 00  00 00 00 00 02 00 00 00  |.@..O...........|

    00000030  01 00 06 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

    00000040  00 00 29 ed 17 e3 67 45  46 49 20 20 20 20 20 20  |..)...gEFI      |

    00000050  20 20 46 41 54 33 32 20  20 20 fa 31 c0 8e d0 bc  |  FAT32   .1....|

    00000060  00 7c fb 8e d8 e8 00 00  5e 83 c6 19 bb 07 00 fc  |.|......^.......|

    00000070  ac 84 c0 74 06 b4 0e cd  10 eb f5 30 e4 cd 16 cd  |...t.......0....|

    00000080  19 0d 0a 4e 6f 6e 2d 73  79 73 74 65 6d 20 64 69  |...Non-system di|

    00000090  73 6b 0d 0a 50 72 65 73  73 20 61 6e 79 20 6b 65  |sk..Press any ke|

    000000a0  79 20 74 6f 20 72 65 62  6f 6f 74 0d 0a 00 00 00  |y to reboot.....|

    000000b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

    *

    000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|

    00000200

     

    The partitioning tool used to create the partition converted your JHFS+ file system to a FAT/exFAT file system, which is not correct. If the header looks reasonable, then

     

    Option 1.

     

    1. You will need to install OS X on an external USB flash disk - OS X: Installing OS X on an external volume - Apple Support and boot from it.

    2. Install GPT Fdisk from http://sourceforge.net/projects/gptfdisk/ on the USB used in Step 1.

    3. I can give you steps to salvage OS X and test booting from it.

     

    Option 2.

     

    1. If you have another Mac, boot this broken Mac in Target Disk Mode - Share files between two computers with target disk mode - Apple Support .

    2. You will need appropriate connectors / cables for this option.

    3. Install GPT Fdisk on the working Mac.

    4. I can give you steps to fix the broken Mac.

     

    Option 3.

     

    1. Install GPT Fdisk on the Windows side.

    2. Modify the GPT to make the partition a JHFS+ partition.

    3. If you have Bootcamp Control panel, we can test switching.

  • by AleDig92,

    AleDig92 AleDig92 Jul 22, 2015 3:08 PM in response to Loner T
    Level 1 (0 points)
    Jul 22, 2015 3:08 PM in response to Loner T

    I have some problems with that command, I post my response, but I had to modify it to run it, cutting the | hexdump part.

     

    -bash-3.2# dd if=/dev/rdisk0s1 count=1 2>/dev/null | hexdump -C

    -bash: hexdump: command not found

    -bash-3.2# dd if=/dev/rdisk0s1 count=1 2>/dev/null | hexdump -C

    -bash: hexdump: command not found

    -bash-3.2# dd if=/dev/rdisk0s1 count=1 2>/dev/null          

    ?X?BSD  4.4 ? @O

                    )??gEFI        FAT32   ?1??ΠΌ|????^???????t????0???

    Non-system disk

    Press any key to reboot

    U?-bash-3.2#             

  • by Loner T,

    Loner T Loner T Jul 22, 2015 3:34 PM in response to AleDig92
    Level 7 (24,661 points)
    Safari
    Jul 22, 2015 3:34 PM in response to AleDig92

    Unfortunately hex dump is not included in the Internet Recovery binaries, but what you have posted looks reasonable. If you do not have any issues in running Windows, option 3 is the simplest at this point.

  • by AleDig92,

    AleDig92 AleDig92 Jul 22, 2015 3:38 PM in response to Loner T
    Level 1 (0 points)
    Jul 22, 2015 3:38 PM in response to Loner T

    Loner T wrote:

     

    Unfortunately hex dump is not included in the Internet Recovery binaries, but what you have posted looks reasonable. If you do not have any issues in running Windows, option 3 is the simplest at this point.

    Yes, I'm on Windows rigth now and I've downloaded GPT Fdisk. So what should I do now?

  • by Loner T,Solvedanswer

    Loner T Loner T Jul 22, 2015 4:05 PM in response to AleDig92
    Level 7 (24,661 points)
    Safari
    Jul 22, 2015 4:05 PM in response to AleDig92

    Your Windows GPT Fdisk should look like this.

     

    W8.1-GPTFdisk-Files.PNG

     

    You need to start a CMD Window with Admin privileges. Please see the README.Windows, if necessary.

     

    In the CMD Window, go to the folder where Gdisk is installed/downloaded. You can run gdisk64.exe using

     

    gdisk64.exe 0:

     

    "0:" tells Gdisk to use the first disk which is numbered 0. There is also a \\physicaldrive\0: syntax, but it is not needed.

     

    W8.1-GPTFdisk.PNG

     

    Once in Gdisk...

     

    Type p to print the current GPT.

    Type t  to change the partition type.

    Type 2 to indicate which partition you want to change.

    Use l to list codes, if necessary.

    My example shows AF05 which is Apple CoreStorage. In your case, it should be AF00. Please verify that the value entered is appropriate for your OS X entry.

    Type p.

    Type w to write.

    Type y to confirm.

     

    Reboot, if necessary and test.

     

    You also have the Recovery HD as Apple_HFS, but it should be Apple Boot (AB00). The same steps above can be re-used to change the type for partition 3 to be AB00 as you can see on my screen example.

  • by AleDig92,

    AleDig92 AleDig92 Jul 22, 2015 4:19 PM in response to Loner T
    Level 1 (0 points)
    Jul 22, 2015 4:19 PM in response to Loner T

    after inserting the command

    gdisk64.exe 0

    the response is:

    Problem opening 0 for reading!

    How can I solve this?

     

    Edit:

    I've tried also with

    gdisk64.exe \\physicaldrive\0:

    but the response is the same

    Problem opening \\physicaldrive\0: for reading!

  • by Loner T,Helpful

    Loner T Loner T Jul 22, 2015 4:24 PM in response to AleDig92
    Level 7 (24,661 points)
    Safari
    Jul 22, 2015 4:24 PM in response to AleDig92

    You will need to enter colon ":" after the zero without double quotes.

  • by AleDig92,

    AleDig92 AleDig92 Jul 22, 2015 4:43 PM in response to Loner T
    Level 1 (0 points)
    Jul 22, 2015 4:43 PM in response to Loner T

    Right now I'm writing from my Mac and all my data is still there! I love you! It perfectly worked.

     

    Thank you very much! You were so kind, helpful and competent! A real rarity nowadays.

  • by Loner T,

    Loner T Loner T Jul 22, 2015 5:13 PM in response to AleDig92
    Level 7 (24,661 points)
    Safari
    Jul 22, 2015 5:13 PM in response to AleDig92

    Please backup OS X and Windows to separate appropriately-formatted external disks as a baseline for future recovery. 

Previous Page 2