Triple boot Mac   3 comments

Since my work these days involves cross platform coding on Mac OSX, Linux and Windows, and having a MacBook Pro as the main development machine, I thought it could be convenient to have the three operating systems installed on a triple boot configuration. Running Linux and Windows inside OSX with a Virtual Machine could be an alternative solution, but doing opengl development and testing in the VM might be tricky (although Parallels VM seems ok, for games at least). I eventually decided to take the route of three separate installs (Ubuntu Linux 10.04, OSX Snow Leopard 10.6.4 and Windows 7 Ultimate) on the same machine. After gathering some information online and working through the required installation steps of each system, I eventually got everything working quite well.

The hardware is a Macbook Pro 13″, 2010 revision (model 7,1 according to the Mac info). This particular model has a single dedicated video card, a Nvidia geforce 320M. Setting up the opengl drivers under Linux was quite straightforward, and hardware acceleration is working perfectly. I’m not sure if the same can can be achieved with the models with hybrid Intel/Nvidia GPUs, specially after reading that Nvidia is not planning to support Optimus (the technology for PC hybrid video) on Linux. Apple doesn’t use Optimus in its hybrid-GPU MacBooks, but I don’t feel very optimistic about the possibility of the Nvidia Linux drivers properly supporting the dual GPU configuration found in the 15″ and 17″ MacBooks. In any case, I was not able to find any information in this regard.
This post, although it is about configuring a dual boot setup, was quite useful to get things started and to figure out how to partition the hard drive. The steps I followed to get things properly installed and configured are the following:

  • A preliminary disk check when booting in single-user mode, followed by a defragmentation (using a tool such as iDefrag) takes care of errors during partition resize due to corrupted files, or files placed at the end of the partition.
  • Install the boot loader tool rEFIt.
  • Resize the OSX partition and create two additional ones (for Linux and Windows) in a single step, using the following command from the terminal (the total size of the hard drive is 250 GB in this case):

    sudo diskutil resizeVolume disk0s2 150G “MS-DOS FAT32” “Linux” 51G “MS-DOS FAT32” “Windows” 49G

    where disk0s2 is the OSX partition by default. The new partitions are both set to FAT32, since the diskutil tool doesn’t know how to create EXT or NTFS file systems. This is ok, however, since we can reformat them later from the respective Windows and Linux installers.

  • Reboot into the Windows installation DVD (at this point, rEFIt should show up when restarting and allow you to select booting from the hard drive with OSX or from the DVD with Windows). During the Windows setup, choose the second FAT32 partition, and reformat it as NTFS. Once this is done, you can continue with the normal installation of Windows on the newly formatted partition.
  • After Windows setup is complete, boot into Windows from the hard drive and run the bootcamp tool from the Applications DVD shipped with your Mac (D:/BootCamp/setup.exe) in order to install all the required Windows drivers.
  • Finally boot into the Ubuntu CD, choose the install option and when prompted with the disk partition menu, choose manual partition, delete the remaining FAT32 partition and use the resulting free space to create an EXT4 root and a swap partitions (in my case I allocated 49 GB to root and 2 GB to swap).
  • After installation is complete, boot into Ubuntu and follow the steps in this guide to setup drivers, keyboard, etc. The only tricky part was setting up bluetooth, it requires patching a kernel module and adjusting some parameters, but it eventually works. I actually found the MacBook Pro 13″ to be a quite reasonable Linux laptop. The hardware supports seems good enough to use it for development work.



Posted October 3, 2010 by ac in Software

Tagged with , , , , ,

3 responses to “Triple boot Mac

Subscribe to comments with RSS.

  1. woo !
    I wantit to.
    Still fuckinkg suffering upgrade to OSX10.6.4!
    no JVM5 !
    and 64bit issues…

  2. Pingback: Make Art 2010 « Nauté

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: