Skip navigation

Repairing Boot Camp after creating new partition

176041 Views 1,252 Replies Latest reply: Apr 5, 2014 6:57 AM by BobTheFisherman RSS
1 2 3 ... 84 Previous Next
Scotch_Brawth Calculating status...
Currently Being Moderated
Jul 26, 2012 11:28 PM

I'm running OS X 10.8 and Windows 7 x64 Pro.

 

After properly setting up Boot Camp to dual-boot Windows on my Mac mini, I decided to test whether or not it was true that creating another partition (a data partition for OS X) would interfere with Boot Camp.  Wikipedia claims it does interfere but without citing a source, whilst the Boot Camp documentation itself only specifies that the disk must be a single partition _prior_ to setup - there's no mention of whether the disk must be _kept_ that way afterwards.

 

I opened Disk Utility, reduced the size of my OS X parition from 420GB to 80GB, and created a new partition in the unallocated space.  Here's how it looks now:

/___sbsstatic___/migration-images/190/19047693-1.png

When I attempted to proceed with the process, I did receive a warning that doing this (and I quote), "may" cause problems with Boot Camp.  Seeing as it was inconclusive, I thought I'd give it a shot - nothing ventured…

 

Of course, it borked Boot Camp, otherwise I wouldn't be posting here.  Whilst OS X boots just fine, the Boot Camp partition now no longer shows up in the Startup Manager, though it does in the Startup Disk prefPane.  If I do attempt to boot into Boot Camp, I receive the following message on a black screen:

No bootable device --- insert boot disk and press any key

The advice given to someone who had this same problem was, "fix your damaged Boot Camp volume."  But I'm at a loss as to how to do that.

 

So, anyone know how to proceed now so that I can keep my partitions as is, whilst fully restoring normal Boot Camp functionality?

Mac mini (Mid 2011), Mac OS X (10.7.4)
  • Csound1 Level 7 Level 7 (32,250 points)

    Restore your disk to a single OSX partition and use Boot Camp to create a partition for Win7 or 8, XP is not supported on Mountain Lion, or Lion.

  • Christopher Murphy Level 2 Level 2 (470 points)

    Yes I know how to fix this without starting over from scratch, but it requires committment to the command line and most people turn into wimps and bail out. So unless you commit to the process I'm not going to put in the investment. In the meantime you can provide the output from the following to comfirm/deny what I think is the likely problem and solution:

     

    sudo gpt -r -vv show disk0

    sudo fdisk /dev/disk0

     

    These are read only commands, no modification to the disk is made.

  • dalstott Level 4 Level 4 (2,445 points)

    The easiest solution would be to recover the Boot Camp partition with your Winclone image backup.

    If you haven't done this then consider doing it after things are working correctly. It can save a lot of inconvenience, pain, and suffering.

     

    http://twocanoes.com/winclone.php

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Jul 28, 2012 9:49 AM (in response to dalstott)

    Winclone can't help in this case. Even if it backs up, and can restore both the MBR and GPT, he's already altered the GPT by resizing/splitting a Mac OS partition. What's happened is Disk Utility shouldn't merely warn, it should have disallowed this because while it looks like he has only three partitions, he actually has five:

     

    EFI System, Mac HD, Recovery HD, Internal Storage, Bootcamp. Two of those are hidden. Five partitions. MBR can only hold four. So with GUI tools, he's actually hosed. He'll have to use something like gdisk to create a new hybrid MBR, stuffing GPT partitions 1-4 into MBR partition 1. And then he can put Bootcamp, GPT partition 5, into MBR partition 2 and mark it bootable. Then his computer will boot both systems again.

     

    But that's my speculation until I see both partition maps.

  • Christopher Murphy Level 2 Level 2 (470 points)

    The GUIDs you redacted are not private data, they are partition type GUIDs, However based on the partition start, sizes, and sequence, I'm reasonably certain the GPT is intact. The MBR has been totally obliterated, however. In my opinion this constitutes severe data loss, and I think I'll report this in the Apple dev bug reporter. It should be disallowed, or at least not be so vague as to what will happen and give you the option of effectively losing access to your Windows partition.

     

    Yes a repair is possible. Yes it's easy. If you can format those results with a monospaced font, you can do this.

     

    1. Download the Mac OS X binary of gdisk, a.k.a. GPT fdisk and install it.

    2. Tell me how you formatted your partition results with monospaced font so I can more clearly write out the command line sequence for you to follow to create a new hybrid MBR to fix this problem.

    3. Tell me the build number of Mac OS X from the About this Mac Window.

  • Christopher Murphy Level 2 Level 2 (470 points)

    Please confirm the GUID for the 5th partition (under index) is EBD0A0A2-B9E5-4433-87C0-68B6B72699C7.

    Please confirm the 5th entry for disk0 is BOOTCAMP with this command:

    diskutil list

  • Christopher Murphy Level 2 Level 2 (470 points)

    sudo gdisk /dev/disk0

     

    If you get any error messages at this point, report the error messages, don't proceed further.

     

    You're now in gdisk interactive mode. Menus/commands are single characters followed by return/enter. So type ? and <enter> and you'll get the main menu listing commands. Type p <enter> and it will print (display) the current GPT. Since you have 5 GPT entries, you can't use a 1 for 1 GPT to MBR scheme like Apple does. The following suggestion is safe, but all hybrid MBRs are non-standard inventions, and therefore I can't tell you how Boot Camp Assistant or Disk Utility will react to this hybrid MBR should you decide to make changes later. What I can tell you is Windows, Linux, and Mac OS X themselves have no problem with this MBR scheme.

     

    r <enter>        go to the recovery & transformation menu

    h <enter>        create a new hybrid MBR

    5 <enter>        add partion 5 to the MBR

    <enter>          accept the default MBR hex code of 07

    y <enter>        set the bootable flag

    n <enter>        do not protect more partitions

    o < enter>       print (display) the MBR

     

    You should have two entries. One type EE, one 07, with the 07 entry marked with * under Boot. If you don't, report back. If you do, write out the update partition information, and hope  a power failure doesn't occur for the next few seconds...

     

    w <enter>     write partition table to disk

     

    reboot. hold down option - you should be able to boot into either Mac HD, Recovery HD, or Windows.

     

    I just tested this same five partition GPT and 2 partition MBR on a working system and the instructions above worked.

     

    Note, so long as CSM-BIOS and thus MBR are required for Boot Camp instead of EFI booting Windows, we're stuck with flaky MBR problems, as well as the 2TB disk limitation for Windows boot disks.

     

    Also, I filed bug ID 11980880 at bugreport.apple.com and referenced this thread.

  • Christopher Murphy Level 2 Level 2 (470 points)

    BTW if you want, before the w command to write out the partition to disk, you can do

    o <enter>

    p <enter>

    And report those results first, leaving gdisk running...the modified partition tables are in memory only and nothing can be hurt by leaving it running in this state. But you do want to reboot shortly after writing this out to disk.

  • Christopher Murphy Level 2 Level 2 (470 points)

    Oops. Forgot that one. Answer that yes.

1 2 3 ... 84 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (21)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.