Ubuntu breathes new life into old MacBook

Posted on 2012-10-23 18:27

Last year when I got an HP EliteBook for work I thought my days with the old MacBook were numbered. The MacBook isn't that old, its a 2009 Core 2 Duo aluminum body 13" model, but the EliteBook's iCore 5 was is faster. The Mac screen is better, but not by very much. Both processors support VTx which helps a bit when running Virtual machines. A big factor for me was the OS - I had set the EliteBook up with Ubuntu 11.04 (and upgraded it several times till it was running the latest 12.04 LTS), and I was constantly being annoyed by OSX every time I went back to it. Eventually I stopped using the MacBook almost entirely. Once in a great while I'd come across a task that was easier on the Mac - making movies for instance, something I've been able to work around in Ubuntu but never equal for the ease and utility of iMovie. But then the EliteBook died. Yes, it was fixed and returned, but my confidence in it had died as well. I moved back into the Mac and used the EliteBook for meetings and other drudgery. Eventually my annoyance with OSX grew and I eventually realized that I really had no need to keep OSX on the MacBook.

I had already upgraded the hard drive to a 500GB model (louder, but works well) but the version of OSX on the machine was 10.5 (several versions behind) and I wasn't getting updates anymore anyway, so this weekend I decided to take the plunge and get Ubuntu 12.04.1 LTS running on it.

I started off trying to get Ubuntu and OSX to live happily side by side, but soon found that my drive had an APM partition table (Apple proprietary BS) which wasn't going to be able to boot Linux. After I had a full backup of the drive, I soon had that switched to GPT (which also meant the drive was effectively wiped). sudo parted -l shows my current partition table:

Model: ATA Hitachi HTS54505 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 2      1049kB  40.0GB  40.0GB  ext4
 3      40.0GB  40.0GB  10.5MB                        bios_grub
 4      40.0GB  496GB   456GB   ext4
 1      496GB   500GB   3999MB  linux-swap(v1)

I'm not going to try to document what I did here, there are enough good references out there for that, and your hardware and software will invariably be different from mine anyway. The whole process of getting Ubuntu set up on the Mac certainly wasn't painless, but it worked. I'm using an amd64-mac version of Ubuntu hidden in the bowels of their download site, and researching a variety of "MacTel" information pages on the web, I finally have a machine running a decent operating system with working brightness controls (auto-set to minimum at start-up), decent sound (I don't know what people were complaining about - sounds good to me and headphones work too), working wireless and 3D acceleration (with 3rd party Broadcom and nVidia drivers - boo), decent (though not perfect) touchpad setup (very close to original Mac feel though substituting CTRL+click for two finger tap), and last but not least - working L2TP VPN! This is still not working on the EliteBook or my ICS android tablet, but is working great on the Mac now under Ubuntu 12. Since the only alternative way of getting into the VPN was firing up a Virtual machine and connecting under Windows, this is really good news (for me). Setting up a LAMP server was literally one command, my gpg / enigmail Thunderbird + Lightning setup took only a few minutes to port over, Pictures imported into Shotwell without much of a hitch, Music into Rhythmbox did kick out a lot of metadata errors (mostly ancillary files it didn't know how to handle), and I'm back up and running. Still need to get my CVS server running (or port it over to SVN or GIT), and install some more software... lets see what I remember... Cheese (I use VLC for video capture now), OpenShot, Meld, wine (for games), several emulators for the junk load of ROMs I have (Atari, Mame, et al), Audacity, emacs, Virtualbox, Stella (for Atari games), mednafen (for NES Roms), XChat (IRC), mame (most other roms).

OK, gotta get back to work, but mostly settled in again.

update 130819

Did an update to 12.10 and then to 13.04 last night. I had been using xfce4 recently, but after the upgrade I ran into a bunch of errors under that desktop and have switched back to vanilla Ubuntu (Unity) for now. Also ran into a problem where I switched to nvidia driver 3.10 and ended up with just a black screen and blinking cursor. Luckily I was able to ssh in from the Transformer, purge all nvidia stuff, delete my xorg.conf, and reinstall nvidia-current (which defaults to 3.04) that way. The real pain was the brightness keys were's working, but found this solution which fixed me up quick. Needed xorg.conf back and a line in it to enable the brightness controls.