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

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... | Read more »
Price of Glory unleashes its 1.4 Alpha u...
As much as we all probably dislike Maths as a subject, we do have to hand it to geometry for giving us the good old Hexgrid, home of some of the best strategy games. One such example, Price of Glory, has dropped its 1.4 Alpha update, stocked full... | Read more »
The SLC 2025 kicks off this month to cro...
Ever since the Solo Leveling: Arise Championship 2025 was announced, I have been looking forward to it. The promotional clip they released a month or two back showed crowds going absolutely nuts for the previous competitions, so imagine the... | Read more »
Dive into some early Magicpunk fun as Cr...
Excellent news for fans of steampunk and magic; the Precursor Test for Magicpunk MMORPG Crystal of Atlan opens today. This rather fancy way of saying beta test will remain open until March 5th and is available for PC - boo - and Android devices -... | Read more »
Prepare to get your mind melted as Evang...
If you are a fan of sci-fi shooters and incredibly weird, mind-bending anime series, then you are in for a treat, as Goddess of Victory: Nikke is gearing up for its second collaboration with Evangelion. We were also treated to an upcoming... | Read more »
Square Enix gives with one hand and slap...
We have something of a mixed bag coming over from Square Enix HQ today. Two of their mobile games are revelling in life with new events keeping them alive, whilst another has been thrown onto the ever-growing discard pile Square is building. I... | Read more »
Let the world burn as you have some fest...
It is time to leave the world burning once again as you take a much-needed break from that whole “hero” lark and enjoy some celebrations in Genshin Impact. Version 5.4, Moonlight Amidst Dreams, will see you in Inazuma to attend the Mikawa Flower... | Read more »
Full Moon Over the Abyssal Sea lands on...
Aether Gazer has announced its latest major update, and it is one of the loveliest event names I have ever heard. Full Moon Over the Abyssal Sea is an amazing name, and it comes loaded with two side stories, a new S-grade Modifier, and some fancy... | Read more »
Open your own eatery for all the forest...
Very important question; when you read the title Zoo Restaurant, do you also immediately think of running a restaurant in which you cook Zoo animals as the course? I will just assume yes. Anyway, come June 23rd we will all be able to start up our... | Read more »
Crystal of Atlan opens registration for...
Nuverse was prominently featured in the last month for all the wrong reasons with the USA TikTok debacle, but now it is putting all that behind it and preparing for the Crystal of Atlan beta test. Taking place between February 18th and March 5th,... | Read more »

Price Scanner via MacPrices.net

AT&T is offering a 65% discount on the ne...
AT&T is offering the new iPhone 16e for up to 65% off their monthly finance fee with 36-months of service. No trade-in is required. Discount is applied via monthly bill credits over the 36 month... Read more
Use this code to get a free iPhone 13 at Visi...
For a limited time, use code SWEETDEAL to get a free 128GB iPhone 13 Visible, Verizon’s low-cost wireless cell service, Visible. Deal is valid when you purchase the Visible+ annual plan. Free... Read more
M4 Mac minis on sale for $50-$80 off MSRP at...
B&H Photo has M4 Mac minis in stock and on sale right now for $50 to $80 off Apple’s MSRP, each including free 1-2 day shipping to most US addresses: – M4 Mac mini (16GB/256GB): $549, $50 off... Read more
Buy an iPhone 16 at Boost Mobile and get one...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering one year of free Unlimited service with the purchase of any iPhone 16. Purchase the iPhone at standard MSRP, and then choose... Read more
Get an iPhone 15 for only $299 at Boost Mobil...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering the 128GB iPhone 15 for $299.99 including service with their Unlimited Premium plan (50GB of premium data, $60/month), or $20... Read more
Unreal Mobile is offering $100 off any new iP...
Unreal Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering a $100 discount on any new iPhone with service. This includes new iPhone 16 models as well as iPhone 15, 14, 13, and SE... Read more
Apple drops prices on clearance iPhone 14 mod...
With today’s introduction of the new iPhone 16e, Apple has discontinued the iPhone 14, 14 Pro, and SE. In response, Apple has dropped prices on unlocked, Certified Refurbished, iPhone 14 models to a... Read more
B&H has 16-inch M4 Max MacBook Pros on sa...
B&H Photo is offering a $360-$410 discount on new 16-inch MacBook Pros with M4 Max CPUs right now. B&H offers free 1-2 day shipping to most US addresses: – 16″ M4 Max MacBook Pro (36GB/1TB/... Read more
Amazon is offering a $100 discount on the M4...
Amazon has the M4 Pro Mac mini discounted $100 off MSRP right now. Shipping is free. Their price is the lowest currently available for this popular mini: – Mac mini M4 Pro (24GB/512GB): $1299, $100... Read more
B&H continues to offer $150-$220 discount...
B&H Photo has 14-inch M4 MacBook Pros on sale for $150-$220 off MSRP. B&H offers free 1-2 day shipping to most US addresses: – 14″ M4 MacBook Pro (16GB/512GB): $1449, $150 off MSRP – 14″ M4... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.