BrianRandell

Q: Bootcamp won't load after adding partition to Lion

How things started

13" MacBook Air mid-2011

Mac OS X Lion 10.7.5 (11G63b) with 256gb SSD

HDD partition between OS/X and a BOOTCAMP partition running Windows 7 SP1 x64 Ultimate

I updated both OSes with the latest drivers.

In Lion, I did (disabled now) have v.9.5.2 of Paragon's NTFS driver installed (which I forgot about before I started down the path I'm on).

 

What I did:

After doing a time machine backup of Lion, Disk Utility was reporting very little free space on OS/X. I ended up having to run Repair from the Recovery Partition. Once I did that OS/X and Windows were both booting fine and I had > 180 GB of free space on my OS/X partition.

 

I created a 48 GB partition as follows:

 

MBA-Partitions.jpeg

 

I then formatted it last night, etc. Today upon restarting I can't boot into Windows on Boot Camp.


First it didn't show up on the Start Up selector when holding down the Option key. I then started looking. I set Boot Camp as start up in the Paragon applet and this allowed it to boot into Boot Camp but then I get the ...

 

No bootable device --- insert boot disk and press any key

 

... error.

 

So I found the magic thread with Christopher Murphy's advice so I'm looking for help.

 

Here's the results of running the commands from Lion that he has asked other to do:

 

sudo gpt -r -vv show disk0

 

gpt show: disk0: mediasize=251000193024; sectorsize=512; blocks=490234752

gpt show: disk0: PMBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 490234751

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

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

  325511992   92868000      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

  418379992    1269544      5  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

  419649536   70584320      6  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

  490233856        863       

  490234719         32         Sec GPT table

  490234751          1         Sec GPT header

 

sudo fdisk /dev/disk0

 

Disk: /dev/disk0          geometry: 30515/255/63 [490234752 sectors]

Signature: 0xAA55

         Starting       Ending

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

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

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

 

Thank you for any help you may be able to provide!


Cheers,


Brian

MacBook Air, Mac OS X (10.7.5)

Posted on Aug 1, 2013 12:49 PM

Close

Q: Bootcamp won't load after adding partition to Lion

  • All replies
  • Helpful answers

  • by Christopher Murphy,Helpful

    Christopher Murphy Christopher Murphy Aug 1, 2013 1:36 PM in response to BrianRandell
    Level 3 (555 points)
    Aug 1, 2013 1:36 PM in response to BrianRandell

    Understand that MBRs only hold 4 primary partition entries, the Windows bootloader (on BIOS hardware) only supports booting from a primary partition. Because you have six partitions, there isn't a single "correct" way to create a hybrid MBR. Any hybrid MBR for your scenario will not match up with the partitions in the GPT, meaning there's risk for data loss at any time, and while I don't have direct evidence (yet) I suspect the OS X installer does a 'diskutil repairDisk' which likely would alter one or both partition maps. Ergo, your layout is unsupported, so if you're going to continue to use it, you need to learn something how to maintain it when things like this happen.

     

    So what you need to do is download and install GPT fdisk (gdisk) from sourceforge, and create a new hybrid MBR. What I would do is ONLY add GPT partition 6 to the hybrid MBR as entry #2, and mark it bootable and add no additional entries to the MBR. As a result, gdisk will create an MBR with two entries: one 0xEE entry for the sectors comprising the GPT, EFI System, and the next four OS X related partitions. And one 0x07 entry for Windows, also marked bootable. It should be that most utilities are aware of the meaning of 0xEE and will not modify it.

  • by BrianRandell,

    BrianRandell BrianRandell Aug 1, 2013 2:34 PM in response to Christopher Murphy
    Level 1 (0 points)
    Aug 1, 2013 2:34 PM in response to Christopher Murphy

    Hello Christopher,


    Thank you for the reply. I *tried* to do what you said. In doing so Windows booted. :-)

     

    However, I somehow didn't do it right and destroyed everything else--when holding down the Option key only Windows showed up. :-(

     

    The good news is I was able to boot off my TIme Machine backup drive, run Disk Util and repair things which put me back to where I started.


    For now, I think I'm just going to leave well enough alone until I go back to a single OS/X partition. I've got everything I need off of Windows.


    I appreciate your time and answer.

     

     

    Cheers,

     

    Brian

  • by RH ADAM,Solvedanswer

    RH ADAM RH ADAM Aug 1, 2013 2:51 PM in response to BrianRandell
    Level 1 (10 points)
    Aug 1, 2013 2:51 PM in response to BrianRandell

    Here you go,

     

    as Christopher said,

     

    1 - Download gdisk, a.k.a. GPT fdisk .

    2 - Go to Terminal and enter : sudo gdisk /dev/disk0

     

    If you got any error don't proceed further and report the error messages


    3 - Proceed as follow;

     

    r <enter>        go to the recovery & transformation menu

    h <enter>        create a new hybrid MBR

    6 <enter>        add partion 6 to the MBR

    y <enter>        Place EFI GPT (0xEE) partition first in MBR (good

                     for GRUB)?

    <enter>          accept the default MBR hex code of 07

    y <enter>        set the bootable flag

    n <enter>        do not protect more partitions

    w <enter>        write partition table to disk


    If everything went well you should see : Disk synchronization succeeded


    4- reboot your mac : sudo reboot

     

    This should fix it

    Good luck

  • by BrianRandell,

    BrianRandell BrianRandell Aug 1, 2013 5:23 PM in response to RH ADAM
    Level 1 (0 points)
    Aug 1, 2013 5:23 PM in response to RH ADAM

    RH ADAM and Christopher:

     

    Here was the critical line I messed up:

     

    y <enter>        Place EFI GPT (0xEE) partition first in MBR (good for GRUB)?

     

    Once I re-did things all is good (Windows did want to run a CHKDSK) but now all is happy.

     

    I truely appreciate your help! Thank you!

     

    Brian