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 81 of 102 last Next
  • by jamie.shaw,

    jamie.shaw jamie.shaw Mar 4, 2014 11:35 PM in response to Loner T
    Level 1 (14 points)
    Mac OS X
    Mar 4, 2014 11:35 PM in response to Loner T

    Hi again,

     

    I've installed gdisk and created a new Hybrid MBR using the resources found on the author's website, and using the brief tutorial that solved the original poster of this thread.  The following is now output from "fdisk /dev/disk0":

     

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

    Signature: 0xAA55

             Starting       Ending

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

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

    1: EE    0   0   2 -   25 127  14 [         1 -     409639] <Unknown ID>

    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

     

    This now appears to match yours (I installed Windows 8 via Boot Camp Assistant also).

     

    However, this still no longer lists Windows as a bootable volume through OS X's bootloader.  Checking the other outputs I previously posted, the only difference is now that the first partition in the GPT is no longer protected and instead listed as "MBR" instead of "MBR".

     

    I'm curious now, having corrected the MBR (or seemingly done so), I wonder if my Windows 8 installation was done through EFI?  From what I've read, BCA still would use the legacy alternative?

     

    Any ideas?  And thanks for all the help so far – really appreciate it

  • by jamie.shaw,

    jamie.shaw jamie.shaw Mar 4, 2014 11:59 PM in response to jamie.shaw
    Level 1 (14 points)
    Mac OS X
    Mar 4, 2014 11:59 PM in response to jamie.shaw

    For reference, here's my new "sudo gpt -r -vv show disk0":

     

    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

     

    I'm curious about the partitions before and after the 4th (bootcamp) partition.  People seem to have one nearing 200,000 before the bootcamp partition and a much smaller value after it.  Could this be an indiciation something is incorrect?

  • by Loner T,

    Loner T Loner T Mar 5, 2014 5:31 AM in response to jamie.shaw
    Level 7 (24,869 points)
    Safari
    Mar 5, 2014 5:31 AM in response to jamie.shaw

    BCA still uses Legacy Mode. I have checked another 13-in MBP (older though than the rMBP you have) and it shows legacy installation.

     

    MBP13-W8.1-Legacy.png

     

    Do you have an option to select Bootcamp in System Preferences? If you do, and try to bring up W8, does it hang?

  • by Number88,

    Number88 Number88 Mar 5, 2014 8:18 AM in response to jamie.shaw
    Level 3 (750 points)
    Mar 5, 2014 8:18 AM in response to jamie.shaw

    jamie.shaw I too am curious as to which mode was used to install Windows. As you didn't install it yourself (iirc) it leaves us wondering. I know that some later rMBP's can use EFI.

     

    If you mount the EFI partition you can then view what's in it in a Finder window. PLEASE NOTE that once mounted you shouldn't change anything at all!

     

    In a terminal do

    diskutil list

     

    you should see an output like this

     

    /dev/disk0

    #: TYPE                     NAME          SIZE       IDENTIFIER

    0: GUID_partition_scheme                  *251.0 GB  disk0

    1: EFI                                    209.7 MB   disk0s1

    2: Apple_HFS                Macintosh HD  250.1 GB   disk0s2

    3: Apple_Boot               Recovery HD   650.0 MB   disk0s3

     

    Check the diskXsY number of your EFI partition (209.7 MB)

    It's probably as above, if it is do

     

    mkdir /Volumes/efi

     

    then do

     

    sudo mount -t msdos /dev/disk0s1 /Volumes/efi

     

    Now open a Finder window and at the bottom of the left pane you'll see EFI

    click on that and you'll see its contents in the right pane.

     

    There should be one folder (EFI, or maybe APPLE)

    double-click that folder to open.

    What folders are inside that folder?

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Mar 5, 2014 8:27 AM in response to jamie.shaw
    Level 3 (555 points)
    Mar 5, 2014 8:27 AM in response to jamie.shaw

    the first partition in the GPT is no longer protected

     

    I'm not sure why you think this. The first partition in the MBR is type 0xEE which is "GPT Protective" and it starts at sector1 (the GPT header) and goes all the way to the end of the EFI System partition, which is how it should be.

     

    I'm curious about the partitions before and after the 4th (bootcamp) partition.

     

    The 632 sectors of free space is less than 1MB and is just favoring alignment to 1MB boundaries, which is fine. However, the following  716931 unallocated sectors is 350MB of space which I'd say is unexpected but doesn't definitively mean it's a problem. I'd go back to all of your earliest fdisk and gpt outputs and see if the start/size value is still correct or if something has changed.

     

    Every Mac I've tested so far (not that many but more than a few), have a firmware that expects three things to be true in order to show a Windows icon in the option-key+bootchime startup manager; legacy bootstrap code in the first 440 bytes of the first sector (the whole first sector is called the MBR which includes a partition map and this code); the MBR contains more than the single GPT protective partition entry,i.e. it is a hybrid MBR; an MBR entry other than the GPT protective entry is flagged as bootable. The firmware doesn't check anything else. You clearly have two of those requirements, so it sounds like the bootstrap code is not present or corrupt. I forget if bootrec.exe /FixBoot or /FixMbr fixes that, but it doesn't hurt to do both.

     

    As for EFI install, you can do this:

    mkdir /Volumes/EFI

    sudo mount -t msdos /dev/disk0s1 /Volumes/EFI

    ls -l /Volumes/EFI/EFI/

     

    That will mount the EFI System partition, and list the contents of its EFI folder. If you have a legacy BIOS install of Windows, then the only result is a directory called APPLE. If there's one for MICROSOFT then you have an EFI install of Windows 8.

  • by Loner T,

    Loner T Loner T Mar 5, 2014 9:00 AM in response to Christopher Murphy
    Level 7 (24,869 points)
    Safari
    Mar 5, 2014 9:00 AM in response to Christopher Murphy

    Christopher Murphy wrote:

     

    As for EFI install, you can do this:

    mkdir /Volumes/EFI

    sudo mount -t msdos /dev/disk0s1 /Volumes/EFI

    ls -l /Volumes/EFI/EFI/

     

    That will mount the EFI System partition, and list the contents of its EFI folder. If you have a legacy BIOS install of Windows, then the only result is a directory called APPLE. If there's one for MICROSOFT then you have an EFI install of Windows 8.

    Number88 and Christopher... Good to know this. Thanks.

     

    Noted for future reference.

  • by jamie.shaw,

    jamie.shaw jamie.shaw Mar 5, 2014 11:41 AM in response to Christopher Murphy
    Level 1 (14 points)
    Mac OS X
    Mar 5, 2014 11:41 AM in response to Christopher Murphy

    Do you have an option to select Bootcamp in System Preferences? If you do, and try to bring up W8, does it hang?

     

    Hi Loner T, I do have the option, but unfortunately, yes, restarting through the Startup Disk pref pane does cause it to hang on boot.

     

    the first partition in the GPT is no longer protected

     

    I'm not sure why you think this. The first partition in the MBR is type 0xEE which is "GPT Protective" and it starts at sector1 (the GPT header) and goes all the way to the end of the EFI System partition, which is how it should be.

     

    This is simply because in my previous GPT output (before I created the Hybrid MBR manually), it stated "PMBR" and this time it has dropped the 'P' and shows "MBR" – all this terminal-based disk manipulation is new to me so I'm just spitballing ideas.

     

    I'm curious about the partitions before and after the 4th (bootcamp) partition.

     

    The 632 sectors of free space is less than 1MB and is just favoring alignment to 1MB boundaries, which is fine. However, the following  716931 unallocated sectors is 350MB of space which I'd say is unexpected but doesn't definitively mean it's a problem. I'd go back to all of your earliest fdisk and gpt outputs and see if the start/size value is still correct or if something has changed.

     

    The oldest I've got is the first fdisk I did yesterday, before I manipulated the MBR.  The value is the same.  As far as I'm aware, I've made no amends to the GPT (or at least conciously) – just the MBR so far.

     

    Every Mac I've tested so far (not that many but more than a few), have a firmware that expects three things to be true in order to show a Windows icon in the option-key+bootchime startup manager; legacy bootstrap code in the first 440 bytes of the first sector (the whole first sector is called the MBR which includes a partition map and this code); the MBR contains more than the single GPT protective partition entry,i.e. it is a hybrid MBR; an MBR entry other than the GPT protective entry is flagged as bootable. The firmware doesn't check anything else. You clearly have two of those requirements, so it sounds like the bootstrap code is not present or corrupt. I forget if bootrec.exe /FixBoot or /FixMbr fixes that, but it doesn't hurt to do both.

     

    I'll make a Windows 8 install disk, and give this a go.  I'll post my findings as soon as I can.

     

    As for EFI install, you can do this:

    mkdir /Volumes/EFI

    sudo mount -t msdos /dev/disk0s1 /Volumes/EFI

    ls -l /Volumes/EFI/EFI/

     

    That will mount the EFI System partition, and list the contents of its EFI folder. If you have a legacy BIOS install of Windows, then the only result is a directory called APPLE. If there's one for MICROSOFT then you have an EFI install of Windows 8.

     

    Ran this – just the Apple directory.  Definitely a legacy BIOS install.

    Hopefully, the /FixMbr or /FixBoot might resolve the issue *fingers crossed*

     

    Thanks again for all the help so far – really appreciate it.  It's good to know the internet still has genuinely helpful people that don't quickly retort with sarcastic remarks

  • by hkpanda,

    hkpanda hkpanda Mar 6, 2014 12:19 PM in response to Christopher Murphy
    Level 1 (0 points)
    Mar 6, 2014 12:19 PM in response to Christopher Murphy

    I followed these instructions (gdisk, as stated in the accepted answer) to the letter and everything went as stated here. However, I still don't see Windows as an option in the bootloader. What am I missing?

  • by jamie.shaw,

    jamie.shaw jamie.shaw Mar 6, 2014 12:15 PM in response to Christopher Murphy
    Level 1 (14 points)
    Mac OS X
    Mar 6, 2014 12:15 PM in response to Christopher Murphy

    You clearly have two of those requirements, so it sounds like the bootstrap code is not present or corrupt. I forget if bootrec.exe /FixBoot or /FixMbr fixes that, but it doesn't hurt to do both.

     

    Bingo.  This did the trick - it's taken me a while to find a big enough USB drive.  I'm living in a house of 2GB thumb drives!

     

    Truth me told, on first boot into windows, it said the Boot Configuration was incorrect, but Windows 8's "Automatic Repair" feature fixed this.

     

    Thanks Chris - really, really appreciate it!

  • by Nuvect,

    Nuvect Nuvect Mar 6, 2014 12:22 PM in response to Nuvect
    Level 1 (0 points)
    Mar 6, 2014 12:22 PM in response to Nuvect

    Just FYI:

     

    I finally caved and installed Win 8 to a brand new Bootcamp partition.

     

    I currently know of no way to copy a legacy MBR volume over from another Mac to the new 2013MacPro6.1.

  • by Loner T,

    Loner T Loner T Mar 6, 2014 12:26 PM in response to hkpanda
    Level 7 (24,869 points)
    Safari
    Mar 6, 2014 12:26 PM in response to hkpanda

    Please post a new thread with output from

     

    diskutil list

     

    sudo fdisk /dev/disk<n> (<n> is your Bootcamp disk, which is shown by the diskutil command).

     

    sudo gpt -r -vv show disk<n> (try rdisk<n> if disk<n> does not work).

     

    and post a reference to that thread here.

     

    When you try to boot windows, do you see a blinking cursor in the top left corner?

  • by hkpanda,

    hkpanda hkpanda Mar 6, 2014 12:34 PM in response to Loner T
    Level 1 (0 points)
    Mar 6, 2014 12:34 PM in response to Loner T
  • by jamie.shaw,

    jamie.shaw jamie.shaw Mar 6, 2014 12:56 PM in response to Loner T
    Level 1 (14 points)
    Mac OS X
    Mar 6, 2014 12:56 PM in response to Loner T

    Loner T wrote:

     

    Christopher Murphy wrote:

     

    As for EFI install, you can do this:

    mkdir /Volumes/EFI

    sudo mount -t msdos /dev/disk0s1 /Volumes/EFI

    ls -l /Volumes/EFI/EFI/

     

    That will mount the EFI System partition, and list the contents of its EFI folder. If you have a legacy BIOS install of Windows, then the only result is a directory called APPLE. If there's one for MICROSOFT then you have an EFI install of Windows 8.

    Number88 and Christopher... Good to know this. Thanks.

     

    Noted for future reference.

     

    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?

  • by Loner T,

    Loner T Loner T Mar 6, 2014 1:00 PM in response to jamie.shaw
    Level 7 (24,869 points)
    Safari
    Mar 6, 2014 1:00 PM in response to jamie.shaw

    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

  • by jamie.shaw,

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

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

first Previous Page 81 of 102 last Next