Skip navigation

Repairing Boot Camp after creating new partition

177922 Views 1,254 Replies Latest reply: Apr 18, 2014 12:22 PM by Loner T RSS
  • Marionumber1 Calculating status...

    My expected GPT disk layout is this:

     

    disk0s1: EFI System Partition

    disk0s2: Lion Recovery Partition

    disk0s3: BIOS Boot Partition

    disk0s4: Ubuntu

    disk0s5: Swap

    disk0s6: Mac OS X Lion

    disk0s7: Windows 7

     

    And my expected MBR layout is this:

     

    1. EFI Protective Partition

    2. Mac OS X

    3. Windows 7

     

    If this partition scheme will work, then here's my plan.

     

    1. Install rEFIt on my Mac.

    2. Use gparted to create this partition layout, turning my hybrid MBR into a protective MBR.

    3. Install Ubuntu 12.04 on its GPT partition.

    4. Recreate the hybrid MBR with gdisk and add the Mac and Windows partitions.

  • Marionumber1 Level 1 Level 1 (0 points)

    Also, in addition to the steps I already posted, I'll install GRUB2 on the BIOS Boot Partition.

  • Matthias2054 Calculating status...

    Hi,

     

    I have a similar issue, that since Mountain Lion, I cannot boot from bootcamp anymore, but the data is still there.

     

    The results are:

     

    gpt show: disk0: mediasize=250059350016; sectorsize=512; blocks=488397168

    gpt show: disk0: Suspicious MBR at sector 0

    gpt show: disk0: Pri GPT at sector 1

    gpt show: disk0: Sec GPT at sector 488397167

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

      275966168    1269544      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

      277235712  211161088      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      488396800        335        

      488397135         32         Sec GPT table

      488397167          1         Sec GPT header

     

     

    and:

     

    Disk: /dev/disk0geometry: 30401/255/63 [488397168 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 -  275556528] HFS+       

    3: AB 1023 254  63 - 1023 254  63 [ 275966168 -    1269544] Darwin Boot

    *4: 07 1023 254  63 - 1023 254  63 [ 277235712 -  211161088] HPFS/QNX/AUX

     

     

    Any idea why this doesn't work anymore?

    Can I use Christopher's procedure, just using partition 4 instead of 5?

    r <enter>        go to the recovery & transformation menu

    h <enter>        create a new hybrid MBR

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

     

    You should have two entries. One type EE, one 07, with the 07 entry marked with * under Boot. If you don't, report back. If you do, write out the update partition information, and hope  a power failure doesn't occur for the next few seconds...

     

    Many thanks for your help!!

     

    Matthias

     

    w <enter>     write partition table to disk

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Nov 22, 2012 10:41 AM (in response to Matthias2054)

    Any idea why this doesn't work anymore?

    Can I use Christopher's procedure, just using partition 4 instead of 5?

     

    The GPT and MBR are in sync, so that's not the source of your problem. LIke I said in the other forum you need to run Windows Startup Repair.

  • Marionumber1 Level 1 Level 1 (0 points)

    Finally, just to make sure, is this the command to create my hybrid MBR?

     

    disk0s1: EFI System Partition

    disk0s2: Lion Recovery Partition

    disk0s3: BIOS Boot Partition

    disk0s4: Ubuntu

    disk0s5: Swap

    disk0s6: Mac OS X Lion

    disk0s7: Windows 7

     

    1. EFI Protective Partition

    2. Mac OS X

    3. Windows 7

     

    r <enter>        go to the recovery & transformation menu

    h <enter>        create a new hybrid MBR

    6 7 <enter>        add partions 6 and 7 to the MBR

    <enter>          accept the default MBR hex code of af

    <enter>          accept the default MBR hex code of 7

    y <enter>        set the bootable flag

    n <enter>        do not protect more partitions

    o < enter>       print (display) the MBR

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Nov 22, 2012 12:02 PM (in response to Marionumber1)

    Only set the bootable flag on Windows. Otherwise this looks OK.

  • Marionumber1 Level 1 Level 1 (0 points)

    How do I only set the bootable flag on Windows?

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Nov 22, 2012 12:55 PM (in response to Marionumber1)

    For each partition you add, it will ask you whether it should be flagged as bootable or not.

  • Marionumber1 Level 1 Level 1 (0 points)

    Okay, I'm going to do this soon. Just to make sure, here are all the steps I will follow.

     

    disk0s1: EFI System Partition

    disk0s2: Lion Recovery Partition

    disk0s3: BIOS Boot Partition

    disk0s4: Ubuntu

    disk0s5: Swap

    disk0s6: Mac OS X Lion

    disk0s7: Windows 7

     

    1. EFI Protective Partition

    2. Mac OS X

    3. Windows 7

     

    1. Install rEFIt on my Mac.

    2. Use gparted to create this partition layout, turning my hybrid MBR into a protective MBR.

    3. Install Ubuntu 12.04 on its GPT partition. During the install process, I'll install GRUB2 on the BIOS Boot Partition.

    4. Recreate the hybrid MBR with gdisk and add the Mac and Windows partitions.

     

    r <enter>        go to the recovery & transformation menu

    h <enter>        create a new hybrid MBR

    6 7 <enter>        add partions 6 and 7 to the MBR

    <enter>          accept the default MBR hex code of af

    <enter>          accept the default MBR hex code of 7

    n <enter>        do not set the bootable flag on the Mac partition

    y <enter>        set the bootable flag on the Windows partition

    n <enter>        do not protect more partitions

    o < enter>       print (display) the MBR

     

    After this process, I should have Windows, Mac OS X, and Ubuntu installed. The Mac and Windows partitions will be inside the hybrid MBR, with the Windows partition set as the active partition. GRUB2 will be installed on the BIOS Boot Partition, and it will boot the Ubuntu partition. Ubuntu will use disk0s5 as its swap partition.

     

    Also, all of these operating systems will be displayed in the rEFIt menu, along with the Lion Recovery Partition.

  • Christopher Murphy Level 2 Level 2 (470 points)

    Umm, your steps don't really make sense to me.

     

    a. In Step 1 you're installing rEFIt, but then you're repartitioning on step 2 which will remove it.

    b. rEFIt is no longer maintained, rEFInd is current.

    c. You do not install GRUB2 to any partition, you install it onto a whole disk, the GRUB2 installer will automatically find BIOS Boot.

    d. You have a number of missing steps to get the GPT partition layout as you describe, as the OS X installer will *always* install Recovery HD immediately after the OS X partition.

    e. You're better off with Ubuntu as s5 because it doesn't need to have a fixed size, whereas the Recovery HD, BIOS Boot, and swap partitions are fixed size; but I've already mentioned this.

    f. Your step 4 is conceptually correct, but the individual commands aren't in the correct order. gdisk will ask for each partition (in order) what partition type and the boot flag state.

     

    Also, you kinda have to sort out if Ubuntu is going to be installed UEFI or BIOS, because this matters whether or not you even need BIOS Boot.

  • Marionumber1 Level 1 Level 1 (0 points)

    a. I guess I can install rEFIt after I repartition the disk.

    b. Okay, I'll use rEFInd instead.

    c. Alright, I'll install GRUB2 to the disk.

    d. But I'm not reinstalling Mac OS X. I'm just moving around the partitions.

    e. What do you mean by "fixed size"? I don't remember you mentioning that before.

    f. Okay, I'll just follow along with gdisk.

     

    First of all, does Ubuntu's UEFI installer support the Mac EFI? Second, how would I start the UEFI installer? Third, are there any advantages to installing in UEFI mode instead of BIOS mode?

  • Christopher Murphy Level 2 Level 2 (470 points)

    d. if I see the result from 'gdisk -l /dev/disk0' i'll be able to comment further on this

    e. Recovery HD, swap, BIOS Boot all have specific sizes they should be, whereas the Ubuntu partition can be anything you want so long as it meets the minimum requirement; but it sounds like you intend to create all of these partitions in advance somehow with data on the disk? I don't see how that's going to work unless you have another disk handy to move whole partitions to, then redo the partitioning on the original disk, then restore the volumes from the 2nd disk.

     

    First of all, does Ubuntu's UEFI installer support the Mac EFI?

    I don't know. The only distribution that I know explicitly supports Apple's non-standard EFI implementation is Fedora 17 and newer.

     

    Second, how would I start the UEFI installer?

    I don't know how Ubuntu does it, or if they have a single installer image that does both UEFI and BIOS, which is how it works with Fedora. If the computer boots the installer image in UEFI mode, then the installer will install UEFI bootable system. If the computer boots CSM-BIOS mode, you will have a BIOS bootable system installed.

     

    For Fedora, when option-key booting the install media, you get two options: Fedora (which is the EFI boot option) and Windows (which is the BIOS boot option). Since the hardware support isn't the same, it's possible one will work well and the other won't.

     

    Third, are there any advantages to installing in UEFI mode instead of BIOS mode?

     

    Full ACPI and AHCI support is available when booting UEFI, so you get faster SSD performance (apparently it's not as noticeable with HDD), and you get significantly better battery life.

     

    For all of these complexities it's why I don't natively boot either Windows or Linux on Apple hardware, I only natively boot OS X, and then I use a VM for Windows and Linux.

  • Marionumber1 Level 1 Level 1 (0 points)

    d. I'll get the results of 'gdisk -l /dev/disk0' later, when I boot into Mac OS X.

    e. I was planning to shrink the Mac OS X partition (which I don't use as much) by the required amount for the Recovery HD, BIOS Boot Partition, and swap partition. Then I would create my partitions in the free space.

     

    2. After trying out the Ubuntu 12.04 CD, it looks like holding down the Option key gives you an option to boot Windows or EFI Boot. However, I didn't try it out yet.

    3. Well, since I have an HDD instead of an SSD, the drive performance won't be very noticable. Battery life isn't that much of a concern for me, unless its significantly better than it is in BIOS Mode (by that I mean at least 1 hour better).

  • Christopher Murphy Level 2 Level 2 (470 points)

    e. shrinking HFS+ causes free space to appear after the resized partition, not in front where you need it, so you'll need to relocate OS X and Recovery HD if your'e going to go with this layout; also I can't tell you if the next version of OS X will know what to do this this layout.

     

    2. EFI Boot is the one to choose; the Windows option is hard named for anything that boots with the CSM-BIOS even if it's not Windows.

     

    3. On a MBP 4,1 the difference is double (roughly 2 hours vs 4 hours), I find the CSM-BIOS unusuable on laptops for serious use, and honestly the only purpose for native booting these OS's if for games. The performance is quite good in a VM, and you don't have any of the partition challenges discussed.

  • Marionumber1 Level 1 Level 1 (0 points)

    e. I know that the free space appears after the resized partition, but I'm going to relocate the Mac OS X partition so I can make the BIOS Boot Partition, Ubuntu partition, and swap partition.

     

    2. I know that EFI Boot launches Ubuntu in UEFI mode, I just didn't test it to see if it worked. I will test it tomorrow.

     

    3. I'm using a Macbook Pro 8,2. Is there any significant difference on that system? I do need to use CSM-BIOS to natively boot Windows 7 for gaming, but if Ubuntu's UEFI mode works fine on my Mac, I see no reason why I shouldn't use it. If I install Ubuntu in UEFI mode, will GRUB2 be installed to the EFI System Partition?

     

    You also suggest using a VM. Since I wouldn't be playing any games in Ubuntu, I could look into that option. My computer is pretty powerful (Intel Quad Core i7 and 4 GB of RAM), so I guess a VM would run smoothly. However, I still would want to know how to add the Ubuntu partition, in case I do want to go through with triple booting my Macbook Pro.

1 ... 15 16 17 18 19 ... 85 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (21)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.