You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Boot Camp repair via Hybrid MBR fix after 5+ partitions

With the understanding that Boot Camp only formally supports a Windows boot upon creation from a single Mac OSX data partition, I'm trying to determine if a fix exists for the following boot setup. The end result I'm pursing is a triple boot mac setup with Mavericks, Win7, and Ubuntu. This applies to the bootcamp subject because it is not possible to install Windows 7 without Bootcamp due to USB3 drivers at install on this model [2014 Macbook Pro]. Thus making the Win7 Boot Camp task a required first step. The partition edits after this to make room Linux end up messing with the hybrid MBR boot setup that Boot Camp created - resulting in no available Windows boot option. A bit of research tells me that this Boot Camp partition can be repaired with some manual hybrid MBR work as long as a total of 4 partitions are present.

My question is can an alternate (or new) hybrid MBR approach support a fix for an already existing Boot Camp partitions while 5+ partitions exist on the same disk? If at all possible, what are the risks involved?


Current State:

As of now, I have the bootcamp hybrid MBR set up properly with Win 7 working -- though knowing any partition edit will mess this up. Using rEFInd boot manager already, and plan to incorporate that for the final setup. Would be hesitant to drop the Apple Recovery Partition if at all possible.

$ diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *251.0 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 210.1 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data BOOTCAMP 40.0 GB disk0s4

The additional that will put me past the supported 4:

5. Ubuntu 14.04

6. Ubuntu SWAP [may be able to avoid this with swap file instead]

7. Shared FAT32 space ~4GB [can also toss this if it puts me one partition over from a resolution]


Thanks in advance, appreciate any input.

MacBook Pro (Retina, 13-inch, Mid 2014)

Posted on Aug 28, 2014 11:43 PM

Reply
13 replies

Aug 29, 2014 6:50 AM in response to pzerou

Can you post your current MBR?


You could put all your GPT OSes on the disk first, create a Hybrid MBR which hides the entire GPT parts into a single MBR entry and then install Bootcamp.


The other direction is also possible, but a bit more cumbersome.


The risk is that any OS update or Disk Utility work can create problems and loss of data.

Aug 29, 2014 9:30 AM in response to Loner T

sudo gpt -r -vv show disk0

gpt show: disk0: mediasize=251000193024; sectorsize=512; blocks=490234752
gpt show: disk0: Suspicious MBR 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         MBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6       
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  410430536      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  410840176    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  412109712       1136       
  412110848   78123008      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  490233856        863       
  490234719         32         Sec GPT table
  490234751          1         Sec GPT header


Is this the MBR readout you're looking for? Have this fdisk one as well:


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 -     409639] <Unknown ID>
2: AF 1023 254  63 - 1023 254  63 [    409640 -  410430536] HFS+      
3: AB 1023 254  63 - 1023 254  63 [ 410840176 -    1269536] Darwin Boot
*4: 07 1023 254  63 - 1023 254  63 [ 412110848 -   78123008] HPFS/QNX/AUX


Edit: Having trouble pasting/quoting plaintext

Aug 29, 2014 9:58 AM in response to pzerou

The current configuration looks like a standard Bootcamp and OS X installation. If you change the MBR to have partition 1 contain start=1,size=412110847 (ESP/EFI,OS X,Recovery HD), and partition 2 is start=412110848,size=78123008, you have room for 2 more partitions in MBR, but no free space left to create them. If you create a new partition via DU, you will end up recreating the Hybrid MBR again to fix windows.


Do you have plans to upgrade to W8.1? It has better EFI support on the 2013-2014 MBPs. If yes, you can do everything via GPT/EFI and not need a MBR at all.


The other option is to remove windows, get the OS X/Ubuntu dual boot to work via GPT/EFI. Create a new Hybrid MBR for Windows using 40GB, and then re-install Windows via Bootcamp. W7 EFI has driver issues as you have already noted.

Aug 30, 2014 12:06 PM in response to Loner T

Loner T wrote:

The current configuration looks like a standard Bootcamp and OS X installation. If you change the MBR to have partition 1 contain start=1,size=412110847 (ESP/EFI,OS X,Recovery HD), and partition 2 is start=412110848,size=78123008, you have room for 2 more partitions in MBR, but no free space left to create them. If you create a new partition via DU, you will end up recreating the Hybrid MBR again to fix windows.

Yes. It's just bootcamp and OSX for now. Looking to better plan this for a lower-risk setup before making changes. I can start over via DU if best -- have no important data on either OSX or Win7. The only concern is that Win7 seems to need the traditional Bootcamp install as the first step to get it installed at all.


Loner T wrote:

Do you have plans to upgrade to W8.1? It has better EFI support on the 2013-2014 MBPs. If yes, you can do everything via GPT/EFI and not need a MBR at all.

Did not have plans to use Win8, but if Win7 is documented as a nightmare setup for this triple boot, then I could put an extra effort into changing.


Loner T wrote:

The other option is to remove windows, get the OS X/Ubuntu dual boot to work via GPT/EFI. Create a new Hybrid MBR for Windows using 40GB, and then re-install Windows via Bootcamp. W7 EFI has driver issues as you have already noted.

Is the Boot Camp Assistant going to allow this approach with the Ubuntu already taking partition space on the main disk? The process is blocked if there is anything but a single Mac OS (Journaled) partition in Disk Utility. Forgive me if the setup as you've described it allows Boot Camp to not see / ignore the existing Ubuntu partition.

Aug 30, 2014 12:12 PM in response to pzerou

Would there not be a way to:

1. Keep the Bootcamp partition as-is

2. Create new partitions from Mac OS X space for:

A. Linux

B. Linux SWAP

C. Shared FAT32 space

3. Install Linux to those partitions (A+B)

4. **Then recover the boot process for Windows/Linux after-the-fact? Only to be found by a third-part boot manager, not necessarily Bootcamp. If that means altering the Hybrid MBR/GPT setup manually.

Aug 30, 2014 12:35 PM in response to pzerou

The process is blocked if there is anything but a single Mac OS (Journaled) partition in Disk Utility. Forgive me if the setup as you've described it allows Boot Camp to not see / ignore the existing Ubuntu partition.

Bootcamp Assistant expects a single partition disk to start with (or a second separate disk) and a specific layout of (EFI/ESP,OSX,Recovery HD) and will not function otherwise. If you can create a USB with the ISO and BC drivers, keep it aside, partition with DU as you like and designate the 4th MBR as Windows (with the GPT #x mapping to MBR #4, what is in MBR #1,2, and 3 is not relevant) and you can install Windows from the USB to MBR#4. You will lose HFS readability with a manual Hybrid MBR.


2. Create new partitions from Mac OS X space for:

This step in DU creates problems for Windows, which requires rebuilding the MBR and a Startup Recovery. It is certainly possible to do it this way as well. The other issue is how DU relocates partitions when manipulating existing partitions. In quite a few cases, Recovery HD is moved by DU without the user being aware of it at all, which can cause lost partitions on the NTFS side.


You can use rEFInd, which I think is a good tool to have in your arsenal.


If you have a second Optibay or disk, this process becomes a lot easier.


You can also look at Bootcamp - Create new partition and format in Windows 7 for the discussion related to 2C.

Aug 30, 2014 3:44 PM in response to Loner T

Loner T wrote:

2. Create new partitions from Mac OS X space for:

This step in DU creates problems for Windows, which requires rebuilding the MBR and a Startup Recovery. It is certainly possible to do it this way as well. The other issue is how DU relocates partitions when manipulating existing partitions. In quite a few cases, Recovery HD is moved by DU without the user being aware of it at all, which can cause lost partitions on the NTFS side.

If I pursue this route, would the instructions to manually recover/rebuild the MBR partitions be close to this guide?: Repairing Boot Camp after creating new partition.

Where would the process differ with their being 5+ partitions?

Loner T wrote:


You can use rEFInd, which I think is a good tool to have in your arsenal.


If you have a second Optibay or disk, this process becomes a lot easier.

Absolutely plan to use rEFInd. I do have an external HDD, but are you referring to the process being easier if that is a permanent solution -- or just as an intermediary during the install process?

Aug 30, 2014 4:26 PM in response to pzerou

Yes, that should work, but the article assumes GPT #2 (HFS+), GPT #3 (Recovery HD) and GPT #4 (Windows). Your case is different, so you will need to make appropriate changes.


I was suggesting a second permanent HDD in your Mac, if possible (assuming you do not want this setup on a MacPro 1st Gen, which already has multi-drive support).


You can also install Ubuntu on an external drive, which unlike Windows, has no qualms using an external drive. Windows will sell you Windows-to-Go if you want. 😉

Aug 31, 2014 1:25 PM in response to Loner T

The resulting layout that can work that's also the safest is this:


1 EFI System Partition

2 OS X

3 OS X Recovery

4 Ubuntu root (includes /boot by default I think)

5 Ubuntu swap

6 FAT32

7 Windows


Issues:

- It's important that the "shared" volume and Windows are last, because those are the only partitions you'll add to the hybrid MBR. All of the other GPT partitions will be "stuffed" into a single 0xEE protective partition in the MBR.


- FAT32 isn't a great choice for shared if you will ever have a need for files larger than 4GB, which are truncated often without warning. I recommend NTFS and getting NTFS read-write support on OS X either either of the paid options availalbe, or going to macports and building ntfs-3g yourself.


- OS X's disk utility set to repair a whole drive (rather than a particular partition) will break this hybrid MBR and replace it with a protective one. Any Disk Utility or diskutil resize operation will do the same thing. Apple uses diskutil repairdisk whenever doing major OS version upgrades. So you'll have to be familiar with gdisk and how to fix these issues. The setup is inherently fragile, so no crying about data loss. This will be in the category of user induced data loss. I've personally encountered data loss dozens of times learning about all of this stuff and it's happened when least expected. So you have to have backups. Seriously a VM is a lot less risky and much less hassle.

Sep 1, 2014 8:36 PM in response to Christopher Murphy

Christopher Murphy wrote:


- OS X's disk utility set to repair a whole drive (rather than a particular partition) will break this hybrid MBR and replace it with a protective one. Any Disk Utility or diskutil resize operation will do the same thing. Apple uses diskutil repairdisk whenever doing major OS version upgrades. So you'll have to be familiar with gdisk and how to fix these issues. The setup is inherently fragile, so no crying about data loss. This will be in the category of user induced data loss. I've personally encountered data loss dozens of times learning about all of this stuff and it's happened when least expected. So you have to have backups. Seriously a VM is a lot less risky and much less hassle.

I appreciate the disclaimer that this would be a fragile setup even if done in the 'safest' approach. I would be using Windows and/or Linux for <0.05% of the time. With this being the case, I'm thinking to go a safer route and take advantage of another 'drive'.


Because this 'tripleboot' sounds like a house-of-cards, even if approached properly, I'm thinking of doing this instead (based on y'alls input):

  • 1. Keep OSX and Win7 Bootcamp setup as-is (stable)
  • 2. Purchase permanent SD card space like the Nifty minidrive
  • 3. Install Ubuntu to the SD card
  • 4. Use rEFInd boot manager to scan both internal SSD and SD card for 3 OS setup


Though the Linux instance is sure to take a hit in performance, I think this will meet my needs better due to the higher risk of manual MBR/GPT/Hybrid partitioning -- only to wait for Apple to send an OS update and bring it crashing down.


**I've since verified 3+4 (Linux on SD) on a traditional SD card adapter and it does appear to work. It is picked up by rEFInd manager, and doesn't conflict with OSX/Win7. Might even try to reformat it to have an additional NTFS partition on the card for shared data.

Sep 2, 2014 5:31 PM in response to Loner T

Loner T wrote:


You may want to look at this thread as well - Tutorial - How to triple boot OSX, Linux and Windows 8.1 with a shared Data Partition without any third party Win / OSX softwares

This thread is the how-to guide I thought might be out there somewhere. A big thanks for pointing me that way! Funny timing that someone had just written that up.


All in all, I might still be sticking to a Linux-from-SDcard setup only because it seems so stable with a 'separation of powers' type approach. Traditional BOOTCAMP can still be used this way as well. The link definitely answers my original concerns though!


Cheers.

Boot Camp repair via Hybrid MBR fix after 5+ partitions

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.