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

Tokkun Studio unveils alpha trailer for...
We are back on the MMORPG news train, and this time it comes from the sort of international developers Tokkun Studio. They are based in France and Japan, so it counts. Anyway, semantics aside, they have released an alpha trailer for the upcoming... | Read more »
Win a host of exclusive in-game Honor of...
To celebrate its latest Jujutsu Kaisen crossover event, Honor of Kings is offering a bounty of login and achievement rewards kicking off the holiday season early. [Read more] | Read more »
Miraibo GO comes out swinging hard as it...
Having just launched what feels like yesterday, Dreamcube Studio is wasting no time adding events to their open-world survival Miraibo GO. Abyssal Souls arrives relatively in time for the spooky season and brings with it horrifying new partners to... | Read more »
Ditch the heavy binders and high price t...
As fun as the real-world equivalent and the very old Game Boy version are, the Pokemon Trading Card games have historically been received poorly on mobile. It is a very strange and confusing trend, but one that The Pokemon Company is determined to... | Read more »
Peace amongst mobile gamers is now shatt...
Some of the crazy folk tales from gaming have undoubtedly come from the EVE universe. Stories of spying, betrayal, and epic battles have entered history, and now the franchise expands as CCP Games launches EVE Galaxy Conquest, a free-to-play 4x... | Read more »
Lord of Nazarick, the turn-based RPG bas...
Crunchyroll and A PLUS JAPAN have just confirmed that Lord of Nazarick, their turn-based RPG based on the popular OVERLORD anime, is now available for iOS and Android. Starting today at 2PM CET, fans can download the game from Google Play and the... | Read more »
Digital Extremes' recent Devstream...
If you are anything like me you are impatiently waiting for Warframe: 1999 whilst simultaneously cursing the fact Excalibur Prime is permanently Vault locked. To keep us fed during our wait, Digital Extremes hosted a Double Devstream to dish out a... | Read more »
The Frozen Canvas adds a splash of colou...
It is time to grab your gloves and layer up, as Torchlight: Infinite is diving into the frozen tundra in its sixth season. The Frozen Canvas is a colourful new update that brings a stylish flair to the Netherrealm and puts creativity in the... | Read more »
Back When AOL WAS the Internet – The Tou...
In Episode 606 of The TouchArcade Show we kick things off talking about my plans for this weekend, which has resulted in this week’s show being a bit shorter than normal. We also go over some more updates on our Patreon situation, which has been... | Read more »
Creative Assembly's latest mobile p...
The Total War series has been slowly trickling onto mobile, which is a fantastic thing because most, if not all, of them are incredibly great fun. Creative Assembly's latest to get the Feral Interactive treatment into portable form is Total War:... | Read more »

Price Scanner via MacPrices.net

Early Black Friday Deal: Apple’s newly upgrad...
Amazon has Apple 13″ MacBook Airs with M2 CPUs and 16GB of RAM on early Black Friday sale for $200 off MSRP, only $799. Their prices are the lowest currently available for these newly upgraded 13″ M2... Read more
13-inch 8GB M2 MacBook Airs for $749, $250 of...
Best Buy has Apple 13″ MacBook Airs with M2 CPUs and 8GB of RAM in stock and on sale on their online store for $250 off MSRP. Prices start at $749. Their prices are the lowest currently available for... Read more
Amazon is offering an early Black Friday $100...
Amazon is offering early Black Friday discounts on Apple’s new 2024 WiFi iPad minis ranging up to $100 off MSRP, each with free shipping. These are the lowest prices available for new minis anywhere... Read more
Price Drop! Clearance 14-inch M3 MacBook Pros...
Best Buy is offering a $500 discount on clearance 14″ M3 MacBook Pros on their online store this week with prices available starting at only $1099. Prices valid for online orders only, in-store... Read more
Apple AirPods Pro with USB-C on early Black F...
A couple of Apple retailers are offering $70 (28%) discounts on Apple’s AirPods Pro with USB-C (and hearing aid capabilities) this weekend. These are early AirPods Black Friday discounts if you’re... Read more
Price drop! 13-inch M3 MacBook Airs now avail...
With yesterday’s across-the-board MacBook Air upgrade to 16GB of RAM standard, Apple has dropped prices on clearance 13″ 8GB M3 MacBook Airs, Certified Refurbished, to a new low starting at only $829... Read more
Price drop! Apple 15-inch M3 MacBook Airs now...
With yesterday’s release of 15-inch M3 MacBook Airs with 16GB of RAM standard, Apple has dropped prices on clearance Certified Refurbished 15″ 8GB M3 MacBook Airs to a new low starting at only $999.... Read more
Apple has clearance 15-inch M2 MacBook Airs a...
Apple has clearance, Certified Refurbished, 15″ M2 MacBook Airs now available starting at $929 and ranging up to $410 off original MSRP. These are the cheapest 15″ MacBook Airs for sale today at... Read more
Apple drops prices on 13-inch M2 MacBook Airs...
Apple has dropped prices on 13″ M2 MacBook Airs to a new low of only $749 in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, now available for $679 for 8-Core CPU/7-Core GPU/256GB models. Apple’s one-year warranty is included, shipping is free, and each... Read more

Jobs Board

Seasonal Cashier - *Apple* Blossom Mall - J...
Seasonal Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Seasonal Fine Jewelry Commission Associate -...
…Fine Jewelry Commission Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) Read more
Seasonal Operations Associate - *Apple* Blo...
Seasonal Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.