How to create a triple boot system (MacOS, Windows, Ubuntu) on a MacBook.

Note: This was created using a 2008 MacBook running Max OS X 10.5.4, Windows XP SP3 and Ubuntu 8.04.1.

Disclaimer

Things are a little bit tricky with a Mac. You can obviously mess up your system if something goes wrong. So: Please backup your data before you start and read the instructions carefully.

This page intentionally explains one way in a (hopefully) simple and step by step manner. If you run into trouble have a look at the following page that gives a lot more detail: http://wiki.onmac.net/index.php/Triple_Boot_via_BootCamp

Summary

In short, here's what you do:

  • Update your MacBook firmware to the latest available version.

  • Install rEFIt.

  • Create partitions for the three operating systems.
  • Install Windows.
  • Install Ubuntu.

Step by Step

Update your MacBook's Firmware

This is just to make sure that you're running the latest available firmware. Firmware updates are distributed as part of OS X updates, so this part is pretty easy: Boot into OS X, make sure you've got a working Internet connection and click on the Apple-Symbol in the top left corner. Select "Software Update" and install the updates.

Install rEFIt

If all goes well, you're going to have three operating systems to chose from at the end of the day, so you'll want to be able to chose which OS to boot into upon startup. You will also want to keep your partition tables in sync. rEFIt does both of these things for you.

In case you've never heard of "keeping partition tables in sync", just note that so called "GPT/MBR hybrid" partition table is needed to make all three operating systems happy. See the rEFIt website (http://refit.sourceforge.net/) for more information, and make sure you understand the importance of syncing your partition tables.

To keep things simple you can do this while you're running your normal Mac OS: Download the Mac-Disk-Image from the rEFIt site and use it to install rEFIt to your harddrive. Once the installation is finished, you can reboot and enjoy the pretty rEFIt menu. Smile :-)

→ Now you're set to boot into multiple available operating systems.

Create Partitions for All Three Operating Systems

Remember that this was done on Mac OS 10.5.4. I don't know if "diskutil" works the same way in previous versions of Mac OS (especially the non-destructive resizing of partitions). If anyone gives it a go, please comment here. You may want to have a quick look at the manual page of "diskutil" (type "man diskutil" im a terminal window) just to make sure, you know what you're doing.

Instead of using Apple's graphical tool, we'll go for the good old command line, so open a Terminal and have a look at your existing disk layout:

diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *149.1 Gi   disk0
   1:                        EFI                         200.0 Mi   disk0s1
   2:                  Apple_HFS Mac-OS                  148.7 Gi   disk0s2

So we've got 2 partitions here already (disk0s1 and disk0s2 in the example). The first one is the so called EFI partition and the second one is the Mac OS partition. Leave the EFI partition alone and split up the Mac OS partition in three:

diskutil resizeVolume disk0s2 45G "JHFS+" 4-Linux 20G "MS-DOS FAT32" 4-Windows 0b

Started resizing on disk disk0s2 Mac-OS
Verifying
Resizing Volume
Adjusting Partitions
Formatting new partitions
Formatting disk0s3 as Mac OS Extended (Journaled) with name 4-Linux
Formatting disk0s4 as MS-DOS (FAT32) with name 4-Windows
[ + 0%..10%..20%..30%..40%..50%..60%..70%..80%..90%..100% ] 
Finished resizing on disk disk0
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *149.1 Gi   disk0
   1:                        EFI                         200.0 Mi   disk0s1
   2:                  Apple_HFS Mac-OS                  44.9 Gi    disk0s2
   3:                  Apple_HFS 4-Linux                 19.9 Gi    disk0s3
   4:       Microsoft Basic Data 4-WINDOWS               83.8 Gi    disk0s4

So now we've got 4 partitions. In the example above partition 2 (Mac OS) was shrunk to ~ 45 GB, partition 3 (labeled "4-Linux") was made ~ 20 GB and partition 4 (labeled "4-Windows") uses the rest of the space on the harddisk (approximately 84 GB in the example).

Note that 4 partitions is the limit (EFI, MacOS, Ubuntu, Windows) unless you want to do tricky stuff. Also note that your Windows partition will need to be the last one, otherwise you will probably get strange errors halfway through your Windows installation (at least with Windows XP).

Reboot and select the partition tool from the rEFIt menu. Let it sync your partition list. Reboot again just to make sure.

→ Now you've prepared a partition for every OS. Smile :-)

Install Windows

Put your Windows Install-CD in the drive and reboot your Mac. Select to boot from the Windows-CD from the rEFIt menu. Press a key on the keyboard when prompted to really boot from the CD and the Windows-Installer should be started from your CD.

Things to watch out for:

  • Make sure your partition tables are in sync to start out with. You can check this from the rEFIt menu.
  • Make sure you're installing Windows to the correct partition. Does the partition size make sense? (Don't install Windows in partition 2!!!)
  • Do not fool around with deleting and making new partitions from within the Windows installer. This is bound to screw up something as Windows (at least Windows XP) doesn't know about your hybrid (GPT/MBR) partition table.

  • Install Windows onto what it believes to be "drive C:" - this should be selected by default.
  • Have Windows (re-) format the partition to make sure that it will be bootable.

From experience: Don't worry if it doesn't seem to work at first. Reboot a couple of times. Shut down your Mac properly. Boot Mac OS for a change and then Windows again. See if it gets there in the end.

When you're done, boot into Windows (by selecting the Windows-Partition from the rEFIt menu) and insert your original Mac OS X Install-CD. It contains the necessary Windows drivers for your MacBook (at least with Mac OS 10.5). You may need to open the CD explicitly because Autostart does not seem to work with just the barebone Windows installed on the MacBook. Don't worry if it says that it's installing Boot Camp (which will probably be the case if you're using a Mac OS 10.5 CD) because that just seems to be Apple's idea of saying "installing all Windows drivers". Just let it install everything it wants to knowing that you will not need to mess with Boot Camp; you've got rEFIt.

Make sure to active Windows if necessary (so that it keeps working), install an antivirus program (so that the integrated security thingy is happy), keep up with your Windows updates (so that your Windows installation is as up-to-date as possible) and do so all that other stuff Windows users need to do.

Hints:

  • All the integrated devices including sound, wireless LAN, touchpad and function keys should work now.
  • On newer Mac models "right" mouse-clicks can be done by putting two fingers on the touchpad and then clicking the mouse key.

→ Now you've got a dual boot system. Smile :-)

Install Ubuntu

If you don't have one already: Grab an up-to-date copy of your favorite Ubuntu flavor (http://www.ubuntu.com/getubuntu/download) and burn an install CD. As far as I know both the "normal" i386 and the amd64 versions should work on current Intel-based Macs.

Put your Ubuntu Install-CD in the drive and reboot your Mac. Select to boot from the Linux-CD from the rEFIt menu, and start the Ubuntu installer.

Things to watch out for:

  • Make sure your partition tables are in sync to start out with. You can check this from the rEFIt menu.
  • Play it safe: Don't delete and create partitions from within the Ubuntu installer.
  • Make sure you're installing Ubuntu to the correct partition. Does the partition size make sense?
  • Don't worry if the installer is unhappy about the missing swap partition. You can always create a swapfile later on.
  • Make sure to install the bootloader GRUB to your Ubuntu partition (sda# in above the example) and not the master boot record (MBR).

With current Ubuntu versions you can basically let the graphical installer run through without problems. There are two step where you need to pay attention to though:

  • You need to manually select the right partition for your Ubuntu installation.
  • You need to make sure that the boot loader gets installed to your Ubuntu partition and not the master boot record (MBR).

Screenshot-Tour Ubuntu Install

Here's a couple of screenshots to guide you through. I simply booted from the Ubuntu CD (8.04.1 "i386-desktop" flavor in my case) and selected to boot into the live system (which was the default).

Ubuntu should boot into the live system straight from the CD. Congratulations: You've got Ubuntu running on your mac! Smile :-) To make this a permanent feature, we'll now install it to the Mac's hard drive.

Click the Install icon on the desktop.

01_start-installation.png

When the Prepare disk space dialog comes up, select to partition manually.

02_partition-manually.png

Select the right partition (/dev/sda3 in my example above) and double-check that it is abount the size you remember it to be (20 GB in my case). It would be a bit nasty to format and use the wrong partition here...

03_select-the-right-partition.png

When you've selected the partition you meant to use for Linux, click on the Edit button and edit the partition settings:

  • Select to create an ext3 filesystem (which is the Ubuntu default filesystem).
  • Check the checkbox to format the partition using that filesystem.
  • Select to use the partition as / (from the dropdown box or by typing "/").

04_edit-partition.png

So this is approximately what it should look like, when you're done editing.

05_prepare-partitions.png

The installer will be unhappy that you did not select to create a swap partition. Well: You don't have a partition left to use as a swap partition. But don't worry about that (you can always create a swap file later), and click on Continue to continue.

06_continue-without-swap-partition.png

When you get the "Ready to install" dialog do *not* click on Install button because we still need to tell the installer to install the boot loader to a non standard place. Click on Advanced instead.

07_ready-to-install.png

  • grub to partition's boot sector, _not_ MBR

If you accidentally install grub onto your MBR

  • Don't panic
  • Find your Mac OS DVD (and insert into drive)
  • Reboot holding down Alt/Option
  • Once setup has loaded choose your language
  • Click Utilities->Terminal...

  • Type "fdisk -u /dev/rdisk0" <ENTER>

  • Type "y" <ENTER>

  • Quit Terminal, Quit Installer
  • Reboot and carry on like you didn't do anything stupid Smile :)


CategoryMac

MacBook/TripleBoot (last edited 2009-10-20 00:27:36 by bas2-quebec09-1279358566)