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 65 of 102 last Next
  • by dark fury,

    dark fury dark fury Dec 27, 2013 8:52 PM in response to Number88
    Level 1 (4 points)
    Mac OS X
    Dec 27, 2013 8:52 PM in response to Number88

    @number88. I installed Windows7 via Boot Camp. After upgrading to Mavericks, I am not able to boot into Windows.

     

    I had encountered the same problem earlier when I used disk utility to reduce the size of my OS X partition. I posted my problem on this thread and got it resolved thanks to Christopher Murphy. Now I am not able to find the post that resolved my trouble.

  • by Number88,

    Number88 Number88 Dec 28, 2013 5:54 AM in response to dark fury
    Level 3 (750 points)
    Dec 28, 2013 5:54 AM in response to dark fury

    This is likely to happen with 5 partitions.

    Near the top of the page under the Support tab is a smaller tab called "your stuff". Click on that and select discussions to see if you can find the other thread which helped you.

     

    I suspect that you created a new hybrid MBR with gdisk and that you will need to do that again.

     

    In gdisk type "r" to go to recovery menu then type "h" to start creating the new hybrid MBR.

    In the new hybrid MBR you should answer Y to adding the EFI partition to it and then you should add partitions 2 4 and 5 to the MBR accepting default partition types.

    For partitions 2 and 4 answer N to making them bootable but for partition 5 answer Y to make it bootable.

    Once finished don't forget to type "w" to write the changes to the partition table.

    Reboot and see how that goes.

  • by dark fury,

    dark fury dark fury Dec 28, 2013 7:45 AM in response to Number88
    Level 1 (4 points)
    Mac OS X
    Dec 28, 2013 7:45 AM in response to Number88

    First things first. THANKS A LOT CHRISTOPHER MURPHY!  And thanks to a lot of other people, on this thread, who helped me.

     

    @Number88 - Yeah, I did navigate but this thread is too huge and well, I figured out everything. Thank you so much I am giving a walkthrough below

     

    @people-with-bootcamp-woes

     

    This is going to be a somewhat pretty long post on how I was able to boot into Windows 7 after I lost it twice. First, when I resized a Mac OS X partition and second, when I upgraded to Mavericks and I lost BootCamp again.

     

    PLEASE NOTE THAT THIS SOLUTION WILL NOT SUIT EVERYONE, FOLLOW THIS GUIDE WITH CARE.

     

     

    1. Open Terminal:

     

    fury$ sudo gpt -r -vv show disk0

    Password:

    gpt show: disk0: mediasize=500107862016; sectorsize=512; blocks=976773168

    gpt show: disk0: PMBR at sector 0

    gpt show: disk0: Pri GPT at sector 1

    gpt show: disk0: Sec GPT at sector 976773167

          start       size  index  contents

              0          1         PMBR

              1          1         Pri GPT header

              2         32         Pri GPT table

             34          6       

             40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

         409640  292968744      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

      293378384    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

      294647920  583722896      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

      878370816     262144       

      878632960   98140160      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      976773120         15       

      976773135         32         Sec GPT table

      976773167          1         Sec GPT header

    furys-MacBook-Pro:~ fury$ sudo fdisk /dev/disk0

    Disk: /dev/disk0          geometry: 60801/255/63 [976773168 sectors]

    Signature: 0xAA55

             Starting       Ending

    #: id  cyl  hd sec -  cyl  hd sec [     start -       size]

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

    1: EE 1023 254  63 - 1023 254  63 [         1 -  976773167] <Unknown ID>

    2: 00    0   0   0 -    0   0   0 [         0 -          0] unused    

    3: 00    0   0   0 -    0   0   0 [         0 -          0] unused    

    4: 00    0   0   0 -    0   0   0 [         0 -          0] unused    

    furys-MacBook-Pro:~ fury$ diskutil list

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *500.1 GB   disk0

       1:                        EFI EFI                     209.7 MB   disk0s1

       2:                  Apple_HFS Fort Knox               150.0 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:                  Apple_HFS Mac                     298.9 GB   disk0s4

       5:       Microsoft Basic Data BOOTCAMP                50.2 GB    disk0s5

     

      Download GPT Fdisk from here - http://sourceforge.net/projects/gptfdisk/

     

    furys-MacBook-Pro:~ fury$ sudo gdisk /dev/disk0

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

      BSD: not present

      APM: not present

      GPT: present

     

     

    Found valid GPT with protective 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): p

    Disk /dev/disk0: 976773168 sectors, 465.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 00002B9E-3460-0000-B87A-000005760000

    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 262165 sectors (128.0 MiB)

     

     

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

       1              40          409639   200.0 MiB   EF00  EFI system partition

       2          409640       293378383   139.7 GiB   AF00  Customer

       3       293378384       294647919   619.9 MiB   AB00  Recovery HD

       4       294647920       878370815   278.3 GiB   AF00  Fort Knox 2

       5       878632960       976773119   46.8 GiB    0700  BOOTCAMP

     

     

    Command (? for help): r

     

     

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

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

     

     

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

    Enter an MBR hex code (default 07):

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

     

     

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

     

     

    Recovery/transformation command (? for help): o

     

     

    Disk size is 976773168 sectors (465.8 GiB)

    MBR disk identifier: 0x1CF32E80

    MBR partitions:

     

     

    Number  Boot  Start Sector   End Sector   Status      Code

       1                     1    878632959   primary     0xEE

       2      *      878632960    976773119   primary     0x07

     

     

     

     

    Recovery/transformation command (? for help): w

     

     

     

     

    Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING

    PARTITIONS!!

     

     

    Do you want to proceed? (Y/N): y

     

     

     

     

    OK; writing new GUID partition table (GPT) to /dev/disk0.

    Warning: Devices opened with shared lock will not have their

    partition table automatically reloaded!

    Warning: The kernel may continue to use old or deleted partitions.

    You should reboot or remove the drive.

    The operation has completed successfully.

     

     

    furys-MacBook-Pro:~ fury$

     

    Quit Terminal and reboot. Enjoy BootCamp

     

    Happy holidays everyone! Let's hope that in 2014, the next version of OS X provides us a simple solution when the OS needs to be upgraded or when the OS X partitions are resized (with Windows installed via BootCamp.)

  • by Number88,

    Number88 Number88 Dec 28, 2013 7:54 AM in response to dark fury
    Level 3 (750 points)
    Dec 28, 2013 7:54 AM in response to dark fury

    Hmm you've only added the EFI partition and Windows to the MBR. That means Windows won't see any Mac partitions.  If that's not a problem then you're fine.

    If it is a problem you can create a new hybrid MBR and include partitions 2 and 4 as well (as advised).

     

    At least Windows boots again

     

    It's not the upgrade's fault, per se. Your problem is having 5 partitions and therefore an unsupported setup.

  • by Loner T,

    Loner T Loner T Dec 28, 2013 8:19 AM in response to dark fury
    Level 7 (24,800 points)
    Safari
    Dec 28, 2013 8:19 AM in response to dark fury

    @Dark Fury... . You may want to consider making this a tip in the Bootcamp.

     

    @Number88... The EFI support with newer MACs that you have been following may also be worth a tip.

     

    I wish Apple would provide EFI updates for older MACs and get away from this hybrid and its inherent limitations.

  • by dark fury,

    dark fury dark fury Dec 28, 2013 8:34 AM in response to Number88
    Level 1 (4 points)
    Mac OS X
    Dec 28, 2013 8:34 AM in response to Number88

    I don't know how to play with MBRs and partitions as I am new to Mac, not that I am good with Windows boot loaders and stuff but at least I know my way around with a little help. I don't mind if Windows doesn't read the Mac partitions but yes, I would like to learn your solution.

     

    I have 5 partitions because well, I wanted an extra partition on Mac for storing all my documents, pics, etc. Am I doing something wrong? It was so easy on Windows - shrink and merge without any problems at all.

  • by Loner T,

    Loner T Loner T Dec 28, 2013 8:39 AM in response to dark fury
    Level 7 (24,800 points)
    Safari
    Dec 28, 2013 8:39 AM in response to dark fury

    dark fury wrote:

    It was so easy on Windows - shrink and merge without any problems at all.

     

    With two OSes which support two different models of the disk (GPT vs MBR), disk resources now have two masters.

  • by Number88,

    Number88 Number88 Dec 28, 2013 8:43 AM in response to dark fury
    Level 3 (750 points)
    Dec 28, 2013 8:43 AM in response to dark fury

    Hi dark fury,

    once Bootcamp is in use the only supported format is a max of 4 partitions (because of the hybrid MBR used).

    Having 5 means you have to leave one partition out of the MBR which means that that partition (in your case recovery HD, probably) will appear as free space to Windows AND to any GPT-unaware partitioning tools - ie fair game for over-writing.

    Any time OSX is upgraded you will have this problem booting Windows with your current setup.

     

    To get Windows Disk Management to "see" the OSX partitions you would need to create a new hybrid MBR with gdisk and add the EFI partition as the first entry and also add partitions 2 4 & 5, making 5 the only bootable partition (ie answering N to making all the others bootable and Y to making 5 bootable).

  • by SlamSlam,

    SlamSlam SlamSlam Dec 29, 2013 11:32 AM in response to Scotch_Brawth
    Level 1 (0 points)
    Dec 29, 2013 11:32 AM in response to Scotch_Brawth

    I added an SSD and then moved my HDD (which has my Bootcamp partition) over as a secondary disk. I then deleted the Recovery partition on the secondary HDD and used Camptune X to resize my Bootcamp partition. This caused the issue described in the OP.

     

    Here is what my disks look like:

     

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *256.1 GB   disk0

       1:                        EFI EFI                     209.7 MB   disk0s1

       2:                  Apple_HFS Macintosh HD            255.2 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

    /dev/disk1

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *500.1 GB   disk1

       1:                        EFI EFI                     209.7 MB   disk1s1

       2:                  Apple_HFS oldHD                   359.6 GB   disk1s2

       3:       Microsoft Basic Data BOOTCAMP                139.6 GB   disk1s3

     

    This is what I see on disk1:

     

    sudo gdisk /dev/disk1

     

    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.

     

    When I view help I see

     

    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

     

    Not quite sure which option to choose?

  • by Loner T,

    Loner T Loner T Dec 29, 2013 11:50 AM in response to SlamSlam
    Level 7 (24,800 points)
    Safari
    Dec 29, 2013 11:50 AM in response to SlamSlam

    You may want to post a separate thread with the output of the following commands and post a link to that thread here. You can also use the 'p' option in the gdisk menu.

     

    sudo fdisk /dev/rdisk1

    sudo gdisk -l /dev/rdisk1

    sudo gpt -vv -r show disk1

  • by JuliusMD,

    JuliusMD JuliusMD Dec 29, 2013 1:05 PM in response to Christopher Murphy
    Level 1 (0 points)
    Dec 29, 2013 1:05 PM in response to Christopher Murphy

    OK, my setup was as follows:

     

    I had a previous OS X and created a Win7 Bootcamp and under Win7 I changed the size of my OS X partition to add a new partition. Which I was never able to access from the OS X side (after reading parts of this thread I now know that this was because of MBR/GPT).

     

    Now I upgraded to 10.9.1 and now the additional partition is not recognized but I am able to boot into Win7.

     

    How do I get my additonal partition to show up again. There are important files on it.

     

    sudo gpt -r -vv show disk0

     

    gpt show: disk0: mediasize=2000398934016; sectorsize=512; blocks=3907029168

    gpt show: disk0: Suspicious MBR at sector 0

    gpt show: disk0: Pri GPT at sector 1

    gpt show: disk0: Sec GPT at sector 3907029167

           start        size  index  contents

               0           1         MBR

               1           1         Pri GPT header

               2          32         Pri GPT table

              34           6        

              40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

          409640  1954429192      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

      1954838832     1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

      1956108368  1823371184        

      3779479552   127549440      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      3907028992         143        

      3907029135          32         Sec GPT table

      3907029167           1         Sec GPT header

     

     

    sudo fdisk /dev/disk0


    Disk: /dev/disk0          geometry: 243201/255/63 [3907029168 sectors]

    Signature: 0xAA55

             Starting       Ending

    #: id  cyl  hd sec -  cyl  hd sec [     start -       size]

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

    1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>

    2: AF 1023 254  63 - 1023 254  63 [    409640 - 1954429192] HFS+       

    3: AB 1023 254  63 - 1023 254  63 [1954838832 -    1269536] Darwin Boot

    *4: 07 1023 254  63 - 1023 254  63 [3779479552 -  127549440] HPFS/QNX/AUX

  • by Number88,

    Number88 Number88 Dec 29, 2013 1:30 PM in response to JuliusMD
    Level 3 (750 points)
    Dec 29, 2013 1:30 PM in response to JuliusMD

    JuliusMD, because you created a new partition in Windows that new partition is not in the GPT. Also, because the MBR is already filled (with 4 pre-existing partitions) it doesn't appear there either.

    Can you see this partition from Windows Disk Management utility? If so try assigning a "drive" letter to it.

  • by JuliusMD,

    JuliusMD JuliusMD Dec 29, 2013 1:38 PM in response to Number88
    Level 1 (0 points)
    Dec 29, 2013 1:38 PM in response to Number88

    Number88, I can see it in Windows Disk Management but it is Unallocated

  • by SlamSlam,

    SlamSlam SlamSlam Dec 29, 2013 1:43 PM in response to Loner T
    Level 1 (0 points)
    Dec 29, 2013 1:43 PM in response to Loner T

    Thanks. I posted the question plus the additional outputs here:

     

    https://discussions.apple.com/message/24301424

  • by Number88,

    Number88 Number88 Dec 29, 2013 1:43 PM in response to JuliusMD
    Level 3 (750 points)
    Dec 29, 2013 1:43 PM in response to JuliusMD

    So it doesn't recognise that a partition exists - just a space. That's as I feared.

    By all means see what other more knowledgable people than me have to say, but I suspect you may have to recover that whole partition with something like testdisk so that it is recognised as a partition again.

    If that goes well you may be able to get it usable again.

     

    Even if all that goes well and the partition is usable again you are going to have this problem again. 5 partitions do not go into a MBR.

first Previous Page 65 of 102 last Next