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 82 of 102 last Next
  • by turbostar,

    turbostar turbostar Mar 6, 2014 1:19 PM in response to Christopher Murphy
    Level 4 (2,925 points)
    Mar 6, 2014 1:19 PM in response to Christopher Murphy

    Christopher et al

     

    Would the solution to creating another Mac partition (after successfully boot camping so I already have a Mac and Windows partition) change if I am only using Mavericks and W8.1?

     

    Here's where I asked the question originally

    https://discussions.apple.com/thread/5693875?tstart=0

     

    Ideally, I would like 3 partitions - Mac OS, Mac files and Windows.

  • by jamie.shaw,

    jamie.shaw jamie.shaw Mar 6, 2014 2:01 PM in response to jamie.shaw
    Level 1 (14 points)
    Mac OS X
    Mar 6, 2014 2:01 PM in response to jamie.shaw

    jamie.shaw wrote:

     

    Loner T wrote:

     

    jamie.shaw wrote:

     

    Either these commands, or the boot camp fixes seem to have left the EFI partition (or at least the volume created for it) available to disk utility.  Disk Utility is now showing "disk0s1" as a ~300mb partition before Macintosh HD.

     

    Does someone know a command to re-hide this?

     

    Make sure you are not sitting in /Volumes/EFI directory in any terminal window and then

     

    sudo diskutil unmount /Volumes/EFI

     

    Hmm – not a permenant solution.

     

    Interestingly, after fixing my MBR through Window's recovery, one of my GPT partition's now has a name and an index:  the previous 716800 partition is now "MBR part 7" with an index of 1.  I'm guessing this is the "disk0s1" that keeps getting mounted on boot into OS X.

     

    Any ideas how I can remove this as an indexed partition (and stop it being mounted on boot?)

     

    Forgot to post my outputs:

     

    fdisk looks fine.

    Disk: /dev/disk0          geometry: 60821/255/63 [977105060 sectors]

    Signature: 0xAA55

             Starting       Ending

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

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

    1: 07 1023 254  63 - 1023 254  63 [ 976388096 -     716800] HPFS/QNX/AUX

    2: AF   25 127  15 - 1023 254  63 [    409640 -  876953152] HFS+       

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

    *4: 07 1023 254  63 - 1023 254  63 [ 878632960 -   97755136] HPFS/QNX/AUX

     

    GPT shows new "MBR" at sector 976388096.

    gpt show: disk0: mediasize=500277790720; sectorsize=512; blocks=977105060

    gpt show: disk0: MBR at sector 0

    gpt show: disk0: Pri GPT at sector 1

    gpt show: disk0: Sec GPT at sector 977105059

          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  876953152      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

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

      878632328        632        

      878632960   97755136      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      976388096     716800      1  MBR part 7

      977104896        131        

      977105027         32         Sec GPT table

      977105059          1         Sec GPT header

     

    Would this be safe to delete maybe?  It's still registering the MBR at sector 0.

    (Ideally, if I can just "unindex" it and hide it from disk utility and unmounting on boot, that's fine by me.  It's mounting as a NTFS volume [disk0s1])

     

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:     FDisk_partition_scheme                        *500.3 GB   disk0

       1:               Windows_NTFS                         367.0 MB   disk0s1

       2:                  Apple_HFS Macintosh HD            449.0 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:               Windows_NTFS Windows HD              50.1 GB    disk0s4

     

    UPDATE:  Additionally, I've noticed that "Macintosh HD" is no longer available under "Startup Disk" - it is on the actual bootloader, just not the prefpane :/

  • by Number88,

    Number88 Number88 Mar 6, 2014 4:05 PM in response to jamie.shaw
    Level 3 (750 points)
    Mar 6, 2014 4:05 PM in response to jamie.shaw

    jamie.shaw, I'm not sure exactly what has happened but your fdisk output is not correct nor does it agree with your gpt show output.

    If you look carefully your fdisk output shows a partition type 07 for the first partition - this is incorrect.

    It should be a type EF for the EFI partition. It is correct on your gpt output though.

     

    You need that EFI partition to be intact otherwise your Mac will be unable to process firmware updates.

     

    In view of this I would suggest that you create a new hybrid MBR, answering Y to setting the EFI partition as first in the MBR.

    Obviously your other partitions need to be included too and the Windows partition needs to be marked bootable.

     

    This may or may not affect booting Windows - we'll just have to see.

     

    I have no idea what MBR partition 7 is. What was that partition previously? Can't remember.

     

    EDIT  Ah, I see it was free space if I'm not mistaken.

  • by jamie.shaw,

    jamie.shaw jamie.shaw Mar 6, 2014 10:03 PM in response to Number88
    Level 1 (14 points)
    Mac OS X
    Mar 6, 2014 10:03 PM in response to Number88

    Cheers, I'll create a new hybrid MBR through frisk and report back. As for that other MBR, what do you recommend? I cannot edit in Disk Utility - is there anyway to remove it's indexing so OS X cannot "see" it like the recovery partition?

  • by jamie.shaw,

    jamie.shaw jamie.shaw Mar 7, 2014 12:54 AM in response to Number88
    Level 1 (14 points)
    Mac OS X
    Mar 7, 2014 12:54 AM in response to Number88

    Number88 wrote:

     

    jamie.shaw, I'm not sure exactly what has happened but your fdisk output is not correct nor does it agree with your gpt show output.

    If you look carefully your fdisk output shows a partition type 07 for the first partition - this is incorrect.

    It should be a type EF for the EFI partition. It is correct on your gpt output though.

     

    You need that EFI partition to be intact otherwise your Mac will be unable to process firmware updates.

     

    In view of this I would suggest that you create a new hybrid MBR, answering Y to setting the EFI partition as first in the MBR.

    Obviously your other partitions need to be included too and the Windows partition needs to be marked bootable.

     

    This may or may not affect booting Windows - we'll just have to see.

     

    I have no idea what MBR partition 7 is. What was that partition previously? Can't remember.

     

    EDIT  Ah, I see it was free space if I'm not mistaken.

     

    Right – all sorted... I think.

     

    It looks like the bootrec.exe /FixMbr or Windows 8 Auto Recovery created this.  I don't know how or why, but it made the entire disk into an MBR partition table.

     

    To resolve, I created a new Hybrid MBR from the GPT in gdisk.  This did break Windows 8's boot config again.  However, instead of the automated recovery (incase it ended in the same result), I used the manual bootrec.exe /RebuildBcd.

     

    And to confirm:
    • Mac HD, Recovery HD and Windows are all bootable and appear in the "alt" boot manager.

    • Mac HD and Windows are both available in the Startup Disk prefpane.

    • That secondary MBR has now been removed, and no longer is mounted as disk0s1 on boot.

    • Disk Utility verifies the Mac HD and whole disk as good.

     

    For reference, and security, below are the outputs of the various commands used over the issue.  Would someone be awesome and give it a quick glance over and ensure everything looks fine?

     

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *500.3 GB   disk0

       1:                        EFI EFI                     209.7 MB   disk0s1

       2:                  Apple_HFS Macintosh HD            449.0 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:       Microsoft Basic Data Windows HD              50.1 GB    disk0s4

     

    Disk: /dev/disk0          geometry: 60821/255/63 [977105060 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 -  876953152] HFS+       

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

    *4: 07 1023 254  63 - 1023 254  63 [ 878632960 -   97755136] HPFS/QNX/AUX

     

    gpt show: disk0: mediasize=500277790720; sectorsize=512; blocks=977105060

    gpt show: disk0: Suspicious MBR at sector 0

    gpt show: disk0: Pri GPT at sector 1

    gpt show: disk0: Sec GPT at sector 977105059

          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  876953152      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

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

      878632328        632        

      878632960   97755136      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      976388096     716931        

      977105027         32         Sec GPT table

      977105059          1         Sec GPT header

  • by Number88,

    Number88 Number88 Mar 7, 2014 6:53 AM in response to jamie.shaw
    Level 3 (750 points)
    Mar 7, 2014 6:53 AM in response to jamie.shaw

    Yep that looks better. Very similar to my own 

  • by Nirmal.Web,

    Nirmal.Web Nirmal.Web Mar 13, 2014 9:44 AM in response to Christopher Murphy
    Level 1 (0 points)
    Mar 13, 2014 9:44 AM in response to Christopher Murphy

    HI Christopher,

     

    I have MacOSX Lion and Windows 7 Boot Camp on my MacBook. Recently, i created a partition of the Disk of FAT32 using DiskUtiltiy App from the MACINTOSH HD. After this i no more abl to see the Windows Option in the Boot Menu. Then i DELETED that partition from Disk Utility. Still i could not see my BOOTCAMP. Again recreated that partition with HFS. Then i tried gdisk and done some changes. Now it shows windows Option. But when i click it says "Missing Operating System"

     

    How can i recover this back. Please help.

    Please see the results of basic commands

     

    diskutil list

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *120.0 GB   disk0

       1:      EFI                                                    209.7 MB   disk0s1

       2:      Apple_HFS Macintosh HD                   57.0 GB    disk0s2

       3:      Apple_Boot Recovery HD                    650.0 MB   disk0s3

       4:      Microsoft Basic Data                           37.2 GB    disk0s4

       5:      Apple_HFS Untitled 3                          23.6 GB    disk0s5

     

    Here the report got from refit

     

     

     

    *** Report for internal hard disk ***

     

     

    Current GPT partition table:

    #      Start LBA      End LBA  Type

    1             40       409639  EFI System (FAT)

    2         409640    111765471  Mac OS X HFS+

    3      111765472    113035007  Mac OS X Boot

    4      115437568    188041215  Basic Data

    5      188041216    234179463  Mac OS X HFS+

     

     

    Current MBR partition table:

    # A    Start LBA      End LBA  Type

    1              1    115437567  ee  EFI Protective

    2 *    115437568    188041215  07  NTFS/HPFS

     

     

    MBR contents:

    Boot Code: Unknown, but bootable

     

     

    Partition at LBA 40:

    Boot Code: None (Non-system disk message)

    File System: FAT32

    Listed in GPT as partition 1, type EFI System (FAT)

     

     

    Partition at LBA 409640:

    Boot Code: None

    File System: HFS Extended (HFS+)

    Listed in GPT as partition 2, type Mac OS X HFS+

     

     

    Partition at LBA 111765472:

    Boot Code: None

    File System: HFS Extended (HFS+)

    Listed in GPT as partition 3, type Mac OS X Boot

     

     

    Partition at LBA 115437568:

    Boot Code: None

    File System: Unknown

    Listed in GPT as partition 4, type Basic Data

    Listed in MBR as partition 2, type 07  NTFS/HPFS, active

     

     

    Partition at LBA 188041216:

    Boot Code: None

    File System: HFS Extended (HFS+)

    Listed in GPT as partition 5, type Mac OS X HFS+

  • by Loner T,

    Loner T Loner T Mar 13, 2014 9:55 AM in response to Nirmal.Web
    Level 7 (24,862 points)
    Safari
    Mar 13, 2014 9:55 AM in response to Nirmal.Web

    Nirmal.Web wrote:

     

    Then i tried gdisk and done some changes. Now it shows windows Option. But when i click it says "Missing Operating System"

    Can you post the output of sudo fdisk /dev/disk0 (use rdisk0, if necessary)?

     

    The Missing OS may require a Windows repair including bootrec.exe. A fifth partition on a Bootcamp disk causes problems, as does resizing/adding/deleting partitions on such a disk.

  • by Davi_A,

    Davi_A Davi_A Mar 14, 2014 2:18 AM in response to Christopher Murphy
    Level 1 (0 points)
    Mar 14, 2014 2:18 AM in response to Christopher Murphy

    Sir you are a king among men.

    I have been trying to resolve this for the last 3 days and then came across this thread and voila, 10 minutes and fixed.

     

    Thanks Again

  • by scfw0x0f,

    scfw0x0f scfw0x0f Mar 18, 2014 11:16 PM in response to Scotch_Brawth
    Level 1 (0 points)
    Mar 18, 2014 11:16 PM in response to Scotch_Brawth

    So I think the instructions by Christopher Murphy worked for me. Here's what I did:

     

    New MBP 13" (MBP11,1, 10.9.2)

     

    1: Used BCA to partition and load Windows 7 x64 onto a 120GB Bootcamp partition

    2: Used Drive Utility to partition remaining ~380GB into two Mac OS partitions, 225GB and 155GB.

    3: Used gdisk with Mr. Murphy's instructions to set the bootable flag on the Bootcamp partition

    4: Installed Mavericks on second Mac OS partition using recovery partition. Long download followed. THis created a second recovery partition and made the Bootcamp partition #6

    5: Used a modified version of Mr. Murphy's instructions, substituting '6' for the partition number in step 3 to add partiton 6 to the MBR

    6: reboot

     

    So far so good. There are now 5 bootable partitions in the option-reboot window: the two Mavericks partitions, the two recovery partitions, and the Bootcamp partition.

     

    Any reason this shouldn't keep working, as long as I don't use Disk Utility to change partitions?

     

    Thanks again to Mr. Murphy!

  • by Number88,

    Number88 Number88 Mar 19, 2014 12:22 AM in response to scfw0x0f
    Level 3 (750 points)
    Mar 19, 2014 12:22 AM in response to scfw0x0f

    Any OSX upgrade is likely to dislike what it finds in the MBR and over-write it.

  • by scfw0x0f,

    scfw0x0f scfw0x0f Mar 19, 2014 7:08 AM in response to Number88
    Level 1 (0 points)
    Mar 19, 2014 7:08 AM in response to Number88

    Number88 wrote:

     

    Any OSX upgrade is likely to dislike what it finds in the MBR and over-write it.

    Interesting. I suppose as long as gdisk can do its mojo, that's survivable. And everything in the Windows partition is optional.

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Mar 19, 2014 9:42 AM in response to scfw0x0f
    Level 3 (555 points)
    Mar 19, 2014 9:42 AM in response to scfw0x0f

    A normal OS X + Windows install has a total of four partitions. If you use Disk Utility to repair the whole drive (not merely a volume), it will replace the hybrid MBR with a protective one, with your 6 partition configuration, and you won't be able to boot Windows until you recreate the non-standard hybrid MBR. So it's not just a future OS upgrade that could break things. I suggest vigilant backups.

  • by scfw0x0f,

    scfw0x0f scfw0x0f Mar 19, 2014 9:50 AM in response to Christopher Murphy
    Level 1 (0 points)
    Mar 19, 2014 9:50 AM in response to Christopher Murphy

    Christopher Murphy wrote:

     

    A normal OS X + Windows install has a total of four partitions. If you use Disk Utility to repair the whole drive (not merely a volume), it will replace the hybrid MBR with a protective one, with your 6 partition configuration, and you won't be able to boot Windows until you recreate the non-standard hybrid MBR. So it's not just a future OS upgrade that could break things. I suggest vigilant backups.

    Thanks! On the surface it looks like this is no more (or less) dangerous than having Bootcamp on partition 5 and using gdisk to make the non-standard HMBR. Am I missing a subtle distinction there?

  • by Number88,

    Number88 Number88 Mar 19, 2014 12:36 PM in response to scfw0x0f
    Level 3 (750 points)
    Mar 19, 2014 12:36 PM in response to scfw0x0f

    The MBR can only hold 4 partitions so having 6 is just as non-standard as having 5.

    Bootcamp is "normally" on partition 4.

first Previous Page 82 of 102 last Next