limesoul.com

How to Triple Boot Your MacBook Pro with Mac OS X 10.6, Windows 7 and Ubuntu 11.10

Although my MacBook Pro's model identifier is 6,2 (15-inch, Mid 2010), I guess the problem during the installation is the same as other MacBooks.

  1. Download the iso file "64-bit Mac (AMD64) desktop CD" from cdimage.ubuntu.com and burn it to a CD.
  2. Install Windows 7 and Ubuntu 11.10 according the process described by MactelSupportTeamAppleIntelInstallation (Press C during startup - Start up from a bootable CD or DVD). There is no difference between the installation of Vista and Windows 7 (Mac OSX, Vista, and Ubuntu).

Problem

Can you boot Ubuntu 11.10 now? I couldn't. When I tried to boot, all I can see is a black screen with the "Missing operating system" message. Why?
I tried to reboot and ran the "Start Partitioning Tool" from rEFIt boot menu.
Partitioning Tool Partitioning Tool Result
There is an error. I guess Ubuntu 11.10 installer does not overwrite MBR partition table properly. And gptsync of rEFIt cannot correct this problem (as of October 2011).

Solution

  1. Put "Ubuntu 11.10 64-bit Mac (AMD64) desktop CD" (actual CD) in the CD drive and boot from it. Then "Try Ubuntu".
    Dash

  2. Click the icon at the upper left, type "terminal".
    Terminal
    Then click the "Terminal" icon.

  3. Type the following commands.

    sudo parted /dev/sda
    unit s
    print

    parted
    If you wish to know what these commands mean, run another terminal and type

    man parted

  4. Run another terminal and type

    sudo sfdisk -uS /dev/sda

    (You can read the manual of sfdisk by man sfdisk command)

    If you see the "This disk is currently in use" message,
    sfdisk
    you need to umount and/or swapoff.

    sudo swapoff -a

    sfdisk

  5. See the GPT (GUID Partition Table) that shown by parted and rewrite MBR partition table by using sfdisk. Here is an example describing my case, but you need to check your own GPT.
    sfdisk
    sfdisk reads lines of the form
    <start> <size> <id> <bootable> <c,h,s> <c,h,s>
    where each line fills one partition descriptor. When a field is absent or empty, a default value is used. [sfdisk man page]

    At /dev/sda1 :, <start> = 1, <size> = "End" of the first line ("Number 1") of GPT = 409639, <id> = ee, so I typed

    /dev/sda1 :1,409639,ee

    Now, you need to tell sfdisk the information about a partition which you installed an OS on it.
    In my case, such partition is "Number 2" (second partition) of GPT ("File system" is hfs+, formatted for Mac OS X). <start> = "Start" and <size> = "Size" of this partition, <id> = af (about <id>, see the manual of sfdisk).

    /dev/sda2 :409640,156250000,af

    Next partition ("Number 3", ntfs: <id> is 07) is formatted for Windows 7, so this line will be (<start> = "Start" of "Number 3" = 156921856, <size> = "Size" of "Number 3" = 156248064)

    /dev/sda3 :156921856,156248064,07

    I installed Ubuntu 11.10 on /dev/sda4 ("Number 4", LINUX_NATIVE's <id> is 83), so this line will be (although "Number 6" is also ext4, but it is for /home)

    /dev/sda4 :313169920,29296640,83

    sfdisk
    You can ignore the "Warning: partition 1 does not end at a cylinder boundary" message and press 'y'.

  6. quit parted, then reboot.
Can you boot Ubuntu 11.10 now?

Please visit https://help.ubuntu.com/community/MacBookPro6-2/Oneiric