—Trinity: A Personal Computer with a Personality Disorder. (How to triple-boot OS X, Windows 7, and Ubuntu!)

January 22, 2012

I sort of did it before with Silvia; triple booting Ubuntu 10.04, the original Windows XP installation that came with her, and Windows 7 Enterprise just for the heck of it all on one drive. GRUB handled the selection process on startup, and after tweaking the countdown timer I was pleased with it. Doing something similar with a hackintosh on the first try was an ambitious idea (if I do say so myself), but I wanted one machine to rule them all.

I suspected that getting three of today’s major platforms to play nice together on one drive was going to be a serious headache. It would probably be much simpler to use a separate hard drive for each OS, but that would be rather boring wouldn’t it? Plus I only had one drive and, with the recent flooding in Thailand, purchasing another one was kind of out of the budget. Tony put up a guide on dual booting, but adding Ubuntu was a big question mark. Once again, lifehacker proved itself to be an invaluable resource.

Preparation was key and they had the plan, I just had a few added tweaks to better suit my needs. If Windows taught me anything, it was always backup your backups. I wanted to add a shared partition visible to all three operating systems to hold my files, hoping that by separating them from those unruly house mates I might keep them “safe” in case of a fatal crash. I imagined, this is something that would be three times as likely (well twice as likely ’cause you know, Linux is awesome).

Regardless of that last sentence, I’m not going anywhere near the debate as to which OS reigns supreme. I’ll just say that Windows is the biggest trouble maker in getting this to work, and Linux is the great peacemaker in all of this. OS X, for me, is just a bold new frontier.

It’s important to note, once partitions are created and formatted, there’s really no undo. You’re going to end up with a sort of Frankensteinian hybrid partition table, so you have to set it up for your needs from the very beginning. Re-sizing or moving partitions later on isn’t really something I’d recommend unless you want to end up with a drive that won’t boot, believe me. I’m sure someone out there has a method/tool for that but I gave up looking. In any case, here’s how I did it based on lifehacker’s guidance and after much trial and error.

What you’ll need:

  • An Internet connection
  • UniBeast thumb drive
  • Installation media for your other operating systems (be it DVD or USB)
  • gptsync (we’ll download this when we install Ubuntu)
  • 2-3 hours to spare

Lifehacker’s beautiful guide on this wraps it up in 5 easy steps. They did such a wonderful job, the only change I made for myself was the inclusion of a few extra partitions to put my files and backups.

Begin by installing Lion with your UniBeast thumb drive, opening Disk Utility, then…

—Excerpt from lifehacker:

Step One: Partition Your Drive

Right now, you should have a drive with just one partition containing Snow Leopard Lion (plus your 200MB EFI partition, which won’t be visible in Disk Utility). Start up Disk Utility and click on the drive containing OS X in the left sidebar. Head over to the Partition tab, and click on your Mac OS X partition. Hit the plus sign at the bottom of the window twice four times, so you have a total of three five partitions. Head to the upper right-hand corner of the window and name the second partition WINDOWS, *the third one STORAGE, the fourth one LINUX, and the fifth one Time Machine. Format all except “Time Machine” as FAT32 for now. “Time Machine” should be formatted as Mac OS Extended (Journaled). If you need swap space for Linux, you can add a fourth partition, but nowadays this seems pretty unnecessary, so three partitions should be just fine. Hit the Apply button and let it work its magic. When you’re done, insert your Windows 7 installation media and restart your computer.

 

• • •

—My Setup on a 1TB Hard Drive—

OS X Lion – 200GB
Windows 7 – 200GB
Storage – 400GB
Linux – 25GB
Time Machine – 175GB


• • •

Step Two: Install Windows 7

Boot from the Windows 7 media and head into the Windows installation. Make sure you do a Custom install, and when you’re given a list of hard drives, click on the partition named WINDOWS and hit “Drive Options (Advanced)”. Click Format to format the drive as NTFS, and then hit Next to start the installation. Your computer will reboot a few times, but you won’t have to mess with it at all, so go away and come back when it prompts you to name your computer. As always, Windows is the biggest problem child in this debacle. When you reboot, you won’t be able to boot into OS X, but that’s fine—we’ll deal with all that in a moment. First, we’re going to get this Linux installation out of the way.

Step Three: Install Linux

For the purposes of this guide, we’re going to install Ubuntu 10.04, but you can use another version of Ubuntu if you want, or another distro altogether (like the super awesome Arch Linux). Just make sure you install Linux to the correct partition and make extra sure that you install Grub to the same partition to which you installed Linux, as described below.

Boot up from your Ubuntu media and head into the installation. The first few steps are pretty self-explanatory, it’s when you get to the partition window that you want to pay attention. Hit “Specify Partitions Manually” and click Next. Double click your Linux partition’s entry in the table (at this point, it should be the only FAT32 formatted partition on your drive). Under “Use As”, choose your desired filesystem (If you aren’t sure, use Ext4, which seems to be the new standard). Check the “Format the Partition” box and choose / as the Mount Point. Hit OK. Before moving on, note the name of your Linux partition—the name will be something like /dev/sda5—and hit the Forward button to continue.

In the last window, where it says “Ready to Install”, hit the Advanced button. Under “Device for boot loader installation”, it should say something like /dev/sda. Change this to /dev/sda5, or whatever the name of your Linux partition is. Ordinarily, Grub will install itself to the Master Boot Record of the drive, because it wants to be your primary bootloader. In this case, we’re already using Chameleon, so we’re just going to stick this on Linux’s partition, since we won’t be using it to get into Windows or OS X. When you’re ready, hit the Install button and let Ubuntu do its thing. When you’re done, restart your computer.

Step Four: Fix the Windows Bootloader You Just Broke

You’d think keeping Grub away from Windows would leave Windows’ bootloader untouched, but these operating systems just don’t like to play nicely together. Unfortunately, when you first installed Mac OS X, you set your hard drive to use a GUID partition table (GPT), which is not fully compatible with Windows (Windows and Grub really prefer an MBR partition table). Now that you’ve installed Mac OS X, Windows, and Linux side-by-side, your drive is a GPT/MBR hybrid, and your partition tables are “out of sync”. To make the GPT and MBR tables play nicely with one another on the same drive, you need to sync them with a program called gptsync in Linux.

So, grab your iBoot CD UniBeast drive and use it to boot into your new Linux partition (since Chameleon is strangely missing—we’ll get to that in a second). Download gptsync from your distro’s repositories (though Ubuntu users may want to use the .deb files available here instead of the older versions still in the repositories). Once it’s installed, pull up a Terminal window and type:

gptsync /dev/sda

where /dev/sda is the drive containing all your partitions. If you aren’t sure which one is the one you’re using, type in fdisk -l to see a list. Note that you aren’t using it on just one of the partitions (e.g. /dev/sda1), you’re using it on the entire drive. Once you’re done, your computer should successfully boot into Windows whenever you reboot.

Step Five: Set The OS X Partition as Active

When Windows installs, it makes itself the active partition on your computer, which means when you restart, your computer will just boot you into Windows as if OS X and Linux weren’t even there. We want the active partition to be our OS X partition, since it contains Chameleon, which lets us choose between the OSes when we start off. To pry Windows’ greedy hands off your hard drive, just open up the start menu, right-click on Computer, and hit the Manage button. From there, click on Disk Management in the left-hand sidebar, and find your OS X partition. Right-click on your OS X partition in the map and hit “Mark Partition as Active”. Then, reboot your computer. *just boot with your UniBeast thumb drive, select your Lion installation and run MultiBeast (tonymacx86). Checking off the Chimera bootloader option will automatically set your Lion partition as active.

(original post by: Whitson Gordon)

Now whenever you boot, Chameleon will automatically start Lion. Press the arrow key (or any key) at the boot loader screen to see your other options, ie: Lion, Windows, and Linux. Unfortunately, Chameleon will also list your Storage drive which of course isn’t bootable. So we’ll need to hide it by editing the “org.chameleon.Boot.plist” file in your Extras folder in Lion. I use a program called TextWrangler but you can do it with the basic text editor.

Add this string:

<key>Hide Partition</key>
<string>hd(0,4)</string>

Where 0=primary hard drive, and 4=partition you wish to hide

—here’s an example, I have 2 hard drives so I have a few extra strings:

That outta do it… and that’s how I did. Enjoy.

—Many thanks to lifehacker for their insight and detailed guides.

*Update 6/24/12: How to fix clock reset issues while booting OS X and Windows

…problem with the clock – Windows 7 wants to use local time and OS X wants to use UTC. To fix this problem:

1. Boot Windows

2. Click Start –>type regedit in the ‘Search Programs and Files’ box. Click on regedit.exe in the box above that appears. Type in passward if popup appears and asks for one. When the “Do you want to allow this program to change your machine” box pops up click yes.

3. The Windows Registry Editor should pop up.

Navigate within the explorer to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\TimeZoneInformation

4. Click on the TimeZoneInformation “folder” from the navigation pane if you haven’t already done so.

5. This assumes the correct key doesn’t exist. If it does, you will just change the existing key’s value: Right click on the white space within the folder (If you don’t have a right mouse button, you may need to download a program called applemouse to emulate the “control-click” of the apple 1-button mouse).

Select new –> DWORD Value. Title the key “RealTimeIsUniversal” (No quotes). Set the value to “1” (No quotes again).

6. Either reboot and set the clock in MacOS or set the clock in Windows. You should now be able to reboot into either OS and have a correct clock.

(Source)

• • •

P.S. If this post, or any other, have helped you, why not consider a small donation to help us grow?

7 Responses to “—Trinity: A Personal Computer with a Personality Disorder. (How to triple-boot OS X, Windows 7, and Ubuntu!)”

  1. Jonathan P. Says:

    Thanks for this guide!
    Very concise and the helpful modifications to LH’s guide made following along on my own Laptop (on a much smaller scale) a breeze!

    I have one question however, I wasn’t quite too sure how to go about using the storage partition for my shared files. I’ve looked over the articles at Lifehacker and some others that I’ve seen on the web, but none of them go into sharing to the degree that a triple-boot would require. The nearest: [Lifehacker] only shows how to use Windows and Linux to connect to OSX’s Home file. I was wondering how you moved them all to Storage?

    • rrbrowne Says:

      —Oh thanks, well from the beginning I formatted the storage partition to FAT32 which from what I understand is pretty much readable on everything. For me, all 3 OSes pretty much auto-detected & mounted it as a disk drive and it shows up in ‘My Computer’ etc. I manually set up folders for pictures, music, & video and so on in the storage partition, then manually moved all of my files & docs to those respective folders. I’ve been pretty much working from that partition, not sure how to automate or sync the process, but in windows for example I added shortcuts to each of the folders on the storage drive to the Windows media folders. Hope that helps.


  2. […] – Trinity: A Personal Computer with a Personality Disorder. (How to triple-boot OS X, Windows 7, and… (waypastwarranty.wordpress.com) […]

  3. Floyd Elmo Says:

    Thanks for the info.


  4. […] IMG_1351 – My new bootloader theme Image by LookAtWhatIJustShot WayPastWarranty.wordpress.com […]


Leave a comment