Scotch_Brawth

Q: Repairing Boot Camp after creating new partition

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)

Posted on Jul 26, 2012 11:28 PM

Close

Q: Repairing Boot Camp after creating new partition

  • All replies
  • Helpful answers

first Previous Page 50 of 102 last Next
  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Oct 24, 2013 2:57 PM in response to frankywashere
    Level 3 (555 points)
    Oct 24, 2013 2:57 PM in response to frankywashere

    Honestly I think the rEFIt part is unnecessary and overly complicates what has a straight forward solution. He was already familiar with rEFIt. If you are, then you'll understand it and can go that route if you want, although I recommend rEFInd because that's the currently maintained fork, while rEFIt has been abandoned. If you're not familiar with either of them, I wouldn't trouble yourself learning about it for this use case.

     

    It does come in handy for other use cases, in particular triple booting Windows, OS X and Linux instead of depending on the typical Linux bootloaders like GRUB, syslinux, or LILO.

  • by frankywashere,

    frankywashere frankywashere Oct 24, 2013 3:06 PM in response to frankywashere
    Level 1 (0 points)
    Oct 24, 2013 3:06 PM in response to frankywashere

    OK chris i deleted my partition and recreated it using the data from TESTDISK.

     

    It hasn't mounted yet.

     

    This other says he "restarted using reffit and SYNCED MBR TO GPT"

     

    I'm going to now restart with reffit and try this however, is it easy to SYNC MBR to GPT?

     

    I'm guessing i can follow the menu's here?

  • by frankywashere,

    frankywashere frankywashere Oct 24, 2013 3:08 PM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 24, 2013 3:08 PM in response to Christopher Murphy

    I deleted and recreated the partition Chris.

     

    I'm going to try restarting into Refit and try "Syncing MBR to GPT"

     

    I'm guessing i can just follow the on screen menus for this?

     

    My windows partition hasn't shown up yet.

  • by tomd007,

    tomd007 tomd007 Oct 24, 2013 3:28 PM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 24, 2013 3:28 PM in response to Christopher Murphy

    Hi Christopher Murphy I have followed the steps you suggested and I have managed to get the Bootcamp loaded as "Read Only".

     

    On MacOS, I went to "System Preferences\Startup Disk" and there I could see the "BOOTCAMP Windows" option. So I selected it and hit "Restart"... it attempted to start Windows but there was a message saying something like "No Operating System Found".

     

    So I restarted the computer in MacOS.

     

    I tried your suggested final step but I got stucked there for not understanding what to answer in the questions. So here you can see my attempt:

     

    -------------------------------------------------------------------------------- --------------

     

    Last login: Thu Oct 24 16:54:11 on ttys000

    Toms-Laptop:~ tom$ sudo gdisk /dev/rdisk0

    Password:

    GPT fdisk (gdisk) version 0.8.8

     

    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): ?

    b          back up GPT data to a file

    c          change a partition's name

    d          delete a partition

    i          show detailed information on a partition

    l          list known partition types

    n          add a new partition

    o          create a new empty GUID partition table (GPT)

    p          print the partition table

    q          quit without saving changes

    r          recovery and transformation options (experts only)

    s          sort partitions

    t          change a partition's type code

    v          verify disk

    w          write table to disk and exit

    x          extra functionality (experts only)

    ?          print this menu

     

    Command (? for help): r

     

    Recovery/transformation command (? for help): ?

    b          use backup GPT header (rebuilding main)

    c          load backup partition table from disk (rebuilding main)

    d          use main GPT header (rebuilding backup)

    e          load main partition table from disk (rebuilding backup)

    f          load MBR and build fresh GPT from it

    g          convert GPT into MBR and exit

    h          make hybrid MBR

    i          show detailed information on a partition

    l          load partition data from a backup file

    m          return to main menu

    o          print protective MBR data

    p          print the partition table

    q          quit without saving changes

    t          transform BSD disklabel partition

    v          verify disk

    w          write table to disk and exit

    x          extra functionality (experts only)

    ?          print this menu

     

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

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

     

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

    Enter an MBR hex code (default EF):

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

     

    Unused partition space(s) found. Use one to protect more partitions? (Y/N):

     

    -------------------------------------------------------------------------------- ------------------------------------

     

    To this last question I don't know what to answer. I have tried both "Y" and "N" and it looks to finish the process, then I don't know how to add partitions 2, 3 and 4.

     

    Any suggestion?

     

    Appart from that, I have tried inserting my Windows 7 (64bits) DVD and booting from it to attempt and repair Windows... but once the DVD boots up and I hit "Repair your computer" it doesnt detect any Windows instalation. Do you know why this may be?

     

    By looking at the Bootcamp mounted drive in Finder, it looks OK, all the Windows files are there.

     

    Many thanks,

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Oct 24, 2013 3:31 PM in response to tomd007
    Level 3 (555 points)
    Oct 24, 2013 3:31 PM in response to tomd007

    In 50 pages, not one example exists of adding partition 1 to the hybrid MBR.

     

    So start over, and add partitions 2 3 4 to the hybrid MBR. Answer yes to putting EFI GPT into the #1 MBR slot. Use the default hex/type codes for each partition. And only make 4 bootable. That should answer all of the questions although not in exact order.

  • by frankywashere,

    frankywashere frankywashere Oct 24, 2013 3:34 PM in response to tomd007
    Level 1 (0 points)
    Oct 24, 2013 3:34 PM in response to tomd007

    Hey Tom, I'm in the same exact boat as you.

     

    Except, I still havn't gotten my BOOTCAMP to load on the mac or windows side.

     

    The Mac still can't see the bootcamp partition.

     

    I rebooted with reffit and it sees the bootcamp now but I get the "system error" thing.

     

    I used the reffit partition manager and let it repair the partition, but it really didn't change anything other than the MBR Hex Code to say it was an NTFS volume.

  • by frankywashere,

    frankywashere frankywashere Oct 24, 2013 3:35 PM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 24, 2013 3:35 PM in response to Christopher Murphy

    Will try this as well, thanks Chris.

  • by frankywashere,

    frankywashere frankywashere Oct 24, 2013 3:45 PM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 24, 2013 3:45 PM in response to Christopher Murphy

    Ok did it. rebuilt that hybrid MBR, but I still get the "disk error" when i boot into BOOTCAMP.

     

    I'm going to try booting off windows DVD and see if it can repair it.

  • by frankywashere,

    frankywashere frankywashere Oct 24, 2013 3:53 PM in response to tomd007
    Level 1 (0 points)
    Oct 24, 2013 3:53 PM in response to tomd007

    How are you making out Tom?

  • by tomd007,

    tomd007 tomd007 Oct 24, 2013 4:07 PM in response to Christopher Murphy
    Level 1 (0 points)
    Oct 24, 2013 4:07 PM in response to Christopher Murphy

    Christopher Murphy I have no words to thank you... thanks to your guidance I have managed to resolve all the problems.

     

    Bootcamp is now working flawlessly.

     

    For all of those who have managed to load the Bootcamp drive but are still not able to Start Windows... here are the steps for the last bit:

     

    I have marked in "red" the inputs I made so as you can identify my inputs from the text produced by the program. In "blue" you will see comments (not inputs).

     

    So, go to "Terminal" and...

     

    Last login: Thu Oct 24 12:48:49 on console

    Toms-Laptop:~ tom$ sudo gdisk /dev/rdisk0

    Password: (type your password here)

    GPT fdisk (gdisk) version 0.8.8

     

    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): ?

    b          back up GPT data to a file

    c          change a partition's name

    d          delete a partition

    i          show detailed information on a partition

    l          list known partition types

    n          add a new partition

    o          create a new empty GUID partition table (GPT)

    p          print the partition table

    q          quit without saving changes

    r          recovery and transformation options (experts only)

    s          sort partitions

    t          change a partition's type code

    v          verify disk

    w          write table to disk and exit

    x          extra functionality (experts only)

    ?          print this menu

     

    Command (? for help): r

     

    Recovery/transformation command (? for help): ?

    b          use backup GPT header (rebuilding main)

    c          load backup partition table from disk (rebuilding main)

    d          use main GPT header (rebuilding backup)

    e          load main partition table from disk (rebuilding backup)

    f          load MBR and build fresh GPT from it

    g          convert GPT into MBR and exit

    h          make hybrid MBR

    i          show detailed information on a partition

    l          load partition data from a backup file

    m          return to main menu

    o          print protective MBR data

    p          print the partition table

    q          quit without saving changes

    t          transform BSD disklabel partition

    v          verify disk

    w          write table to disk and exit

    x          extra functionality (experts only)

    ?          print this menu

     

    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): (just press enter here)

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

     

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

    Enter an MBR hex code (default AB): (just press enter here)

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

     

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

    Enter an MBR hex code (default 07): (just press enter here)

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

     

    Recovery/transformation command (? for help): w


    After typing the "w" hit enter and restart the computer with "option key", there you will see the Windows Option... select it and "voala!!"

     

    My problem was resolved this way, I didn't need to insert the Windows DVD.

     

    Cheers!

  • by frankywashere,

    frankywashere frankywashere Oct 24, 2013 4:19 PM in response to tomd007
    Level 1 (0 points)
    Oct 24, 2013 4:19 PM in response to tomd007

    I think i forgot to hit the "W" at the end lol, i'll try now.

  • by tomd007,

    tomd007 tomd007 Oct 24, 2013 4:30 PM in response to frankywashere
    Level 1 (0 points)
    Oct 24, 2013 4:30 PM in response to frankywashere

    Hi frankywashere,

     

    if you have not managed to get the Bootcamp drive loaded in MacOS, I think this is probably due to not having established your partitions properly in gdisk.

     

    Before the final step that I have just posted above, you have to first make sure that the Bootcamp drive is loaded.

     

    To do that you need to identify the partition you want to revive with "TestDisk". Write down the initial and last sectors. Make sure that the section is not mounting another important partition in either side.

     

    You need to observe where every useful partition starts and ends and make sure there are not overlaps.

     

    Once you have clear your partitioning plan then proceed to delete the small previous partition 4 and establish the recovered partition 4 instead, make sure you input the correct initial and final sector numbers. Do this with gdisk, let me know if you are confident on how to do this. I can probably show how I did it. This process also finishes with "w", enter and reboot.

     

    After this, reboot MacOS and now you should be able to see "Bootcamp" in Finder.

     

    Follow Christopher Murphy's steps... the guy is brilliant.

     

    I hope this helps you.

  • by frankywashere,

    frankywashere frankywashere Oct 24, 2013 4:29 PM in response to tomd007
    Level 1 (0 points)
    Oct 24, 2013 4:29 PM in response to tomd007

    yes as a matter of fact, i just rechecked my start and end sectors and they are wrong even though i'm pretty sure i corrected them! i'll redo them and go through the steps again and report back

  • by frankywashere,

    frankywashere frankywashere Oct 24, 2013 4:33 PM in response to frankywashere
    Level 1 (0 points)
    Oct 24, 2013 4:33 PM in response to frankywashere

    by the way, anyone know the command in terminal to move BACK a menu???! sorry really annoying

     

    woops it's "M" lol

  • by frankywashere,

    frankywashere frankywashere Oct 24, 2013 4:35 PM in response to tomd007
    Level 1 (0 points)
    Oct 24, 2013 4:35 PM in response to tomd007

    WORKED!!!!! THANK YOU TOM AND CHRIS!

     

    I think it didn't write the partition last time I tried to recreate it with the TESTDISK data because i kept not hitting "W" at the end of GDISK commands

first Previous Page 50 of 102 last Next