Difference between revisions of "Installing Linux on a mid-2010 MacBook Pro"

From WTFwiki
Jump to navigation Jump to search
Line 69: Line 69:
 
The better driver for the apple touchpad is the xf86-input-mtrack package from the AUR. The AUR are user-contributed package recipes  you build yourself:
 
The better driver for the apple touchpad is the xf86-input-mtrack package from the AUR. The AUR are user-contributed package recipes  you build yourself:
  
   pacman -S fakeroot base-devel
+
   pacman -S base-devel
  
 
And the dependencies for this actual package:
 
And the dependencies for this actual package:

Revision as of 22:02, 8 June 2012

Notes on installing Arch linux on a mid 2010 macbook pro, because I don't like OSX.

Partition the disk

  • Applications->Utilities->Disk Utility
  • Select your *drive*, not the 'Macintosh HD' partition
  • Click on the 'Partition' tab along the top
  • Drag and drop or type the size in the box to resize your OSX partition
  • Click apply

Install rEFIt

Change default boot order, optional

If you don't want refit to boot to OSX by default, edit /efi/refit/refit.conf and uncomment the 'legactfirst' option.

Installing Linux

I'm using Arch Linux. If you don't want to use that then things may become increasingly out of sync for you from now on.

Also note that you will want to use wired networking for setup, the wireless card probably won't work (yet).

After installing refit and burning a linux CD, *shutdown* the computer, a reboot is not good enough.

When you boot it back up, the refit bootsplash should show up. Use the partition inspector to sync the EFI partition table with the MBR.

Reboot from the refit menu and hold C down to boot from the linux CD.

Arch linux will display a GRUB prompt, just pick whatever the default is.

When you get a shell, run parted, you have to partition things manually.

 parted /dev/sda

Use 'print' to view the current partition table, and 'mkpart' to create partitions. You'll probably want to make a swap and a main partition, more if you feel ambitious, although I think having more than 4 partitions can cause headaches.

After doing this, you need to reboot and use refit's partition utility again to sync EFI and the MBR.

Reboot back into the Arch installer and do /arch/setup. Walk through the setup until it gets to 'Prepare Hard Drive'. Chose the 'Manually configure block devices' option and setup your swap and / partitions (they should be sda3 and sda4). Chose the right filesystems and mount points.

Continue on with the installation, chose GRUB as the bootloader when prompted. If you want to view detailed progress you can use fn-alt-f7 to switch to that virtual terminal, and fn-alt-f1 to switch back. I didn't bother installing anything other than the 'base' metapackage.

Do *NOT* setup the bootloader. Exit the installer and go back into refit and sync the partitions again (last time, I promise). Then boot back into the arch shell:

 mount /dev/sda4 /mnt
 mount -o bind /dev /mnt/dev
 chroot /mnt
 grub

At the grub shell, do the following (I assume your linux / partition is sda4):

 root (hd0,3)
 setup (hd0,3)
 quit

Reboot again, and the linux option should boot you into grub, from whence you can boot into linux.

Configuring all the hardware

You might have to fiddle around with the GPG stuff for pacman (arch linux's package manager). You can look here for details: https://wiki.archlinux.org/index.php/Pacman-key Basically I had to pacman-key --init (and give it LOTS of entropy on the keyboard) and then run the command from that page to import the 5 master keys. Alternatively you can edit /etc/pacman.config and set SigLevel=Never for everything.

X11

I prefer openbox as a window manager, so here's how I got it going

 pacman -S xorg-server xorg-xinit xterm nvidia

You'll need to reboot after installing the nvidia module, apparently.

Then you should be able to start an ugly default X11 environment with 'xinit'.

Touchpad

The better driver for the apple touchpad is the xf86-input-mtrack package from the AUR. The AUR are user-contributed package recipes you build yourself:

 pacman -S base-devel

And the dependencies for this actual package:

 pacman -S git xorg-server-devel mtdev

Download the tarball from https://aur.archlinux.org/packages.php?ID=48505 untar it, cd into the created directory and run 'makepkg'. A package tarball should be created, which you can install by doing

 pacman -U xf86-input-mtrack-git-20120604-1-x86_64.pkg.tar.xz

This is what my /etc/X11/xorg.conf.f/10-mtrack.conf looks like:

 Section "InputClass"
   MatchIsTouchpad "on"
   Identifier "Touchpads"
   Driver "mtrack"
   Option "Sensitivity" "0.5"
   Option "TapButton1" "0"
   Option "TapButton2" "0"
   Option "TapButton3" "0"
   Option "TapButton4" "0"
 EndSection

It makes things less squirrely and disables tapping to trigger a button click, you have to actually press down.

Audio

Make sure you're in the 'audio' group. Audio pretty much works out of the box. You might want to install pommed to get the audio shortcuts on the keyboard working.

Pommed

Pommed is a little tool that lets you use the F-row keys to do the secondary functions like on OSX, adjust volume, brightness, etc. You can find it in the AUR at http://aur.archlinux.org/packages.php?ID=14833

Wireless

Recent kernels support the broadcom chipset used in the mid-2010 macbooks out of the box, to deal with WPA you can use something like wicd, which makes dealing with wpa-supplicant less agonizing.