Intel Mac Triple Boot with Bootcamp

The "Easy" Way

Contents

Introduction

This document outlines how to setup an Intel Mac to triple boot with OSX, Windows XP and OpenSuSE Linux with BootCamp. There is no need to go through the task of bootstrapping a Linux distro when you can install it from CD a little easier and use the NTLDR to chainload Linux. If something goes wrong with the prceedures outlined below, you can make your Mac unbootable, so it is worth backing up your OSX partition with Carbon Copy Cloner.

Prerequisites

Before you attempt hacking your Intel Mac into a triple booting monster, you need the following:

Installation Process

  1. Install OSX if starting from scratch.

  2. Boot up OSX and ensure it is up to date. If it is not up date install the 10.4.6 update. This enables us to use the 'diskutil' application to resize the OSX partition.

  3. Back up the OSX partition with Carbon Copy Cloner - (Recommendation Only)

  4. Perform the firware update if required. This allows the installation of Windows XP without modification of installation media.

  5. Use BootCamp to create the Windows XP driver CD but do not partition the HDD with BootCamp, use the 'diskutil' application for that.

  6. Open the 'Terminal' application and enter the following command to repartition the HDD:
    # sudo diskutil resizeVolume disk0s2 65G Linux SuSE 12G "MS-DOS FAT32" WinXP 15G
    
    This will shrink the OSX partition to 65GB, create a 12GB Linux partition with a label of SuSE and create a 15GB FAT32 partition with a label of WinXP. You can change the sizes and the labels if you wish (You may also need to change partition sizes if you have a larger or smaller HDD).

  7. Eject any media you have in the CD/DVD Rom drive and insert the Windows XP SP2 CD. Now reboot the Mac. When you hear the Apple boot chime press and hold down the 'c' key.

  8. The Windows installation will start. At the partitioning screen select the C: drive and format it as FAT32. Finish the XP installation. When the first part of the installation has finished the Mac will reboot.

  9. When you hear the Apple boot chime press and hold down the 'option' key and select the HDD with the 'Windows' label and continue the Windows installation.

  10. Once the Windows installation is finished, install the drivers from the Windows XP driver CD you created in step 4.

  11. The Intel Mac can now dual boot. Now for the Linux installation.

  12. Eject the Windows XP driver CD and insert the Linux Live CD and reboot. When you hear the Apple boot chime press and hold down the 'c' key to boot into Linux Live.

  13. Set the root password by executing the following command:
    # sudo passwd root
    
  14. 'su' to root and format the Linux partition with the ext3 filesystem by executing the following commands:
    # su -
    # mke2fs -j /dev/sda3
    
  15. Mount the Linux ext3 partition and create a 2GB swapfile with the following commands:
    # mkdir /mnt/suse
    # mount -t ext3 /dev/sda3 /mnt/suse
    # dd if=/dev/zero of=/mnt/suse/swap bs=1024 count=2097152
    # mkswap /mnt/suse/swap
    # swapon /mnt/suse/swap
    
  16. Now reboot. When you hear the Apple boot chime press and hold down the 'mouse button' to eject the Linux Live CD. Once the CD has been ejected, switch the Mac off by pressing and holding down the power button. Power the Mac back on and insert the first CD of the OpenSuSE installation media. When you hear the Apple boot chime press and hold down the 'c' key to start the OpenSuSE installation.

  17. Proceed with the OpenSuSE installation until you get to the 'Clock and Time Zone' menu. On this page, select the appropriate location and from the menu bottom of screen, select 'Hardware Clock is set to UTC'.

  18. Continue with the OpenSuSE installation until you get to the 'Installation Settings' screen. Now perform the following:



  19. The Linux installer will continue the installation process. When finished with CD1 the Mac will reboot.

  20. When you hear the Apple boot chime press and hold down the 'mouse button' to eject the OpenSuSE installation media. Once the CD has been ejected, switch the Mac off by pressing and holding down the power button. Power the Mac back on and insert the Linux Live CD. When you hear the Apple boot chime press and hold down the 'c' key to boot into Linux Live

  21. Once Linux Live has completed booting we need to mount the OpenSuSE partition again with the following commands:
    # sudo passwd root
    # su -
    # mkdir /mnt/suse
    # mount -t ext3 /dev/sda3 /mnt/suse
    
  22. The lilo bootloader needs to be set up now

  23. Create the lilo.conf file (/mnt/suse/etc/lilo.conf) with the following contents:
    boot=/dev/sda3          
    prompt                  
    timeout=50              
    default=SuSE_Linux 	
    
    image=/boot/vmlinuz initrd=/boot/initrd label= SuSE_Linux read-only root=/dev/sda3

  24. Now mount the /dev, proc and chroot the OpenSuSE installation so lilo can be installed with the following commands:
    # mount --bind /dev /mnt/suse/dev
    # mount -t proc proc /mnt/suse/proc
    # chroot /mnt/suse /bin/bash
    # /sbin/lilo
    

  25. Mount the Windows XP partition and set up chainloading with the following commands:
    # mkdir /mnt/WinXP
    # mount -t vfat /dev/sda4 /mnt/WinXP
    # cd /mnt/WinXP
    # dd if=/dev/sda3 of=SuSE.mbr bs=512 count=1
    # echo 'C:\SuSE.mbr="OpenSuSE Linux"' >> /mnt/WinXP/boot.ini
    # cd ~ 
    # umount /mnt/WinXP
    
  26. Reboot the Mac. When you hear the Apple boot chime press and hold down the 'option' key and select the HDD with the 'Windows' label and then select OpenSuSE Linux from the NTLDR screen to finish the OpenSuSE installation.

  27. When the OpenSuSE installation is finished a couple of lines need to be added to the /etc/fstab file. This can be done with the following commands:
    # echo '/dev/sda4 /mnt/WinXP vfat defaults 0 0' >> /etc/fstab
    # echo '/swap none swap sw 0 0' >> /etc/fstab
    

  28. Now mount the Windows partition and mount the swapfile with the following commands:
    # mount /mnt/WinXP
    # swapon -a
    

  29. You now have a triple booting Intel Mac. All that is left is installing the ATI video drivers for the X1600 card which can be found on the ATI website and any other software you desire

What To Do If You Have Problems

  1. Read the OnMac Forum.
  2. Use resources (IRC channels, forums, mailing list) specific to Mac OS X. They can often be very helpful.
  3. Visit the OnMac boys at #winxponmac on irc.freenode.net
  4. Last but not least try your luck at Google.

Credits



Last updated on 2006/04/26

This page retrieved from http://ethicalhack.org/howto/triple_boot_howto.html

ethicalhack.org Homepage