TweetFollow Us on Twitter

How-to: Triple boot a Mac with Windows and Linux

Volume Number: 22 (2006)
Issue Number: 11
Column Tag: Triple boot

How-to: Triple boot a Mac with Windows and Linux

by Criss Myers

Preface

Apple Mac's migration to Intel's X86 Architecture in January 2006 presented a unique opportunity that, in theory, enabled any X86 OS, be it Solaris, Unix, Linux or Windows to run on Apple Macintosh hardware. Finally the barriers between Linux, Mac and Windows were broken down as each could be run natively on the same machine, allowing a like-for-like comparison of OSes and hardware.

Architectural differences between Apple's X86 machines and other X86 machines

There are, however, a few technical issues that need to be overcome to enable a Mac Intel machine to be dual or triple booted.

Firstly, Mac uses the Intel Core Duo chip which uses Intel's advanced EFI (Extended Firmware Interface) to boot the operating system, a system already used by Intel's Itanium systems and far more advanced than the much outdated BIOS developed in the 1980s. Microsoft's Windows XP and their Future OSes such as the long awaited Vista will not use EFI for some time. In April 2006 Apple launched a Firmware update to EFI for all Mac Intel Machines that allows the EFI's in-built chooser to see Windows legacy bios boot sectors and boot them. An open source project called rEFIt can see all legacy bios sectors and identify them as either Windows or Linux and even recognize boot sectors on external drives as well. This project can be either installed onto the Mac OS partition, and blessed so that it can be the default boot partition, or burnt on to a CD and booted from there. There is also now a "Start up Item" which keeps rEFIt active across Mac OS X updates and prevents problems with Safe Sleep.

Secondly, Apple opted to use the more advanced partition table called GPT (GUID partition table) as opposed to MBR (master boot record) that most other OSes use. Windows XP, Vista and RedHat Enterprise Linux use this MBR, the problem is therefore that these OS's will not be able to read or mount the partitions if the Mac hard drive is formatted as GPT. OS X is not able to read MBR tables. From release 10.4.5, Apple's Disk Utility can format and create both MBR and GPT but not both together. Windows partition tool can only create MBR, Linux's fdisk can only create MBR and Linux's Parted (alternative partition tool) can only create GPT. Therefore a Mac machine can be formatted for single boot of OS X 10.4.5, Windows XP SP2 or a Linux/Unix distribution, but to create a GPT / MBR dual boot machine would be a problem. To solve this problem Apple updated their Disk Utility in OS 10.4.6 to create a GPT table and then mirror it to an MBR table, so that both OS's could read it. They incorporated this into their BootCamp beta, which will later be incorporated into OS 10.5 Leopard.

Apple created BootCamp to enable the installation of Windows XP on to a Mac as a dual boot setup. BootCamp firstly creates a Windows Driver CD for the particular hardware it is running from, then it allows the user to partition the Mac hard drive into 2 partitions without reformatting the drive (via a GUI to the command line diskutil). It then reboots the Mac from the Windows XP SP2 disk. BootCamp can also restore the drive to a single partition again.

A Mac machine cannot be dual or triple booted straight out of the box. Some of these technical issues, however, have been solved by Apple in response to the customers desires to dual boot their Macs. There are also a few Linux distros that have been adapted to work on Mac Intel, such as Debian and Ubuntu. However until the next version of RedHat Enterprise Linux is released there is no current version adapted for Mac Intel.

So to dual boot a Mac for OSX Tiger and Windows XP is easy, Apple has done all the work and created all the tools to do it, the problem comes when you need to triple boot.

There are plenty of resources online to guide you through dual booting a Mac with OSX and Windows XP, Apples BootCamp section of their site has lots of information.

<http://www.onmac.net>

<http://www.maconintel.com>

<http://fedoraproject.org/wiki/FedoraOnMactel>

All of these have information on dual booting a Mac, but very limited information on triple booting.

As pointed out by the fedora project:

"Right now, we've only tested Dual Booting with OS X. If you want to Triple Boot, you're going to have to do some investigation on your own."

There follows a step-by-step guide to triple booting a Mac Intel with any distribution of Linux.

Hardware and Software Required

Here are the items we need to accomplish this:

This guide presumes that the reader will have a basic knowledge of Linux, the command line, and how to boot from non Mac install CDs.

Step 1: Preparation

Install 10.4.5 that came with the Mac, connect it to the internet and download the following from the above links :

Firmware update for your particular model. NOT the SMC update.

    - Keyboard update 1.0

    - 10.4.6 Intel Combo Update

    - BootCamp Beta 1.1

Download the following files and them burn to CDs:

    - Ubuntu LiveCD

    - Linux - I am using RedHat Enterprise Linux 4, Disks 1-4

    - rEFI Tools 0.7 ISO

From the Linux install disk 4, copy lilo.rpm to the USB pen drive.

Install any required firmware update, then install 10.4.6, do not install 10.4.7 otherwise you will not be able to install the Keyboard Update. Install the Keyboard Update, which will prevent the Keyboard from being unresponsive when booted from the Linux CDs.

We will now create an XP Drivers CD. To do this, install BootCamp beta and then create the drivers CD for your particular hardware from the BootCamp menu. If BootCamp doesn't recognize your Firmware update, Apple suggests you install 10.4.7 Combo or reinstall BootCamp.

Step 2: Creating a working Linux system

We are now ready to begin the triple boot process. Even though we can partition the drive into 3 partitions we cannot install Linux directly onto the second partition. This is due to the fact that when we partition the drive it will create a GPT record and an MBR mirrored record. Windows XP will simply ignore the GPT record as it has no understanding of what a GPT record is. RedHat Linux's installer Anaconda, however, is more sophisticated and will recognize the GPT record, but because it cannot install onto a GPT drive it will then try and reformat the drive. This maybe a problem with many other distributions of Linux and Unix. As we know that the only formatting tool that can support both MBR and GPT together is Apple's diskutil we have to format the drive under OS X. We will work around this problem as follows.

Boot the Mac from the Linux install CD1 and when asked to partition the drive do so manually and create a single root "/" partition with the same size as that which you intend to use for your final setup. I am using an 80GB hard drive so I will use 15GB for Windows, 15GB for Linux and the remaining for OSX, this means I will create a 15GB root partition which will be called sda1 (Mac Intels use Serial IDE drives so they get the names sda1, sda2 etc rather than hda1.) Do not create any logical volumes or swap partitions.

When prompted, do not install any boot loader, as we cannot use GRUB on Mac Intels: it will hang at Stage 2 of the boot process. LILO is the only boot loader that works. LILO is not a default option under RedHat's Anaconda, and therefore, we will install the bootloader later. If your distribution of Linux allows you to install LILO then install it on to the root partition not the MBR, finish the installation and skip the next part and go straight to rebooting from the rEFIt disk.

Install the rest of Linux to your requirements as per normal.

We will now install LILO. Boot the Mac from the Ubuntu LiveCD, connect the USB pen and copy lilo.rpm from the USB pen drive (sdb1) to the Linux partition sda1. Reboot from the Linux install CD and enter the rescue mode, chroot to /mnt/sysimage, then install the LILO RPM. Reboot again from the Ubuntu LiveCD, mount the Linux partition /dev/sda1 as mnt/linux and create the following LILO configuration file in /mnt/linux/etc/lilo.conf :

boot=/dev/sda1
map=/mnt/linux/boot/map
install=/mnt/linux/boot/boot.b
default=Linux
LBA32 
image=/mnt/linux/boot/vmlinuz-2.6.9-34.EL
initrd=/mnt/linux/boot/initrd-2.6.9-34.EL.img
label=Linux
root=/dev/sda1
read-only

Install LILO with the following command :

/mnt/linux/sbin/lilo -C /mnt/linux/etc/lilo.conf  -v

You should get confirmation of the LILO install without any errors.

For RedHat Enterprise users, change the fstab file in /etc , the first part of the first line should be changed from:

LABEL=/ 

To:

/dev/sda1/

Reboot the Mac from the rEFIt boot CD and you should now get the Linux partition as a boot option.

We now have a single boot Linux Mac, we will transfer this data onto an external drive for later use.

Boot the Mac from the Ubuntu LiveCD, mount an external DOS formatted USB drive. Copy the raw data from the Linux partition to this drive as follows :

dd if=/dev/sda1 of=/dev/sdb bs=512 

This will take sometime. Many, many long hours, so go make a coffee.

Step 3: Install OSX and Partition the drive

Reinstall OSX from the install DVD that came with the Mac as per normal, creating 1 standard partition. Connect to the internet and run software update to install all the latest updates, this will install 10.4.7.

GPT supports up to 128 partitions, but MBR can only support 4 primary partitions, and GPT cannot read extended / logical partitions. Windows XP wants to install only on to C:\ which is the last partition, and the first partition will be the EFI boot partition, therefore there are only 2 left, 1 for OS X and 1 for Linux, thus you cannot create a Linux swap partition. This should not be a real problem.

Boot camp can only make 2 partitions, so we need to run the diskutil command via terminal to create the new partitions.

The following command will repartition an 80GB hard drive (disk0s2) into 15GB for Windows, 15GB for Linux and the remainder for OS X.

diskutil resizeVolume disk0s2 44.2G Linux RedHat-EL 15G MS-DOS WindowsXP 15G

Step 4: Install Windows XP

Boot from the Windows XP Service Pack 2 Install CD. Install Windows XP as usual on to C:/ (the fourth partition). Apple recommends that you format as Fat32 rather than NTFS but I have had problems with both formats. If you format as NTFS you will not be able to write to this drive from within OS X.

Reboot into Windows XP, insert the drivers CD and install, then most of the hardware will work under XP. You now have a dual boot Mac.

Step 5: Install Linux

Boot from the Ubuntu LiveCD, mount the USB external hard drive and copy the Linux system back to the third partition, sda3,as follows :

dd if=/dev/sdb of=/dev/sda3 bs=512

Once transferred we will need to make minor changes to the LILO bootloader and the file system table fstab, so that we can load Linux from sda3 rather than sda1 as previously.

    1. Edit the fstab file and change sda1 to sda3.

    2. Edit the LILO configuration and change sda1 to sda3.

    3. Install the new LILO configuration with the following command :

    4. /mnt/linux/sbin/lilo -c /mnt/linux/etc/lilo.conf -v

    5. Reboot from the rEFIt CD, select the Linux partition and it should load normally.

You now have a working triple boot Mac running OS X 10.4.7, Windows XP SP2 and RedHat Enterprise Linux 4. These will all run normally as if they were running from any standard X86 hardware. You can either boot using the rEFIt CD or you can install it onto the Tiger partition. Then each time you boot you can select the appropriate OS, or wait for it to time out and boot into OS X.

Conclusion

In this guide we installed RedHat Enterprise Linux but the same process should work for any version of Linux booted via LILO, the same should also work for Solairs and Unix but may need tweaking to resolve the change in bootup from sda1 to sda3.


Criss Myers is a Senior Mac IT Technician for the Faculty of Science and Technology, at the University of Central Lancashire, Preston, United Kingdom. He has been a Systems Server Administrator from the very first version of OS X Server. He Works with Macs as well as Linux, Unix and Windows.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

The secrets of Penacony might soon come...
Version 2.2 of Honkai: Star Rail is on the horizon and brings the culmination of the Penacony adventure after quite the escalation in the latest story quests. To help you through this new expansion is the introduction of two powerful new... | Read more »
The Legend of Heroes: Trails of Cold Ste...
I adore game series that have connecting lore and stories, which of course means the Legend of Heroes is very dear to me, Trails lore has been building for two decades. Excitedly, the next stage is upon us as Userjoy has announced the upcoming... | Read more »
Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »

Price Scanner via MacPrices.net

Apple’s 13-inch M2 MacBook Airs return to rec...
Apple retailers have 13″ MacBook Airs with M2 CPUs in stock and on sale this weekend starting at only $849 in Space Gray, Silver, Starlight, and Midnight colors. These are the lowest prices currently... Read more
Best Buy is clearing out iPad Airs for up to...
In advance of next week’s probably release of new and updated iPad Airs, Best Buy has 10.9″ M1 WiFi iPad Airs on record-low sale prices for up to $200 off Apple’s MSRP, starting at $399. Sale prices... Read more
Every version of Apple Pencil is on sale toda...
Best Buy has all Apple Pencils on sale today for $79, ranging up to 39% off MSRP for some models. Sale prices for online orders only, in-store prices may vary. Order online and choose free shipping... Read more
Sunday Sale: Apple Studio Display with Standa...
Amazon has the standard-glass Apple Studio Display on sale for $300 off MSRP for a limited time. Shipping is free: – Studio Display (Standard glass): $1299.97 $300 off MSRP For the latest prices and... Read more
Apple is offering significant discounts on 16...
Apple has a full line of 16″ M3 Pro and M3 Max MacBook Pros available, Certified Refurbished, starting at $2119 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free... Read more
Apple HomePods on sale for $30-$50 off MSRP t...
Best Buy is offering a $30-$50 discount on Apple HomePods this weekend on their online store. The HomePod mini is on sale for $69.99, $30 off MSRP, while Best Buy has the full-size HomePod on sale... Read more
Limited-time sale: 13-inch M3 MacBook Airs fo...
Amazon has the base 13″ M3 MacBook Air (8GB/256GB) in stock and on sale for a limited time for $989 shipped. That’s $110 off MSRP, and it’s the lowest price we’ve seen so far for an M3-powered... Read more
13-inch M2 MacBook Airs in stock today at App...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New today at Apple: Series 9 Watches availabl...
Apple is now offering Certified Refurbished Apple Watch Series 9 models on their online store for up to $80 off MSRP, starting at $339. Each Watch includes Apple’s standard one-year warranty, a new... Read more
The latest Apple iPhone deals from wireless c...
We’ve updated our iPhone Price Tracker with the latest carrier deals on Apple’s iPhone 15 family of smartphones as well as previous models including the iPhone 14, 13, 12, 11, and SE. Use our price... Read more

Jobs Board

Licensed Practical Nurse - Womens Imaging *A...
Licensed Practical Nurse - Womens Imaging Apple Hill - PRN Location: York Hospital, York, PA Schedule: PRN/Per Diem Sign-On Bonus Eligible Remote/Hybrid Regular Read more
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
Operating Room Assistant - *Apple* Hill Sur...
Operating Room Assistant - Apple Hill Surgical Center - Day Location: WellSpan Health, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Read more
Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.