Triple Booting Your Mac
by Steven NoonanUpdated March 2, 2010 Removed unnecessary steps involving Boot Camp and simplified the whole process.
As a software developer, I find it important to ensure that my programs work well on all platforms. Windows, Mac OS X, Linux, whatever. So I decided I should triple-boot my MacBook Pro instead of juggling between a Mac/Windows or Mac/Linux setup.
I’m annoyed that every article I’ve found about setting up a Mac to triple-boot makes it sound like it’s impossible to have greater than four partitions (especially for triple-booting). This simply isn’t the case, and it is hazardous for Linux’s performance in particular because you’re forced to set up a swap file instead of a swap partition and in the case of Gentoo, the /usr/portage mountpoint can’t be separate from the main filesystem (/usr/portage changes frequently and quite randomly, generating awful fragmentation). I’ve had Gentoo installs which had 8 partitions just for Gentoo itself (split up the filesystem to better optimize the usage).
In the past, the problem has been that Intel Macs use the GUID Partition Table (GPT) scheme for representing partition information on disk. Since Windows even now only recognizes the Master Boot Record (MBR) format, Apple came up with a trick that basically makes the disk use a GPT/MBR hybrid. It stores two copies of the partition table. One in GPT format, and one in MBR format. Seems straightforward? It gets tricky.
With MBR, you are limited to 4 ‘primary’ partitions. Once MBR was designed and out the door, people began to realize that 4 partitions just wasn’t enough, and an extension to MBR was developed that would not break compatibility with the existing MBR definition. The extension allowed for one of the primary partitions to be marked as an ‘extended’ partition. Extended partitions sort of store their own partition table which keeps track of the ‘logical’ partitions contained in them.
With the GPT/MBR hybrid, Mac OS X’s Boot Camp software will synchronize the tables once (and once only, which is why we have ‘gptsync’, detailed below). Unfortunately, GPT doesn’t understand extended/logical partitions and gptsync refuses to sync when it detects the MBR has extended partitions defined. So the limitation here is that we cannot have any extended partitions in the MBR if we want GPT/MBR syncing to work.
The solution is pretty simple, really. Windows requires MBR partitioning, but the Linux kernel does not. Simply set up the partition tables with gparted (or with the Mac OS X ‘gpt’ command while booted into an install DVD), run the gptsync tool (which can be run pretty easily if you have rEFIt), install Windows, and finally install Linux. Windows will only see the MBR partitioning scheme, and if your running Linux kernel supports GPT, Linux will see the GPT scheme. Detailed steps are below:
- Boot a Mac OS X install DVD. Bring up Disk Utility and partition your drive. Use as much space as you want for Mac OS X, but be sure to leave unpartitioned space for other OSes.
- You can now add partitions for Linux and Windows using the ‘gpt’ command in terminal. A manual page for how to use it is here.
- I recommend having the partitioning scheme be:
- EFI partition (don’t touch this)
- Mac OS X partition
- Linux /boot partition (about 500MB is fine)
- Windows partition
and then whatever other partitions you want for Linux. At minimum, you need to have a partition for the Linux root, but you should probably go with one for swap, one for /home, and one for /.
- Once your partitions are set, install Mac OS X to your Mac partition.
- Install rEFIt. Be sure to enable it, too, by running ’sudo /efi/refit/enable-always.sh’ in a terminal.
- Reboot, and run the gptsync tool from the rEFIt menu (it’s the disk icon on the lower left). Make sure the changes it recommends are sane, and then type ‘y’.
- Your partitions are now ready for your operating systems. Install Linux (Ubuntu, Fedora, whatever), and be sure to specify that the bootloader gets installed to the /boot partition (not to the master boot record, where it would be wiped out by Windows).
- Once Linux is in, be sure to run ‘gptsync’ again, to be sure the partition table didn’t get clobbered.
- Install Windows to the 4th partition. This can be tricky because Windows won’t install if the partition isn’t marked ‘active’. Either use a Linux livecd and ‘cfdisk’ to mark it ‘Boot’ or use a Windows Vista or Windows 7 disc’s command prompt to mark the partition ‘active’ with ‘diskpart’.
- You should now have a Mac+Linux+Windows machine. Great for software development!
I kind of whipped this article up in a hurry. If there are any questions about this, email me.



October 31st, 2008 at 9:25 am
[...] here is a link for info on triple booting [...]
October 31st, 2008 at 11:19 pm
[...] http://www.anomalousanomaly.com/2008/10/31/triple-booting-your-mac/ [...]
November 1st, 2008 at 1:28 am
[...] Anomalous Anomaly Blog Archive Triple Booting Your Mac No Comments, Comment or Ping [...]
November 11th, 2008 at 10:23 pm
[...] Triple Booting Your Mac The Right Way Anymore, Linux is the easiest operating system to install of all (seriously). However, I will grant that it’s a little bit different and thus slightly harder than normal to do on a Mac. You can just use Boot Camp to install it super easily if you want instead of Windows, but every time you turn on your computer the little button will say Windows since that what Apple thinks you’re using Boot Camp for. And what if you want to have Mac OS X, Windows, and Linux? Well, you could use Boot Camp again and just have the Windows button go to a second boot loader to let you choose between Windows and Linux, but that’s lame. So here’s a guide on setting it up so that your computer will present you with the options that actually say Mac, Windows, and PC. And it has pretty icons to go with them, too. That’s important, right? Right? [...]
November 30th, 2008 at 10:51 pm
[...] Triple Booting Your Mac – Nice walkthrough… [...]
December 9th, 2008 at 5:01 am
[...] Triple Booting Your Mac – Schritt für Schritt Anleitung um Windows, Linux und MacOS X also "Tripple Boot" auf einem Mac (Book Pro) zu installieren. [...]
May 24th, 2009 at 2:11 pm
Анальный сексДовольно интересный сайт о общения, не имет ничего общего с известнами сервисами .
Сравнительно молодой проект но имеет уже огромный выбор пользователей и
различные услуги для посетителей , как платные, так и бесплатные. Так же нужно сказать что сайт имеет очень |удобный| понятный] интерфейс! Анальный секс.
March 2nd, 2010 at 7:12 pm
[...] may remember my last article on a similar topic. At the time, I thought any more than three operating systems couldn’t be [...]
March 6th, 2010 at 11:02 pm
[...] Anomalous Anomaly » Blog Archive » Triple Booting Your Mac (tags: mac linux windows multiboot tripleboot osx howto boot) [...]