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 60 of 102 last Next
  • by Loner T,

    Loner T Loner T Nov 15, 2013 6:09 AM in response to taibanl
    Level 7 (24,202 points)
    Safari
    Nov 15, 2013 6:09 AM in response to taibanl

    Testdisk seems to be guessing. Can you peek into one of the partitions and look at a listing of the files? I am not sure how you have managed to have two partitions end at 468860920 and 468860927? And the third one is at 468862087?

     

    If you are willing to take a risk, what happens if you make partition #4 (in fdisk output) as bootable? (See page 54+ in this thread).

  • by yisaam,

    yisaam yisaam Nov 16, 2013 9:12 AM in response to Scotch_Brawth
    Level 1 (0 points)
    Nov 16, 2013 9:12 AM in response to Scotch_Brawth

    Thank you Christopher Murphy!

  • by joseWWCC,

    joseWWCC joseWWCC Nov 19, 2013 11:35 AM in response to yisaam
    Level 1 (0 points)
    Nov 19, 2013 11:35 AM in response to yisaam

    Hi Christopher and everyone!

     

    I find myself in the same situation as many people here and I'm looking for some friendly advice or guidance.

     

    I have a 10.8 iMac with a single internal hard drive with default partition and a Boot Camp partition.  I did essentially the same thing as the user in Post 1 did and attempted to add a 2nd Mac partition for Mavericks.  So now I have 3 partitions on my desktop (MacHD (580GB), MavericksHD (119GB), and BootCamp (298GB)) but I also have two recovery partitions and the Boot Camp partition is no longer bootable.

     

    localhost:~j$ sudo gpt -r -vv show disk0

    Password:

    gpt show: disk0: mediasize=1000204886016; sectorsize=512; blocks=1953525168

    gpt show: disk0: PMBR at sector 0

    gpt show: disk0: Pri GPT at sector 1

    gpt show: disk0: Sec GPT at sector 1953525167

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

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

      1134314408   231825920      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

      1366140328     1269536      5  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

      1367409864     4084536        

      1371494400   582029312      6  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      1953523712        1423        

      1953525135          32         Sec GPT table

      1953525167           1         Sec GPT header

    localhost:~ j$ sudo fdisk /dev/disk0

    Disk: /dev/disk0          geometry: 121601/255/63 [1953525168 sectors]

    Signature: 0xAA55

             Starting       Ending

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

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

    1: EE 1023 254  63 - 1023 254  63 [         1 - 1953525167] <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     

    localhost:~ j$ sudo gdisk /dev/disk0

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

      BSD: not present

      APM: not present

      GPT: present

    Found valid GPT with protective MBR; using GPT.

     

    Can anyone help on getting the Boot Camp partition to boot and still have the two Mac partitions be bootable as well?

     

    Thanks in advance!

     

    Jose

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Nov 19, 2013 12:19 PM in response to joseWWCC
    Level 3 (555 points)
    Nov 19, 2013 12:19 PM in response to joseWWCC

    As you can see, you don't have three partitions, you have six plus a bunch of free space between partitions 5 and 6. This is an unsupported configuration so technically you're supposed to backup, blow away the drive, and start everything from scratch.

     

    Alternatively, download gdisk (gpt fdisk on sourceforge) and install. You'll need to figure out from this thread exactly how to create a new hybrid MBR, but the gist is that at the same asking you what GPT partitions to add to the MBR, you will only add partition 6 and you'll make that bootable. You'll do everything else the same otherwise, and at the end when it says there's still entries in the MBR available and if you want to protect more partitions, say no. Don't forget to write out the change and reboot.

     

    So this will put GPT partitions 1-5 in the MBR 1st partition, as a protective 0xEE entry. And it will put GPT partition 6, in the MBR 2nd partition entry flagged bootable.

  • by joseWWCC,

    joseWWCC joseWWCC Nov 19, 2013 12:26 PM in response to Christopher Murphy
    Level 1 (0 points)
    Nov 19, 2013 12:26 PM in response to Christopher Murphy

    Hi Christopher,

     

    Thank you so much for the quick reply! 

     

    OK, thanks for the clarification.  As I understand it, I need to do the following in gdisk.  Is this correct?

     

    Thanks again!

     

    r <enter>        go to the recovery & transformation menu

    h <enter>        create a new hybrid MBR

    6 <enter>        add partion 6 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

    w <enter>     write partition table to disk


  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Nov 19, 2013 12:29 PM in response to joseWWCC
    Level 3 (555 points)
    Nov 19, 2013 12:29 PM in response to joseWWCC

    Yet another alternative, before creating the hybrid MBR in gdisk, is to use gdisk to create a new GPT entry for that free space. So from the main menu, type n to create a new partition, and just accept all the defaults for start and end sector values and type code. Then type s to resort the list. Type p to see the new listing and you'll see that your free space is now partition 6, and Windows is now partition 7. Now go to the recovery menu, r, and create the new hybrid MBR, h, but now you'll add partition 7 to the MBR and make it bootable. Write out the changes.

     

    So now Windows will be rebootable. But you can also format, FROM CLI ONLY, partition 6 for what you intended it for. If you use Disk Utility, it will break the hybrid MBR, and you'll have to go back to gdisk to recreate it again. So take you pick, use Disk Utility to format the free space, then create the hybrid MBR. Or you can use newfs_hfs from command line to create a new HFS+ volume.

     

    man new_hfs for details but the gist is

    sudo newfs_hfs -J -n MacHD2 /dev/disk0sX

     

    -J makes it journaled

    -n makes anything after it the volume name, which you can omit and change in the Finder if you want.

    X= the value for the partition number, depending on which instructions you follow or miss, this is either a 6 or 7. If you get it wrong, you'll either get an error or it'll format your Windows partition. To confirm first, use diskutil list and make certain you've chosen the right one. The command will not ask you if you're sure.

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Nov 19, 2013 12:31 PM in response to joseWWCC
    Level 3 (555 points)
    Nov 19, 2013 12:31 PM in response to joseWWCC

    You're missing some steps that the program will prompt you for, but it's basically correct.

  • by joseWWCC,

    joseWWCC joseWWCC Nov 19, 2013 12:34 PM in response to Christopher Murphy
    Level 1 (0 points)
    Nov 19, 2013 12:34 PM in response to Christopher Murphy

    Hi again,

     

    Free space?  Do you mean partitions 3 and 5?  If so, I beleive these are recovery partitions (1 for 10.8 and the other for 10.9).

     

    That said, I think I just want my Windows partition to boot again and I could care less about the free space since I'll be reformatting once I get everything working again (but it's a great suggestion).

  • by joseWWCC,

    joseWWCC joseWWCC Nov 19, 2013 12:43 PM in response to Christopher Murphy
    Level 1 (0 points)
    Nov 19, 2013 12:43 PM in response to Christopher Murphy

    Yep, I'm missing some steps...

     

    There were 2 questions I didn't know the answers to:

     

    QUESTION 1:

    Type from one to three GPT partition numbers, separated by spaces, to be

    added to the hybrid MBR, in sequence:

     

    Should I enter 2 4 6 or just 6?


     

    QUESTION 2:

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


    No idea what to select here...

     

    Thanks again!


  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Nov 19, 2013 12:55 PM in response to joseWWCC
    Level 3 (555 points)
    Nov 19, 2013 12:55 PM in response to joseWWCC

    Free space?  Do you mean partitions 3 and 5?

     

    No I'm referring to space between partitions 5 and 6. This line right after partition 5:

      1367409864     4084536      

     

    That's ~2GB of free space. Not much I guess. In any case you don't care about it so it doesn't matter.

     

    Should I enter 2 4 6 or just 6?

     

    I already answered that from the beginning: "what GPT partitions to add to the MBR, you will only add partition 6 and you'll make that bootable"

     

    No idea what to select here...

     

    Answer is yes. I know it's a 60 page disorganized thread, but this has been answered probably 10x so it's the sort of question that makes me want to abandon the thread.

  • by joseWWCC,

    joseWWCC joseWWCC Nov 19, 2013 6:39 PM in response to Christopher Murphy
    Level 1 (0 points)
    Nov 19, 2013 6:39 PM in response to Christopher Murphy

    That solved the issue...Thanks so much!

     

    Apologies for the question about the EFI GPT.  I regretted that question the second I submitted since I found the answer on page 50. 

     

    Thanks again for your help!

  • by blueknigh7,

    blueknigh7 blueknigh7 Nov 22, 2013 11:02 PM in response to Christopher Murphy
    Level 1 (0 points)
    Nov 22, 2013 11:02 PM in response to Christopher Murphy

    Thanks for this post! 

     

    Mine was a basic setup - just split my main mac-mini drive in half - OSX and Bootcam.  I upgraded for 10.6.8 to 10.9 (who doesn't like a free upgrade?) and was discouraged to see my bootcamp come backup with the error "missing operating system".  However, goggling this thread (starting at page 48) has a ton of information and my guess is that you described exactly what happened in my situation (page 55). 

     

    Luckily, the partition was still valid - I could see it in OSX finder - I just couldn't boot it.   While it looks like I could have used fdisk to just make the partition bootable, I ended up using gdisk and recreating the hybrid MBR per page 52.

     

    Much appreciated to those souls to have gone before so that others may have answers.  Christopher Murphy, tom007, and others!  

     

    Cheers to all - I raise my glass to you.

  • by zvav,

    zvav zvav Nov 26, 2013 6:31 PM in response to Christopher Murphy
    Level 1 (0 points)
    Nov 26, 2013 6:31 PM in response to Christopher Murphy

    Hi Guys,

    I have a similar problem.

    I had a OSX 10.8 and Ubuntu 12.04 64 bit LTS on bootcamp partition of ~ 100GB (out of 256 GB SSD) on MacBook Air 2012.

    I upgraded to OSX 10.9 and suddenly I don't see anymore option to boot with Ubuntu partition (i.e. holding Option key on restart).

     

    Here the gist with output of commands which people run in previous posts here:

     

    https://gist.github.com/nivertech/7173700

     

    How can I restore the Ubuntu partition?

    Thanks in advance!

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Nov 26, 2013 7:31 PM in response to zvav
    Level 3 (555 points)
    Nov 26, 2013 7:31 PM in response to zvav

    Please repost the gpt results with the partition type GUIDs, and also I need to see the results from fdisk.

  • by zvav,

    zvav zvav Nov 26, 2013 7:50 PM in response to Christopher Murphy
    Level 1 (0 points)
    Nov 26, 2013 7:50 PM in response to Christopher Murphy

    Christopher,

     

    I updated (diskutil info output slightly changed, since I installed fuse-ext2):

     

    https://gist.github.com/nivertech/7173700

     

    Thanks!

first Previous Page 60 of 102 last Next