Notes on MacBook Pro Unibody

From STMDocs
Jump to navigation Jump to search

Multiple boot

It is possible to have on MPB MacOSX, Windows and a few linux distros. Also, it is not true that when we use Linux/Windows on MBP, we are limited to 3 usable partitions, as often stated in many guides about dual or triple boot on Mac. I don't use MacOSX and Windows very often, but I find it useful to have them installed, they can be very handy to run some applications (Google Sketchup or 12VoIP are good examples).

After many trials and errors, and spending quite some time googling, I found this article. I find it important to know these points:

  • Myths and Facts About Intel Macs
  • hybrid partition table MBR/GPT and BIOS is required to boot Windows, and also Linux if we want graphics acceleration. The best tool to deal with hybrid partition table MBR/GPT is rEFIT.
  • to change the partition table, use GParted Live CD to boot MBP and make desired changes, then use refit to sync the MBR partition table. It's OK that after syncing, the MBR partition table looks different from the GPT table. MBR partition table is needed to boot MBP in BIOS mode and is used by Windows. Linux & MacOSX don't look at MBR partition table (they use the GPT one). It's fairly easy and safe to change the partition table (including grow/shrink partitions) this way if we follow strictly this practice: whenever we change the partition table with GParted, always use rEFIT to sync MBR table from GPT.
  • the order how the OSes are installed is critical:
    • MacOSX
    • a small ext2/ext3 partition to install grub
    • Windows. If Windows partition is not in this position, installation goes ok but then it cannot boot (mystery error with missing hal.dll)
    • linux partitions; can be as many as we wish


MBP comes with preinstalled OSX on the whole disk. I made some notes on my partitioning scheme:

Partition Minimal size Recommended size File system Notes
Leopard 9G 30-40G HFS+ I don't use MacOSX very often, so I don't need too much disk space for it. It's good to keep the MacOSX partition not too big so that I can backup the whole partition to an external USB disk (mine is 30G). MacOSX can access NTFS, so non-system data (like audio, movies, etc.) can be put on another NTFS partition.
Grub 200MB ext2 Grub must be installed to this partition (right after the MacOSX partition) so that rEFIT can chainload it. Then we boot linux from grub just like on PC.
WinXP 2G 20G NTFS I use WinXP from time to time to run or test software that don't run on other OSes. This partition can be accessed from both linux & OSX, so it's not harmful to give it some more space than needed.
swap 4G 4G swap swap is used for linux, and must be as large as RAM amount for use with suspend
Linux1 4G 8G ext3 primary linux system, at the moment Ubuntu-8.10
Linux2 4G 8G ext3 testing linux system. It's handy to have an extra partition to install another linux system for testing purpose, so that we can test another linux distro (for example a new version of Ubuntu) without re-partitioning.
/home 40G grow as needed jfs /home partition that is shared between linux systems. jfs cannot shrink so it's better to start small, and expand it as needed. To expand /home partition, use GParted Live CD to shrink the share partition (below) and then expand /home. GParted can grow/shrink/move NTFS without problem.
share 10G grow/shrink as needed NTFS NTFS can be accessed from Windows, MacOSX and Linux so it's a good choice for data that are likely to be shared between systems, like photos, audio, video, iso images, downloaded programs, etc. Ironically, we cannot access this partition from WinXP, since Windows uses MBR partition table and hence cannot see this share partition. But it's still the best choice for sharing data between MacOSX and Linux.

Installation steps

  • start MacOSX, download and install rEFIT from
  • use BootCamp to resize MacOSX partition to 40G. Don't worry about the windows partition size, we will delete it later
  • boot MBP with GParted Live CD (version 0.3.7-7 works ok, version 0.4.1-2 has problem with screen resolution which must be fixed by manual configuration: resolution 1024x768, driver VESA)
  • partitioning:
keep original EFI partition /dev/sda1 fat32 200M
keep original MacOSX partition /dev/sda2 journaled hfs+ 40G
remove windows partition
create grub partition /dev/sda3 ext2 200M
create Windows partition /dev/sda4 ntfs 20G
create swap partition /dev/sda5 swap 4G
create Linux1 partition /dev/sda6 ext3 8G
create Linux2 partition /dev/sda7 ext3 8G
create /home partition /dev/sda8 jfs 100G
create share partition /dev/sda9 hfs+ remaining size (120G)
  • make sure the Windows partition has boot flag
  • reboot, use rEFIT to sync MBR partition table
  • reboot from windows CD, install windows
  • reboot from Ubuntu CD, install Ubuntu
    • choose manual partitioning, select root and swap partition
    • don't install grub to MBR, but to grub partition (/dev/sda3, 200M)

Tuning OSX

Disable startup chime

Accessing NTFS partition

I wanted to use a big NTFS share partition for media data and the like. To access this partition on OSX, install NTFS-3G from as instructed at

There were however a few issues:

  • write performance of NTFS-3G on my MBP is slow (1-2MiB/s), but it's expected to be improved in next version of NTFS-3G for OSX. Read performance is ok (10-15MiB/s).
  • if the NTFS partition was created by gparted, it got wrong flag and needs some manual work fo fix it. See

Update on sharing data between Linux, OSX and Windows

  • have a partition 20GB for windows XP; winXP uses about 8-10G, the rest however can be easily accessed from OSX & Linux so the extra space is not wasted.
  • NTFS-3G for OSX is getting better; last version (NTFS-3G 2009.4.4) has fixed the problem with low write performance as stated above
  • to share data between linux & OSX, use a HFS+ partition (without journaling). Linux has mature support for HFS+.

Slimming OSX


MacPorts is a system to install GNU software on OSX. Very useful for Unix geeks on OSX.

Uninstalling OSX software

great guide:

TeX for OSX

Useful utilities

  • SuperDuper: for backup
  • MacVim: my favorite editor
  • Adobe Reader
  • VLC: universal movie player
  • mplayer: great movie player, installable via MacPorts
  • MacTheRipper: rip dvd to disk
  • HandBrake: dvd encoding
  • QuickSilver: shortcuts for everything

Update on Ubuntu on MBP51

Some issues

  • synaptics driver doesn't seem to work as described in the above guide; SHMConfig is disabled
  • I haven't tested sound thoroughly; just followed the instructions and playing sound works. Not tested recording yet
  • update: fixed issue with synaptics by
    • load synaptics module in xorg.conf
    • upgrade the xserver-xorg-input-synaptics
    • repeat the workaround: blacklisting usbhid in /etc/modprobe.d/backlist.conf, then load it manually after bcm5974 in /etc/modules
    • update initrd
  • afterward the touchpad can be configured by eg gsynaptics or GPointingDeviceSettings


  • reboot
  • getting touchpad work smoothly
  • battery doesn't last long in comparison with OSX

Old news

Tested kernel 2.6.29-rc3

Build from sources, with ubuntu config from 2.6.28

good news
  • it booted
  • support for MBP5.1 seems to be there (the log said: MacBookPro 5,1 detected)
bad news
  • wireless didn't work
  • trackpad didn't work
  • no graphics acceleration
  • still hang during reboot

It seems better to wait for a few months. Next ubuntu version (Jaunty) might have 2.6.29 kernel and will be released in 2 months.