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

Partitioning

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 http://refit.sourceforge.net/
  • 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)
  • create needed partitions:
remove windows partition
create grub partition ext2 200M
create Windows partition ntfs 20G
create swap partition swap 4G
create Linux1 partition ext3 8G
create Linux2 partition ext3 8G
create /home partition jfs 40G
create share partition ntfs remaining size
  • 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

Accessing NTFS partition

I have a big NTFS share partition for media data and the like. To access this partition on OSX, install NTFS-3G from as instructed at http://macntfs-3g.blogspot.com

There is however a problem with NTFS partition created by gparted that requires a fix: http://www.macosxhints.com/article.php?story=20080130022147512

The 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.

Slimming OSX

MacPorts

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

Pending issues with Linux

  • rebooting doesn't work; must hold the power button to turn it off