corabict

Q: can't boot to Mac after resizing bootcamp partition using disk management.

Hello guys.

I have a 13-inch MacBook Pro 2012 (9.2) With OSX 10.9 Running. Core I5, 4GB of ram, and a 500 Gb hard disk.

 

I used Bootcamp to install windows 8.1 which was successful, but I wanted another partition to store data so I Cut 100 GB of the Bootcamp partition. and all was well (The recovery partition became visible) until I restarted and I couldn't boot either from Mac or Windows and when you Hold alt on startup only windows show but it always ends up with an error and restart.

 

I Suspected that the problem is within the boot code.I Used a bootable Mac Osx installer to get into disk utility and it shows Macintosh HD and under that
Disk01
Disk02

Disk03

and I can't do anything no verification or partitioning is available. I reset NVRAM and I ran FSCK as suggested by some article. and nothing works.

No disk recovery is available.

Is there any possible way to fix the situation without losing data. ??

MacBook Pro, OS X Mavericks (10.9)

Posted on May 30, 2016 2:47 PM

Close

Q: can't boot to Mac after resizing bootcamp partition using disk management.

  • All replies
  • Helpful answers

Previous Page 2
  • by Loner T,

    Loner T Loner T May 31, 2016 2:08 PM in response to corabict
    Level 7 (23,828 points)
    Safari
    May 31, 2016 2:08 PM in response to corabict

    Rebuild MBR to match the new GPT information thus resetting the Hybrid MBR. Use defaults for other questions (like partition codes). The only values that need modifications are the Boot flags and step 10. Accept all other defaults that Gdisk offers. Please see the sample Q&A as an example. These steps can be repeated if you make a mistake before you get to Step 12, otherwise start from Step 1 for these steps. Step 6 has numbers which are typed with a space between the numbers. Please see the sample Q&A before you execute these steps.

    1. Sudo gdisk /dev/rdisk0
    2. P  (Print list of parts)
    3. R  (Recover)
    4. O (print current Hybrid MBR)
    5. H (chooses Hybrid)
    6. Partitions numbers to be hybridized: 2 3 4
    7. Y  (Good for GRUB question)
    8. N  (part 2 boot flag)
    9. N  (part 3 boot flag)
    10. Y  (part 4 boot flag make NTFS bootable partition)
    11. O  (print current Hybrid MBR)
    12. W (Write the new MBR)
    13. Y (Yes! write the new MBR)
    14. Reboot

     

    Here is sample Q&A for this section. Please notice the Press Enter/Return.

     

    Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): Y

     

    Creating entry for GPT partition #2 (MBR partition #2)

    Enter an MBR hex code (default AF): Press Enter/Return

    Set the bootable flag? (Y/N): N

     

    Creating entry for GPT partition #3 (MBR partition #3)

    Enter an MBR hex code (default AB): Press Enter/Return

    Set the bootable flag? (Y/N): N

     

    Creating entry for GPT partition #4 (MBR partition #4)

    Enter an MBR hex code (default 07): Press Enter/Return

    Set the bootable flag? (Y/N): Y

     

    Test 1 - Does Bootcamp Volume show up in Finder?

    Test 2 - Can you see files in Bootcamp Volume?

    Test 3 - Can you select Bootcamp in System Preferences -> Startup Disk?

    Test 4 - If Test 3 is successful, select Bootcamp and Click Restart.

  • by corabict,

    corabict corabict May 31, 2016 4:00 PM in response to Loner T
    Level 1 (8 points)
    Windows Software
    May 31, 2016 4:00 PM in response to Loner T

    I did what you told me and it worked but when i get to windows it gives me 0xc000000e. When i searched the error that solution via microsoft help community was found >>

    Use Windows 8 bootable DVD or USB and boot.

    Select option to repair your system instead of installing.

    Go to command prompt (in advanced options) and hit following commands to repair MBR.

    bootrec /fixmbr

    bootrec /fixboot

    bootrec /rebuildbcd

    Press [y] when system asks you to accept.

    Exit

     

    Now, use option: Refresh your PC in advanced option

    Reboot

     

    ================

    this is a print of the partition table and hybrid MBR  after doing instructions.

     

    Found valid GPT with hybrid MBR; using GPT.

     

     

    Command (? for help): p

    Disk /dev/rdisk0: 976773168 sectors, 465.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 548D6FCE-41CD-4737-931E-4AD9CA6F42C5

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 976773134

    Partitions will be aligned on 8-sector boundaries

    Total free space is 1293 sectors (646.5 KiB)

     

     

    Number  Start (sector)    End (sector)  Size       Code  Name

       1              40          409639   200.0 MiB   EF00  EFI System

       2          409640       391519207   186.5 GiB   AF00  Apple HFS/HFS+

       3       391519208       392788743   619.9 MiB   AB00  Recovery HD

       4       392790016       976773119   278.5 GiB   0700  Microsoft basic data

     

     

    Command (? for help): r

     

     

    Recovery/transformation command (? for help): o

     

     

    Disk size is 976773168 sectors (465.8 GiB)

    MBR disk identifier: 0x00000000

    MBR partitions:

     

     

    Number  Boot  Start Sector   End Sector   Status      Code

       1                     1       409639   primary     0xEE

       2                409640    391519207   primary     0x01

       3             391519208    392788743   primary     0x01

       4      *      392790016    976773119   primary     0x01

    ========================================

    what should i do now??

    By the way, the bootcamp drive is reading 191 GB through get info in finder, but read 299 through disk utility.

    and i checked with partition tools within hiren boot cd and found that there's unallocated 100 GB!!!!

  • by Loner T,

    Loner T Loner T May 31, 2016 4:09 PM in response to corabict
    Level 7 (23,828 points)
    Safari
    May 31, 2016 4:09 PM in response to corabict

    corabict wrote:

     

    I did what you told me and it worked but when i get to windows it gives me 0xc000000e. When i searched the error that solution via microsoft help community was found >>

    Use Windows 8 bootable DVD or USB and boot.

    Select option to repair your system instead of installing.

    Go to command prompt (in advanced options) and hit following commands to repair MBR.

    bootrec /fixmbr

    bootrec /fixboot

    bootrec /rebuildbcd

    Press [y] when system asks you to accept.

    Exit

     

    Now, use option: Refresh your PC in advanced option

    Reboot

    You need to use /rebuildBCD and chkdsk to address this. Correct the MBR first as shown below.

     

     

    Number  Boot  Start Sector   End Sector   Status      Code

       1                     1       409639   primary     0xEE

       2                409640    391519207   primary     0x01

       3             391519208    392788743   primary     0x01

       4      *      392790016    976773119   primary     0x01

    ========================================

    This is incorrect. You entered 'n' for the Hex code question, instead of accepting default values. A working MBR looks like the following. Notice the values in the 'code' column.  Please repeat the steps for the MBR part and use the defaults. See the Q&A example for proper responses.

     

    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: hybrid

      BSD: not present

      APM: not present

      GPT: present

     

    Found valid GPT with hybrid MBR; using GPT.

    Disk /dev/disk0: 1954210120 sectors, 931.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 6ED0C429-00D1-4759-B50E-04B6FB80D0E3

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 1954210086

    Partitions will be aligned on 8-sector boundaries

    Total free space is 2013 sectors (1006.5 KiB)

     

    Number  Start (sector)    End (sector)  Size       Code  Name

       1              40          409639   200.0 MiB   EF00  EFI System Partition

       2          409640      1449034287   690.8 GiB   AF00  Customer

       3      1449034288      1450303823   619.9 MiB   AB00  Recovery HD

       4      1450305536      1954209791   240.3 GiB   0700  BOOTCAMP

  • by corabict,

    corabict corabict May 31, 2016 4:39 PM in response to Loner T
    Level 1 (8 points)
    Windows Software
    May 31, 2016 4:39 PM in response to Loner T

    yes I missed the question even though you pointed to it more than once.

    When I did realized I get back to it and do it the right way and that was the result The terminal output in my previous post. and i tried it now and the code remains the same should i build a clean gpt one more time. Sorry it was just a stupid mistake.

    Thanks for your patience.

  • by Loner T,

    Loner T Loner T May 31, 2016 4:59 PM in response to corabict
    Level 7 (23,828 points)
    Safari
    May 31, 2016 4:59 PM in response to corabict

    You do not need to rebuild the GPT because it has correct values and sizes.

     

    Number  Start (sector)    End (sector)  Size       Code  Name

       1              40          409639   200.0 MiB   EF00  EFI System

       2          409640       391519207   186.5 GiB   AF00  Apple HFS/HFS+

       3       391519208       392788743   619.9 MiB   AB00  Recovery HD

       4       392790016       976773119   278.5 GiB   0700  Microsoft basic data

     

    The 'code' column should match as shown in the above output, if you repeat the steps again. If you want, post the output of the MBR Terminal session and we can check.

  • by corabict,

    corabict corabict May 31, 2016 5:11 PM in response to Loner T
    Level 1 (8 points)
    Windows Software
    May 31, 2016 5:11 PM in response to Loner T

    here it is

    GPT fdisk (gdisk) version 1.0.1
    
    
    Warning: Devices opened with shared lock will not have their
    partition table automatically reloaded!
    Partition table scan:
      MBR: hybrid
      BSD: not present
      APM: not present
      GPT: present
    
    
    Found valid GPT with hybrid MBR; using GPT.
    
    
    Command (? for help): p
    Disk /dev/rdisk0: 976773168 sectors, 465.8 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 548D6FCE-41CD-4737-931E-4AD9CA6F42C5
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 976773134
    Partitions will be aligned on 8-sector boundaries
    Total free space is 1293 sectors (646.5 KiB)
    
    
    Number  Start (sector)    End (sector)  Size       Code  Name
       1              40          409639   200.0 MiB   EF00  EFI System
       2          409640       391519207   186.5 GiB   AF00  Apple HFS/HFS+
       3       391519208       392788743   619.9 MiB   AB00  Recovery HD
       4       392790016       976773119   278.5 GiB   0700  Microsoft basic data
    
    
    Command (? for help): r
    
    
    Recovery/transformation command (? for help): o
    
    
    Disk size is 976773168 sectors (465.8 GiB)
    MBR disk identifier: 0x00000000
    MBR partitions:
    
    
    Number  Boot  Start Sector   End Sector   Status      Code
       1                     1       409639   primary     0xEE
       2                409640    391519207   primary     0x01
       3             391519208    392788743   primary     0x01
       4      *      392790016    976773119   primary     0x01
    
    
    Recovery/transformation command (? for help): h
    
    
    WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
    just hit the Enter key at the below prompt and your MBR partition table will
    be untouched.
    
    
    Type from one to three GPT partition numbers, separated by spaces, to be
    added to the hybrid MBR, in sequence: 2 3 4
    Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y
    
    
    Creating entry for GPT partition #2 (MBR partition #2)
    Enter an MBR hex code (default AF): N
    Set the bootable flag? (Y/N): N
    
    
    Creating entry for GPT partition #3 (MBR partition #3)
    Enter an MBR hex code (default AB): N
    Set the bootable flag? (Y/N): N
    
    
    Creating entry for GPT partition #4 (MBR partition #4)
    Enter an MBR hex code (default 07): y
    Set the bootable flag? (Y/N): y
    
    
    Recovery/transformation command (? for help): o
    
    
    Disk size is 976773168 sectors (465.8 GiB)
    MBR disk identifier: 0x00000000
    MBR partitions:
    
    
    Number  Boot  Start Sector   End Sector   Status      Code
       1                     1       409639   primary     0xEE
       2                409640    391519207   primary     0x01
       3             391519208    392788743   primary     0x01
       4      *      392790016    976773119   primary     0x01
    
    
    Recovery/transformation command (? for help):     
    
  • by Loner T,

    Loner T Loner T May 31, 2016 5:56 PM in response to corabict
    Level 7 (23,828 points)
    Safari
    May 31, 2016 5:56 PM in response to corabict

    corabict wrote:

     

    here it is

    1.  
    2. Creating entry for GPT partition #2 (MBR partition #2) 
    3. Enter an MBR hex code (default AF): AF00
    4. Set the bootable flag? (Y/N): N 
    5.  
    6.  
    7. Creating entry for GPT partition #3 (MBR partition #3) 
    8. Enter an MBR hex code (default AB): AB00
    9. Set the bootable flag? (Y/N): N 
    10.  
    11.  
    12. Creating entry for GPT partition #4 (MBR partition #4) 
    13. Enter an MBR hex code (default 07): 0700
    14. Set the bootable flag? (Y/N): y 
    15.  

     

     

    See the highlighted lines. Please repeat.

  • by corabict,

    corabict corabict May 31, 2016 6:25 PM in response to Loner T
    Level 1 (8 points)
    Windows Software
    May 31, 2016 6:25 PM in response to Loner T

    Thanks a million. There's only a little thing here, I get the code column right and rebuilBCD

    The Boot camp partition read 178 GB and there's unallocated 100 GB how should i merge them without messing with the partition table.

    And it's better if I can make them as another partition. if it's complicated or not possible then merging them is good for me.

  • by Loner T,

    Loner T Loner T May 31, 2016 6:36 PM in response to corabict
    Level 7 (23,828 points)
    Safari
    May 31, 2016 6:36 PM in response to corabict

    This line...

    4       392790016       976773119   278.5 GiB   0700  Microsoft basic data 

    shows allocated size to be 278 Gib.

    The Boot camp partition read 178 GB and there's unallocated 100 GB

    100 Gb (Free) + 178 Gb (Used) = 278 Gb (Allocated)

     

    If you are able to boot into Windows, can you post a screen shot from Windows Disk Management?

  • by corabict,

    corabict corabict May 31, 2016 6:54 PM in response to Loner T
    Level 1 (8 points)
    Windows Software
    May 31, 2016 6:54 PM in response to Loner T

    Disk management reads it as 278 GB but in explorer, it reads 178 GB and within partition wizard through hiren boot cd it reads 100 GB unallocated.

    explorer.PNG

    management.PNG

    I can't figure out what does that mean, it's so weird.

  • by Loner T,

    Loner T Loner T May 31, 2016 7:30 PM in response to corabict
    Level 7 (23,828 points)
    Safari
    May 31, 2016 7:30 PM in response to corabict

    1. Your Disk Management matches the OSX GPT and MBR.

    2. Click on C: and look at Properties. What does it show?

    3. Run chkdsk on C: (do not touch D: with chkdsk) and check Explorer.

    4. Hiren's CD seems to have a bug. Chkdsk may help address this discrepancy.

  • by corabict,

    corabict corabict May 31, 2016 8:06 PM in response to Loner T
    Level 1 (8 points)
    Windows Software
    May 31, 2016 8:06 PM in response to Loner T

    You know I really can't thank you enough, you are patient and a gentleman and I weren't helping  you. But really I'm so grateful to all the time you spent with me to fix that error. and I learned a lot and will search for these command line operations that you did for me to fully understand them.

    As for the last problem of not reading the actual size of the partition, it can be solved using DISKPART via Command Prompt (with admin permission).

    solved.PNG

    Again Thanks, Thanks and Thanks.

  • by Loner T,

    Loner T Loner T May 31, 2016 8:54 PM in response to corabict
    Level 7 (23,828 points)
    Safari
    May 31, 2016 8:54 PM in response to corabict

    Diskpart on a GPT disk can be dangerous. Can you test switching back and forth between the two OSes?

  • by corabict,

    corabict corabict May 31, 2016 9:01 PM in response to Loner T
    Level 1 (8 points)
    Windows Software
    May 31, 2016 9:01 PM in response to Loner T

    I Did and it worked like a charm. I knew it wasn't 100% safe but I tried both Mac os X and windows. They are working just fine. Thanks man.

  • by Loner T,

    Loner T Loner T May 31, 2016 9:39 PM in response to corabict
    Level 7 (23,828 points)
    Safari
    May 31, 2016 9:39 PM in response to corabict

    Please back up OSX, Windows and create a Windows System Restore point.

Previous Page 2