Ubuntu on a MacBook 5,1

After posting my short review of Ubuntu 9.04 a couple of days ago, I felt that I had not done justice to it, nor to the effort I’ve poured into learning it. This post will attempt to both provide interested parties (myself included) with a complete reference, and chronicle my missteps in a (hopefully temporary) migration to Ubuntu.

First, set up your partitioning. I’ve been dual-booting Fedora 10 and Mac OS X on my MacBook for a pretty good while, so this was already done. If your MacBook has only OS X, you’ll want to follow the guide here to set up dual-booting with BootCamp, or if you’re sure Ubuntu is for you, then follow this guide to set up for single-booting. As I mentioned, I had Fedora 11 in a separate partition already, so I didn’t need to do any partitioning. At this point, be sure that you install rEFIt in OS X for dual-booting. If you want Ubuntu (or whatever you’re putting on your MacBook) to boot by default, uncomment the “legacyfirst” item at the end of refit.conf.

Now, go get Ubuntu. If you’ve got a MacBook and you’re reading this site using said MacBook, I recommend using BitTorrent, but you can also order a free CD or DVD. There are several options for which disk to order or which image download. I have installed Ubuntu to my MacBook using the Desktop and Alternate CDs. I tried using the “Minimal” CD

During the install, I chose to use four partitions as follows:

If you have more than 2GB of ram in your MacBook, you’ll want more than 2GB swap; with a laptop, you need an equal amount of swap space as ram to store an image for resuming from hibernation. If you don’t think you’ll ever reinstall your system, or you don’t care, you can also leave out the separate /home partition and just make / as big as possible. Partition it however you want; I know plenty of people who break out /usr, /var, and /tmp as well. Install the boot loader on /dev/sda; rEFIt will handle it best there.

***NOTE: Do not encrypt anything at this stage. If you opt for full-disk encryption, you’ll need to be able to type in a password during boot. The keyboard, which runs off the usbhid driver, will be unusable during the boot sequence if you want your trackpad to work. I want my trackpad to work, and I also want encryption. Encryption works (the linked guide is great), and the computer works until you blacklist usbhid; then it doesn’t work. You’ll have to reinstall your system because no USB keyboard will work and there is no PS/2 port on the MacBook.

After installation, you’ll want to follow the Ubuntu community guide for MacBooks and Jaunty; it’s pretty thorough and makes everything work. I had to fiddle around with the trackpad configuration file they provide to make it meet my expectations, but overall it’s a good guide. If you went the route I did and installed a command-line system from the Alternate disk, you’ll want to plug in an ethernet connection and run the first command from the Ubuntu-Desktop-Minimal script to set up a GNOME environment, and to enable laptop mode as in the guide for battery saving, you’ll need the package acpi-support as well. Last thing the guide skips over is installing flash and DVD playback. Luckily, flash is installed the same way as in Fedora 10, and libdvdcss2 is available for easy download. I modified the minimal desktop command heavily to get my preferred FVWM desktop up and running as well. You’ll have to add the Dropbox Ubuntu repositories before you can run it.

sudo apt-get install conky fast-user-switch-applet fvwm gimp keepassx mrxvt nautilus-actions nautilus-cd-burner nautilus-dropbox nautilus-image-converter nautilus-open-terminal network-manager pidgin pidgin-otr transmission trayer vim-gtk vlc wireless-tools x11-xfs-utils xfs

I found a “tutorial” on installing SELinux in Ubuntu 8.04, which purported to work for 9.04 as well, but I haven’t seen any indication that SELinux is working and apt-get wants to remove it for me any chance it gets, so I don’t recommend SELinux at this point. I haven’t had a chance to look into AppArmor, but whatever.

The NotifyOSD package in Jaunty provides slick system-wide notifications for pidgin, firefox, transmission, and other apps, but they’re too slick ("wow, what a disaster"). I recommend removing the package and sticking with the regular notification-daemon package, since it is configurable on the application level and the notifications respond to clicks. What I’d really like to use is something like mumbles, but I tried it, had no success, and eventually uninstalled.

To use Google software, such as Picasa, you’ll want to add the Google software repos to /etc/apt/sources.list, then install the Google key and update apt using the two commands below:

wget -q -O - | sudo apt-key add - sudo apt-get update

At this point my main gripes with Ubuntu are threefold:

  1. No full-disk encryption (with the MacBook). I’m pretty unsure about the user home directory encryption I’ve got right now. Documentation is sparse and it’s apparently not overly strong encryption.
  2. Printing. I have a Canon MP210 printer/scanner. It works in Fedora, since the i386 drivers provided by Canon can be installed on an x86_64 system. Not so in Ubuntu, at least that I’ve been able to find.
  3. SELinux. I’d really like to have it back.

Any other tips/tricks/comments? Anyone know how to get SELinux or my printer working? Any workarounds for blacklisting the usbhid driver and still being able to get a password typed in to unlock encrypted partitions?