Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nuclearpidgeon

macrumors newbie
Original poster
Jun 25, 2009
3
0
Hi :),

I'm running a 15-inch, Late 2011 MacBook Pro, and currently have Windows 7 x64 and Mac OS X 10.7.4 dual-booted across the 750GB hard drive.

I want to install Ubuntu to make a triple-boot setup, but when looking at the drive map I noticed that I have 4 partitions, and because the disk is has a MBR partition table, I can't make any more.

Here is the report from running rEFIt's "Partition Inspector" on my laptop:
Code:
*** Report for internal hard disk ***

Current GPT partition table:
 No GPT partition table present!

Current MBR partition table:
 # A    Start LBA      End LBA  Type
 1             40       409639  ef  EFI System (FAT)
 2         409640    629557247  af  Mac OS X HFS+
 3      629557248    630827007  ab  Mac OS X Boot
 4 *    630827008   1410699263  07  NTFS/HPFS

MBR contents:
 Boot Code: Unknown, but bootable

Partition at LBA 40:
 Boot Code: None (Non-system disk message)
 File System: FAT32
 Listed in MBR as partition 1, type ef  EFI System (FAT)

Partition at LBA 409640:
 Boot Code: None
 File System: HFS Extended (HFS+)
 Listed in MBR as partition 2, type af  Mac OS X HFS+

Partition at LBA 629557248:
 Boot Code: None
 File System: HFS Extended (HFS+)
 Listed in MBR as partition 3, type ab  Mac OS X Boot

Partition at LBA 630827008:
 Boot Code: Windows BOOTMGR (Vista)
 File System: NTFS
 Listed in MBR as partition 4, type 07  NTFS/HPFS, active
(note that there is 25gb of free space after the last partition, which doesn't show up in this report)

As far as I can see, I have these options:
  • Convert the MBR to a GPT
    This website seems to show that using 'gdisk', I'd be able to write in a GPT over the top of the existing MBR, however this is risky, and in addition, could cause problems with booting Windows and Ubuntu (This article says "Booting is only supported for 64-bit [Windows] editions on UEFI-based systems." - is a macbook a UEFI system?. Also I'm not sure how Ubuntu would handle it)
  • Delete the EFI boot partition to free up a MBR partition
    From reading some stuff online about this partition, it seems I could safely delete it, but this might screw over later firmware updates.
  • Backup and delete the "Mac OS X boot" partition (Recovery Disk) to free up a partition
    Again, I could safely do this, but the recovery partition is there for a reason I guess...

What would be the best way to proceed? Has anyone else had any experience with a situation like this?
 
No, not the Windows EFI thread. That's a waste of time for Windows 7. Try this thread instead.

Windows on BIOS hardware requires an MBR. And Apple hardware for Windows 7 booting uses an EFI compatibility support module to emulate BIOS: CSM-BIOS. And that CSM-BIOS only honors an MBR with more than one entry, with one of them bootable, and a bootloader in the first 440 bytes of the disk. If those three things aren't true, the CSM-BIOS will not activate, and the Mac will not boot Windows (or most likely Ubuntu since usually the CSM-BIOS is used for Linux as well, up until fairly recent versions).

Hybrid MBRs are flaky and dangerous so your options are all valid except the first one. You can't convert to GPT, because Windows won't use it.

I highly recommend you abandon this and just run Linux and/or Windows in a VM with virtual disk images instead of messing around with partition madness. The way Apple has done this is extremely non-standard and is not conducive to easy triple booting without understanding EXTREME amounts of the finer points of bootloaders and partition scheme.

But what I can tell you is that Apple CSM-BIOS is activated by three things: an MBR with at least two entries (doesn't matter what 2nd one is), with one of the entries other than the first marked bootable, and a bootloader in the first 440 bytes of the disk. So you can install Ubuntu in GPT partition 5 (or 5,6,7 if you use separate partitions for /boot, / and swap). Then use a Linux fdisk to edit the MBR (the Mac OS X fdisk is old and will not work), make the 1st MBR entry equal to the start-end sectors for the GPT and GPT partitions 1 through 3 (GPT, EFI System, Mac OS, Recovery HD), make the MBR 2nd entry for the start-end sectors for the Windows partition and mark it bootable, and make the MBR 3rd entry for the start-end sectors for all of Linux with type code 83 and do not mark it bootable.

Do the above AFTER you install Ubuntu because it will blow away the MBR when it installs. Further, Ubuntu will blow away the Windows bootloader in the first 440 bytes of the disk so you're already covered there if you accept the Ubuntu default for where to install the bootloader. AGain the CSM-BIOS doesn't care what partition you mark as bootable in the MBR as long as it's not the first entry. The CSM-BIOS blindly executes the code in the first 440 bytes of the MBR, which then chain loads the rest of the boot loader (GRUB 2 in this case) ignoring the boot flag in the MBR. And Ubuntu will honor the GPT so it doesn't matter that all of its partitions are stuffed in the 3rd MBR entry.

That's about as safe as it can be done. My preference is Windows last, and then I put GPT, EFI, Mac OS, Recovery, Linux into MBR entry 1, and Windows in MBR entry 2. Easy. And you can do this with gdisk. But your order of Ubuntu last means you'll have to use fdisk to manually create the proper MBR.
 
As above i suggest just running Linux in a VM. You'll get the benefits of snapshots, no MBR faffing about and Linux isn't a huge resource hog anyway. 1gb of RAM for it is plenty.

If you don't have Fusion or Parallels, try Virtualbox (free). Linux probably even has built in drivers for virtualbox these days.
 
try Virtualbox (free). Linux probably even has built in drivers for virtualbox these days.

I use vbox. Most linux distros will install on it just fine. If you want copy-paste between guests and host, and take advantage of hardware GPU, and share folders between guest and host, then actually you need to build the drivers. It's pretty straightforward. There's a menu item in vbox to install guest additions which causes a virtual CD to be mounted, and a script autoruns. Authenticate the script and the drivers are built so long as you have the required items already installed: gcc, kernel-devel, and kernel-headers come to mind. But whatever it fails on, the script gives clues why or what's missing. Pretty cake.

Worth getting familiar with though because you need to rebuild with each kernel update. And copy-paste between guest and host is invaluable.
 
First of all, thanks for all your replies, especially murphychris for your incredibly detailed response! :D

It seems my best option is to just remove the Mac OS X backup partition... I'll probably just burn it onto a disk or something.

Hopefully when Windows 8 is released there will be better support for EFI booting... who knows, maybe Apple will update Bootcamp to support it. I think that's a bit hopeful though :p
 
OSX ML, Windows 8 and Ubuntu = 1 mac

I Don't know if it could be of help to you, but today I installed Mountain Lion, Windows 8 and Ubuntu 12.04 LTS on both an early 2008 MBP and a 2010 mac mini.

firts I installed ML on the entire disk, then I erased the rescue partition:

in terminal:
diskutil list -----» to find what volume to erase probably disk0s3

then erase:
diskutil eraseVolume HFS+ ErasedDisk /dev/disk0s3 if the volume is 3

then merge:
diskutil mergePartitions HFS+ MacHD disk0s2 disk0s3


Now you can use boot camp to create a partition to install win 8, you can install the bootcamp drivers right away or wait

when you're done with win 8, reboot from osx and in disk utility, create a fat 32 partition from the osx partition so it will be between osx and windows, I think that in order to boot, windows has to be on the last partition

You can name it Ubuntu or whatever, just to help you locate it later

reboot holding c (on the ubuntu dvd)

Choose your language

on my MBP this wasn't necessary but it was on the mac mini:

before clicking install, press F6 then choose nomodeset, esc
then click install

follow the differents steps

first choose other

when asked to select a partition, select the appropriate one, put an x in the format box, choose ext 3 and mount / then click ok

At the bottom of the window you will be asked where to install Grub, select the one where Ubuntu is to be installed.

then an error window will pop just click continue, then an other window will pop warning you that you don't have a swap partition, click continue. Why? Because I think that to have the additional partition you would need a MBR and a couple of years ago I did it this way and there were some updates from Apple that I couldn't install because of it. Anyway, if you have enough ram to run windows 8, you can run anything! But there is a way to create a swap inside ubuntu, on the ubuntu forums you could easily find it

just complete the installation then you're done!

If you want a cool looking boot menu, you can install REFIT in osx, rebooting once or twice and then you'll have a three options menu

don't if it will help but there you go
 
Like I mention in this thread, Boot Camp (dual-boot) is already tenuous. Triple boot is even more dangerous. You really have to understand a lot in order to avoid problems, including data loss. It flabbergasts me how often users try to do things like resize NTFS volumes from within Windows on a dual-boot disk (which invariably damages the GPT, only updates the MBR, and typically renders both OS's unbootable).
 
So far since 2008, i've never lost anything

Like I mention in this thread, Boot Camp (dual-boot) is already tenuous. Triple boot is even more dangerous. You really have to understand a lot in order to avoid problems, including data loss. It flabbergasts me how often users try to do things like resize NTFS volumes from within Windows on a dual-boot disk (which invariably damages the GPT, only updates the MBR, and typically renders both OS's unbootable).

The technique that I used did not resize the NTSF partition, the repartitioning itself is made from within OSX.

It flabbergasts me when people answer to one's post without reading it.

I've been doing this since 2008 on a MBP, an IMAC and now a mac mini.
with Leopard, Snow Leopard, Lion and since yesterday mountain Lion

With every flavor of windows from XP pro to now windows 8
With every version of Ubuntu (32 and 64 bits) since 8.10

Like I said, if you don't use the MBR type of partition you won't have any trouble whatsoever, and if you do use MBR, the only issue that i had was being unable to apply an update regarding, if I'm not mistaking, EFI, and that makes sence.

My 2009 iMac is triple booting since january 2010 and I have yet to have any trouble with it. Without reformating anything, I upgraded all 3 OS'S to the latest. I did not invent anything, I found how to do it on the net and I did it. It just work.
 
The technique that I used did not resize the NTSF partition, the repartitioning itself is made from within OSX.

Which invariably creates a hybrid MBR regardless of whether you use Boot Camp Assistant or Disk Utility. The hybrid MBR is required to get the CSM (legacy BIOS) to activate, and the CSM the only Apple supported method for booting Windows. Typically it's also used to boot all foreign OS's.

Like I said, if you don't use the MBR type of partition you won't have any trouble whatsoever, and if you do use MBR, the only issue that i had was being unable to apply an update regarding, if I'm not mistaking, EFI, and that makes sence.

If you don't use MBR, you can only EFI boot. If you use MBR only (rather than hybrid MBR), while you can boot Mac OS X, you can't ever reinstall it should that be needed, because the installer won't install Mac OS X onto MBR disks, only GPT disks.

My 2009 iMac is triple booting since january 2010 and I have yet to have any trouble with it. Without reformating anything, I upgraded all 3 OS'S to the latest. I did not invent anything, I found how to do it on the net and I did it. It just work.

Great! But it's still non-obvious not only how to do it, but how to avoid problems for the vast majority who should be using VM until we can EFI boot Windows and Linux, and avoid the whole hybrid MBR bit.
 
Without reading all, I simply install Ubuntu with Grub which added all OS automatically!
I run 2 Linux, FreeBSD, Win8, Vista and OSX86 (and one backup partition) on my PC. Nothing more simple.
After changing partitions etc. only a simple sudo update-grub and all is fine like magic.
 
I run 2 Linux, FreeBSD, Win8, Vista and OSX86 (and one backup partition) on my PC. Nothing more simple.

It's out of scope because you're not depending on the hybrid MBR, nor do you have to deal with Apple's firmware (neither their non-UEFI EFI, nor the CSM).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.