Apple Boot Camp
Boot Camp News: Up-to-Date Information
Triple Boot Your Intel Mac: XP, OS X, and Linux!
Posted September 4, 2006 12:13 PM by Greg Wallingford, Staff Writer
We know we do not provide answers or links to everything you might want, so the following links might help you find the information, technology solution or software company you are looking for |
|
Boot Camp Discussion Forum Dual booting discussion and help. Solve dual boot problems here. |
|
News - Boot Camp's Impact (7/7/06) How Dual Booting is Revolutionizing the Windows Marketplace. |
Although dual booting is rapidly becoming more readily available to the average user of Intel Macs, some of us demand more. Some of us have been dual booting for years using arcane commands and incredibly intricate schemes that allow us to dual, triple, and even quadruple boot.
Even though I'm not personally one of those users, this relatively simple guide was a great help in getting me triple booting Linux. Linux is the darling child of computer enthusiasts around the globe because of its open source nature. It is completely customizable, completely adaptable, and open to personal additions more so than any existing OS. So get ready to be booting up Linux, Windows XP, and OS X all on your same Intel Mac!!
Installing the Operating Systems
Install OS X as normal onto your hard disk drive with a single partition. In order to save time, only install the base system at this point.
Boot into OS X. Install the OSX 10.4.6 combo update.
Install the firmware update for your Mac. Then install BootCamp.
Run the BootCamp Assistant and create the Windows XP driver cd. Then exit BootCamp. DO NOT PARTITION USING BOOTCAMP. If you already did, it created a 3rd partition at end of the drive. You can remove it if you boot from another drive and run this command: sudo gpt remove -i 3 /dev/disk0
Alternatively, you can burn the disk to a CD/DVD without running the Boot Camp Assistant. To do so, right click (ctrl+click) on the Boot Camp Assistant and select 'Show Package Contents'. Then copy the Contents/Resources/diskimage.dmg file to the Desktop and use Disk Utility to burn that image to a CD/DVD.
Open up Terminal (found in Applications > Utilities) and type: diskutil list. It should return information looking something like:
/dev/disk0#: type name size identifier
0: GUID_partition_scheme *233.8 GB disk0
1: EFI 200.0 MB disk0s1
2: Apple_HFS Macintosh HD 233.4 GB disk0s2
Find the identifier of your Mac OS X partion (in this case disk0s2) and type the following in order to repartition the drive.
NOTE: In the example below, I have repartitioned a 100Gb Hard disk to contain a 60 GB OSX partition, a 17 GB Linux partition, and a 15 GB Windows XP partition. You can change the volume names/sizes but not the order.
sudo diskutil resizeVolume disk0s2 60G "Linux" [name of linux volume] 17G "MS-DOS FAT32"
If above command and parameters returned error message on your Intel Mac, type to use megabytes (MB) instead of gigabytes (GB) as following:
sudo diskutil resizeVolume disk0s2 60000M "Linux"
Insert your Windows XP Service Pack 2 CD and restart your Intel Mac. When you hear the chime at startup, immediately press and hold the C key.
Windows XP Setup will start. At the disk partition screen, select the C: drive. "Quick partition" it as FAT32. Setup will continue, and eventually it will prompt you to reboot your computer.
After the first restart, hold down the Option/Alt key and select the Windows XP HDD partition from the boot loader in order to continue setting up XP. You will need to repeat this until Windows is fully installed.
Finish the Windows XP installation by using the drivers CD you created earlier to install the system drivers.
You now have a dual booting Intel Mac! But obviously, we aren't finished yet. We want a triple booting Intel Mac!
Insert the Linux Live CD that you've created and then restart your Intel Mac with the CD. When you hear the chime at boot up, immediately press and hold down the C key to boot into Linux.
(Using Knoppix 5.0.1 on MacBook - Download KNOPPIX_V5.0.1CD-06-01-EN.iso, type "knoppix fb1024x768" on boot>)
Set the live CD's root password by typing sudo passwd root
Become root using 'su' and then format the linux partition. (It should be located at /dev/sda3, but check first!)
su mke2fs -j /dev/sda3
Mount the ext3 hard drive partition you created and then create a swapfile. The example below creates a 2 GB swapfile, but you can (and probably will) choose a different size if you wish.
mkdir /mnt/linux && mount -t ext3 /dev/sda3 /mnt/linux
dd if=/dev/zero of=/mnt/linux/swap bs=1024 count=2097152
mkswap /mnt/linux/swap
swapon /mnt/linux/swap
From here, you need to bootstrap your favorite Linux distro (meaning version of Linux, or distribution [distro]). Depending on the variant, this may also require you to compile your own kernel.
The easiest way to compile your own kernel is to download a vanilla linux kernel and use the kernel configuration file from mactel-linux.com. But DO NOT DOWNLOAD THE KERNEL PATCH. The kernel patch is necessary only for elilo whereas we will be using lilo.
We now need to set up the Lilo bootloader so that we can boot into Linux. Install Lilo in the manner that is normal for your distribution of choice.
Create the /etc/lilo.conf file as follows:
# Global LILO settings
boot=/dev/sda3 timeout=5 default=Linux
# Kernel specific LILO settings
image=/boot/
Next Install Lilo onto the partition record of your Linux partition:
/sbin/lilo
From here you can either setup the mac to boot via rEFIt (recommended) or via NTLDR
Booting your mac via rEFIt
Restart your computer into OSX
Mount the rEFIt disk image, and copy the efi folder contained within to the root directory of your OSX partition.
Open a terminal window and cd to the /efi/refit folder you created in the previous step. Run the enable.sh script to install rEFIt.
cd /efi/refit ./enable.sh
Now restart your mac. If everything has been done correctly, the rEFIt menu will be displayed with icons for all three operating systems. Select the OS of your choice using the arrow keys and return.
Booting your mac via NTLDR
You now need to mount your Windows partition, create a chainload file for ntldr and then add a reference to it in the Windows boot.ini file:
mkdir /mnt/windows && mount -t vfat /dev/sda4 /mnt/windows cd /mnt/windows dd if=/dev/sda3 of=linux.mbr bs=512 count=1 echo 'C:\linux.mbr="XYZ Linux"' >> /mnt/windows/boot.ini cd && umount /mnt/windows
Now restart your Mac. If everything has been done correctly, when you hold down the OPTION/ALT key, you will be given an option to boot to OSX and Windows. Select Windows. NTLDR will now show up and present you with the option to either boot into Windows or Linux. Select Linux!
We know we do not provide answers or links to everything you might want, so the following links might help you find the information, technology solution or software company you are looking for