Joined: 13 Jan 2003
Location: Palo Alto, CA, USA
|Posted: Mon Jul 03, 2006 8:54 pm Post subject: HOWTO: Dual booting Gentoo and OSX on an Intel Mac Mini
|Headline: all the hardware works and seems to work well.
Warning: the first time I tried this Bootcamp chomped the OS X filesystem and made the system unbootable. Pay attention to the Bootcamp warnings and backup any data you care about first.
Prepping OS X
I'm working from a completly clean OS X install here so you may have already done some of these steps:
Select software update from the Apple menu and get 10.4.7 and all the fireware options offered (I only had one). After the reboot goto http://www.apple.com/support/downloads and search for "mini". You want two fireware updates and the first (SMC) should have happened via Software Update. The other should now be listed. I don't know how stable the URLs are, but currently it's at:
Follow all the instructions about installing the firmware and don't interrupt the process, lest you want to turn your mini into a brick.
Boot into OS X (you can hold the Option key at startup to select the boot volume - but it should be the default) and install rEFIt from refit.sf.net. Reboot and check that everything works. rEFIt is an EFI bootloader which will be booting lilo for us.
Get bootcamp from http://www.apple.com/bootcamp and install. It ends up in Applications/Utilities.
Run it, don't make a driver CD and partition the disk however you want. Click "Restart Mac OS X" and check that the system can still boot.
Insert a Gentoo 2006.0 minimal install CD and shutdown the system. Press the power button and hold 'c' to boot from the CD.
With the 2006.0 install kernel the Sky2 NIC will work, but the wireless doesn't (yet) so you'll need a cabled Internet connection.
You must use parted to partition the disk. The partition table is in GPT format and fdisk doesn't know about it. (Also, remember that when configuring the kernel).
After the partitioning and mkfs you can check that the system still boots. But when you run the install CD again, the kernel won't know about any of your partitions (because it's a GPT, which I'm guessing the install kernel doesn't know about). Run <tt>parted</tt> and delete and recreate the partitions with the exact same numbers again and the kernel will suddenly know about them. You don't need to mkfs again (unless you changed the numbers). (When you do this in future you need to set the boot flag, rerun lilo and rerun the rEFIt partition tool because parted seems to clear all that.).
Now, it's a standard Gentoo install. See http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml
You can find the kernel config I used at http://www.imperialviolet.org/binary/macmini/kernel-config . It's probably not perfect for most people, but it will get you booting. The important points are:
| Device Drivers -> SCSI -> low-level drivers -> SATA support -> Intel PIIX/ICH
Device Drivers -> Network Device -> Ethernet (1000 Mbps) -> SysKonnect Yukon2
... -> ... -> Wireless LAN -> Wireless LAN drivers
I'm using lilo. The /etc/lilo.conf config should look something like:
boot = /dev/sda
map = /boot/.map
delay = 50
vga = normal
image = /boot/bzImage-126.96.36.199
root = /dev/sda3
label = 188.8.131.52
Run parted and do:
- (the number of your partition, probably 3)
At the rEFIt startup screen, select the partition tool and sync the MBR.
With a bit of luck, rEFIt will give you the option to boot from lilo on the HD. You should now be booting into Linux. rEFIt has lots of options for setting the default etc. See it's website for more.
Getting X working
Using the new, modular X, you want to set VIDEO_CARDS=i810 in your /etc/make.conf and you need Xorg 7.1 to drive the 945GM found in the mini mac. To get that you may need ACCEPT_KEYWORDS=~x86
I needed some tricks to get the correct resolution because my panel size (1680x1050) isn't in the native list of video modes. If you need this, see instructions at
You can see my xorg.conf at http://www.imperialviolet.org/binary/macmini/xorg - note the odd ForceBIOS option for getting the resolution correct. The 915resoltion arguments I'm using are:
(yes, set 32-bit depth here and 24-bit depth in the xorg.conf).
|915resolution 5a 1680 1050 32 |
Getting sound working
The 184.108.40.206 kernel needs a patch to get the sound unmuted. Get it from here:
The madwifi.org drivers for the Atheros work perfectly. Follow the newbie HOWTO on that site.
If it all goes wrong
Then just reinstall OS X and try again.
Insert the OS X install CD and power on. Hold down 'c' to boot from the CD.
The installer seems to make little or no effort to partition a disk so, if there are no volumes given as a target to install to, don't panic. Select Terminal from the menu and use diskutil to repartition the disk. The command will be something like
|diskutil partitionDisk disk0 1 "Journaled HFS+" OSX 1M |