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

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 »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »
Embark into the frozen tundra of certain...
Chucklefish, developers of hit action-adventure sandbox game Starbound and owner of one of the cutest logos in gaming, has released their roguelike deck-builder Wildfrost. Created alongside developers Gaziter and Deadpan Games, Wildfrost will... | Read more »
MoreFun Studios has announced Season 4,...
Tension has escalated in the ever-volatile world of Arena Breakout, as your old pal Randall Fisher and bosses Fred and Perrero continue to lob insults and explosives at each other, bringing us to a new phase of warfare. Season 4, Into The Fog of... | Read more »
Top Mobile Game Discounts
Every day, we pick out a curated list of the best mobile discounts on the App Store and post them here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out the coverage we did on them in the links below... | Read more »
Marvel Future Fight celebrates nine year...
Announced alongside an advertising image I can only assume was aimed squarely at myself with the prominent Deadpool and Odin featured on it, Netmarble has revealed their celebrations for the 9th anniversary of Marvel Future Fight. The Countdown... | Read more »
HoYoFair 2024 prepares to showcase over...
To say Genshin Impact took the world by storm when it was released would be an understatement. However, I think the most surprising part of the launch was just how much further it went than gaming. There have been concerts, art shows, massive... | Read more »

Price Scanner via MacPrices.net

Apple Watch Ultra 2 now available at Apple fo...
Apple has, for the first time, begun offering Certified Refurbished Apple Watch Ultra 2 models in their online store for $679, or $120 off MSRP. Each Watch includes Apple’s standard one-year warranty... Read more
AT&T has the iPhone 14 on sale for only $...
AT&T has the 128GB Apple iPhone 14 available for only $5.99 per month for new and existing customers when you activate unlimited service and use AT&T’s 36 month installment plan. The fine... Read more
Amazon is offering a $100 discount on every M...
Amazon is offering a $100 instant discount on each configuration of Apple’s new 13″ M3 MacBook Air, in Midnight, this weekend. These are the lowest prices currently available for new 13″ M3 MacBook... Read more
You can save $300-$480 on a 14-inch M3 Pro/Ma...
Apple has 14″ M3 Pro and M3 Max MacBook Pros in stock today and available, Certified Refurbished, starting at $1699 and ranging up to $480 off MSRP. Each model features a new outer case, shipping is... Read more
24-inch M1 iMacs available at Apple starting...
Apple has clearance M1 iMacs available in their Certified Refurbished store starting at $1049 and ranging up to $300 off original MSRP. Each iMac is in like-new condition and comes with Apple’s... Read more
Walmart continues to offer $699 13-inch M1 Ma...
Walmart continues to offer new Apple 13″ M1 MacBook Airs (8GB RAM, 256GB SSD) online for $699, $300 off original MSRP, in Space Gray, Silver, and Gold colors. These are new MacBook for sale by... Read more
B&H has 13-inch M2 MacBook Airs with 16GB...
B&H Photo has 13″ MacBook Airs with M2 CPUs, 16GB of memory, and 256GB of storage in stock and on sale for $1099, $100 off Apple’s MSRP for this configuration. Free 1-2 day delivery is available... Read more
14-inch M3 MacBook Pro with 16GB of RAM avail...
Apple has the 14″ M3 MacBook Pro with 16GB of RAM and 1TB of storage, Certified Refurbished, available for $300 off MSRP. Each MacBook Pro features a new outer case, shipping is free, and an Apple 1-... Read more
Apple M2 Mac minis on sale for up to $150 off...
Amazon has Apple’s M2-powered Mac minis in stock and on sale for $100-$150 off MSRP, each including free delivery: – Mac mini M2/256GB SSD: $499, save $100 – Mac mini M2/512GB SSD: $699, save $100 –... Read more
Amazon is offering a $200 discount on 14-inch...
Amazon has 14-inch M3 MacBook Pros in stock and on sale for $200 off MSRP. Shipping is free. Note that Amazon’s stock tends to come and go: – 14″ M3 MacBook Pro (8GB RAM/512GB SSD): $1399.99, $200... Read more

Jobs Board

*Apple* Systems Administrator - JAMF - Syste...
Title: Apple Systems Administrator - JAMF ALTA is supporting a direct hire opportunity. This position is 100% Onsite for initial 3-6 months and then remote 1-2 Read more
Relationship Banker - *Apple* Valley Financ...
Relationship Banker - Apple Valley Financial Center APPLE VALLEY, Minnesota **Job Description:** At Bank of America, we are guided by a common purpose to help Read more
IN6728 Optometrist- *Apple* Valley, CA- Tar...
Date: Apr 9, 2024 Brand: Target Optical Location: Apple Valley, CA, US, 92308 **Requisition ID:** 824398 At Target Optical, we help people see and look great - and Read more
Medical Assistant - Orthopedics *Apple* Hil...
Medical Assistant - Orthopedics Apple Hill York Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Now Read more
*Apple* Systems Administrator - JAMF - Activ...
…**Public Trust/Other Required:** None **Job Family:** Systems Administration **Skills:** Apple Platforms,Computer Servers,Jamf Pro **Experience:** 3 + years of Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.