Browsing This
Macintoo (MacBook Pro + Gentoo)
I think it’s about time I make the MacBook much more useful by throwing Gentoo on it. The process of this is somewhat complicated, as there’s a few differences between a Mac and your typical x86/x64 machine. First, let’s get the basics out of the way:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU T8300 @ 2.40GHz
stepping : 6
cpu MHz : 2400.000
cache size : 3072 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cm pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm const _tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx est tm2 ssse3 cx16 pr sse4_1 lahf_lm
bogomips : 4787.75
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)
00:1c.5 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA IDE Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
01:00.0 VGA compatible controller: nVidia Corporation GeForce 8600M GT (rev a1)
0b:00.0 Network controller: Broadcom Corporation BCM4328 802.11a/b/g/n (rev 05)
0c:00.0 Ethernet controller: Marvell Technology Group Ltd. Marvell Yukon 88E8058 PCI-E Gigabit Ethernet Controller (rev 13)
0d:03.0 FireWire (IEEE 1394): Texas Instruments TSB82AA2 IEEE-1394b Link Layer Controller (rev 02)
Bootstrap/Setup
I thought this part was going to be complicated, since I’ve never worked with EFI before. Turns out it’s not that bad. First I booted into OS X and used BootCamp to make a 40GB “Windows” partition. Then I rebooted. When I first started the install, the Gentoo CD (used 2007.0) always stalled trying to mount the CD. The solution to that was downloading an .iso of a newer kernel. I heard Ubuntu had worked, so I downloaded the Kubuntu live cd (hey, it had KDE4, and I wanted to check it out without having to destroy my portage with keywords). Once the systrem was up, I went old school and made my /mnt/gentoo folder and pretty much followed the standard Gentoo install as usual:
- Downloaded sources and portage
- Used a single partition scheme (see below)
- Rebuilt system
- Set up kernel (gentoo-sources works fine)
- Set up grub (.97 or higher–this is already set)
Because Intel Mac’s use EFI instead of a normal partition table, the first partition on the hard disk is dedicated to EFI. That means the partitioning scheme was:
Partition 1: EFI
Partition 2: OS X HFS+
Partition 3: ext3 partition
I used ext3 because I wanted the file system to work with grub. Boot Camp set up only one more partition, and I didn’t want to change anything up, so I went with the standard 3 partitions. For swap space, I just set up a 512MB file on the partition:
dd if=/dev/zero of=/mnt/gentoo/swap bs=1024 count=524288
mkswap /mnt/gentoo/swap
swapon /mnt/gentoo/swap
Once the system was built (don’t forget SATA and SCSI drivers for the hard drive!), I rebooted, not surprised that my new Gentoo install was available from the boot loader screen. The solution was to boot into OS X, install rEFIt, reboot, and boot into Gentoo (yes, it really was that easy). rEFIt replaces the bootloader that’s included with Boot Camp, and it works beautifully.
Now that the system was built, I’ve started the long and tedious process of xorg/kde/gnome/etc. Once that is complete, I’ll set up everything else.
Huzzah!
(to be continued)