Tuesday, 5 June 2012

Triple-Boot Your Mac with Windows and Linux




Apple has streamlined the process of dual booting Windows on your Mac, but when it comes to Linux, Boot Camp isn't so friendly. Here's how to triple-boot your Mac with OS X, Windows 7, and the shiny new Ubuntu 12.04.

If you're a Mac user, you may have already used Apple's Boot Camp to get Windows on your system for those must-have programs. With a fast new Ubuntu out, however, you might want to give it a try—but installing Linux isn't exactly easy on Macs, since they don't recognize it by default.

Also complicating things? Linux and Windows' boot loaders will attempt to take over one another. Usually, this is a good thing, because Linux's multi-system loader makes the experience more seamless for PC users—but on a Mac, this really just makes things more difficult (no one wants to go through two menus to choose their OS). As such, installing Linux needs to be done with certain settings applied, or you'll be left with a jumbled mess. Here's a step-by-step guide to making your triple booting experience as user-friendly as possible.

Note that I will go through the steps to installing both Windows 7 and Ubuntu 12.04, but if you already have Windows installed, that shouldn't be an issue—just skip the Windows installation step and move on to installing Ubuntu, which is the more complicated (and important) part anyways.


Install the rEFIt Boot Menu for Macs

Before we do anything else, we're going to install a new boot menu for your Mac that will make your life during and after installation much easier. rEFIt will show up every time you start up your computer, asking you which OS you want to use. By default, it will boot into OS X after 20 seconds of inactivity (so you don't have to be there every time to choose). It's super customizable, though, so you can change your default OS if you want to, as well as tweak other settings to fit into your workflow as best as possible.

Head on over to rEFIt's SourceForge page and download the DMG for the most recent version of the installer. Open it up and launch the installer package, and go through the installation process (which is pretty self-explanatory; it'll do all the work for you). Afterwards, restart your computer to see if it works! If everything goes as planned, your screen should look something like the screen at the top of this article (though if not, you might have to restart twice to get it to show up). Obviously, it'll only have one or two icons instead of three—the others come next!

 At this point, the rEFIt boot menu is fully functional, though if you want to customize it, you'll have to edit your configuration file. More information on this is available in rEFIt's documentation; I won't get deep into it now, but it's not very difficult to tweak things like the default OS, or which tools show up along the bottom. You just need to "uncomment" the given option by removing the # before the relevant command in the text file. You can also customize the icons by swapping your own .icns with the default ones in rEFIt's folder on your hard drive. You can do that now, or move on to partitioning your disk.


Partition Your Hard Drive with Disk Utility

We won't be using Boot Camp to partition our disk, mostly because we don't need to. Since we're triple-booting, it's easier to see it all at once, rather than let some tool do it for us (if you've already installed Windows using Boot Camp, though, that's fine—just ignore the Windows parts of this step). Open up Disk Utility, click on your main drive (the very top option in the sidebar) and head to the "Partition" tab.

We're going to make three new partitions; one for Windows, one for Linux, and one for our Linux swap space, the space Linux uses if it runs out of memory. To do this, just click on your Macintosh HD partition. If you have multiple partitions already, click on the one from which you want to take back some space. Next, hit the plus sign enough times so that you have four total partitions. Click on your first new partition (the one under "Macintosh HD") and on the right side of the window, type "WINDOWS" in the name box. Format this Windows partition to MS-DOS, then make the size whatever you want.

The sizes don't particularly matter, as long as your OS will fit on the partition, and you have enough extra space for whatever you want. Do the same for a Linux and Linux swap partition, formatting each to MS-DOS (the format isn't super necessary, but at least for the Windows installation it does make the process easier). Hit the apply button and let Disk Utility do its thing—it'll seem like it stops responding, but just leave it be for a minute, and you should be all set. Once it's done, move on to the next step.
 
How to Triple-Boot Your Mac with Windows and Linux, No Boot Camp Required

 

Installing Windows 7

Insert your Windows 7 install disc and restart your computer, unless you've already installed it, in which case, move on to installing Ubuntu). As your computer starts up, listen for the familiar Mac startup sound, then immediately press and hold the Option (or "Alt") key on your keyboard, until you see a drive icon with the word rEFIt under it. You'll need to give your system a second to check the CD drives (assuming you're running Snow Leopard, which is a little slow at doing so), but your Windows CD should pop up on the right. Click on the CD icon, then hit Enter to boot into the installation. You might also get a screen that says "Press any key to boot from CD. . .", in which case you'll have to do what it says, or else just restart your computer.

Go ahead and navigate through the first few steps of the installation. When you're asked what type of install you want to perform, choose "custom install", so you can pick and format the partition. You'll want to choose the one named WINDOWS (obviously), though you'll have to format it by clicking "drive options" and then "Format". It should reformat that partition to NTFS for you, after which you can hit the next button. It'll take a little while to install, and it'll restart a few times during that process—whenever it does, select the Windows partition on boot (which should show up in rEFIt now, so you won't need to hold option down again).

When it's done and you finally get to the Windows desktop, you can go ahead and install the Boot Camp drivers from your Leopard or Snow Leopard install DVD. Since your eject key won't work yet, you'll have to eject your Windows disc manually by going into Windows Explorer, clicking on your optical drive, then choosing the "Eject" button in the toolbar. After inserting your Snow Leopard DVD, it should start automatically with the option to run setup.exe. Pick that, then let the installation run. Once you're done, head back over to OS X, so you can burn and install Ubuntu.

 

Installing Ubuntu 12.04

If you don't already have an Ubuntu installation CD, you'll need to head back into your Mac system (or Windows, if you want to give it a go) and grab the ISO from Ubuntu's website. Make sure you get the right one for your machine, whether it be a desktop/laptop or a netbook, and 32- or 64-bit. Once it's downloaded, burn it with your burning program of choice. Once it's burned, keep it in the drive and restart your computer, once again holding option at the startup sound and clicking on the CD that shows up in your boot menu. It will say it's a Windows disc, but don't worry—it's the right one. OS X is just a little confused when it comes to the world outside itself.

It'll take a few minutes for the CD to boot, but you should eventually be presented with the option to try Ubuntu or install it on your computer. Choose install, then go through the first few steps of the process, picking your language, time zone, and keyboard type (USA probably works fine). When you're presented with the partition window, choose the bottom option to "specify partitions manually"—this is where the fancy footwork comes in.


Double click on your Linux partition's entry. If you've been following this how-to to the letter, it should be /dev/sda4. You'll be presented with a window in which you manually set the partition's characteristics. I chose to use the partition as Ext4, although you can pick something else if you want—Ext4 seems to be the new standard, so I'd recommend it if you don't know the difference between them all. Check the box to format the partition and make the mount point "/". Hit OK and double click on your 1 GB partition at the end of the drive, set it to be used as a swap area, and then hit OK. At this point, your window should look something like this:

 






Go through the rest of the installation until the last window, where it's ready to install and asks you to double-check everything. Hit the advanced button. Make sure "install boot loader" is checked, and change the device for boot loader installation to the same partition on which you installed Linux (in the above case, /dev/sda4). Hit next and let 'er rip. When it's done it should restart your computer and your rEFIt boot menu should contain an option for all three operating systems. If you can successfully boot into both partitions, congratulations! You've got a working triple-boot system.

2 comments:

  1. i am doing this without installing windows and when i boot into refit it will not recognize my ubuntu cd, it only has the option to boot into os x. any ideas?

    ReplyDelete
  2. this method doesnt require refit, and you can keep your windows parition installed using bootcamp


    http://www.youtube.com/watch?v=O40UG1guLeo

    ReplyDelete