2010-01-18

Ubuntu on the Dell Adamo

I went ahead and got the Adamo from Dell, so here’s my review of it, and what I did to set it up and get it work­ing the way I wanted.

Firstly, on the hard­ware: AC adapters is the weak point of this guy. For my old MacBook, I had three: one in my bag, one at home, one at the office. While it was a decent extra cost, it was one I under­took after I for­got my adapter a cou­ple times and had to go with­out for a while — some­thing that every­one with a lap­top deals with at some point.

This was par­tic­u­larly a pain since the one that Dell shipped with the lap­top died after the first charge — which meant another three days of being unable to use it after I received it. Not cool, Dell.

With the power sup­ply prob­lem fixed, I moved on to get­ting Linux on the thing. The thing ships with Windows 7, which I wanted to keep on there as an option, and there’s enough travel and sen­si­tive work stuff that I do on my lap­tops to jus­tify encrypt­ing the disk, which requires using the Ubuntu alter­na­tive installer. I also wanted to use LVM for my disks for when I start run­ning out of space and want to shrink the Windows partition.

The way to make this work is non-obvious, and it required two attempts to get going:

  1. Resize the Windows par­ti­tion to some­thing less than the full disk. I chose to give it 100G, and allo­cate the rest for Linux. This works out of the box in the installer, which is nice.
  2. Setup LVM on the remain­ing space next.
    • 200M for a /boot partition
    • 20G for swap (SSD disk means I assume that hit­ting swap is nowhere near as painful as it used to be)
    • The rest for a root partitiion.
  3. Setup encrypted vol­umes on the LVM par­ti­tions you cre­ated for root and swap (not /boot). You want to encrypt your swap as well, because Linux isn’t going to zero-out your swap vol­ume when you shut­down, mak­ing it effec­tively an on-disk mem­ory dump of what­ever your appli­ca­tions were doing…

I tried set­ting up sin­gle root/swap par­ti­tions on top of a sin­gle large encrypted vol­ume, but Ubuntu aparently requires your /boot par­ti­tion be un-encrypted, so there wasn’t an obvi­ous way to boot it after doing so…

With that issue out of the way, the rest of the instal­la­tion went smoothly and things booted just fine. I’ll note that Windows 7 boots much faster than Ubuntu 9.10, but I’ve only actu­ally booted the thing from a POST onwards a few times in the last cou­ple weeks, so who cares? The time it takes to resume from sleep is much more impor­tant for a lap­top, honestly.

With every­thing installed, I used rsync to copy my doc­u­ments and such off my old lap­top. I had enough disk to rsync my music col­lec­tion off of my world book, so I went ahead and did that too, and I’ve writ­ten a sim­ple upstart con­fig that per­forms the rsync prop­erly when the net­work comes back:

#!/bin/bash
# Script to dispatch NetworkManager events
#
# Runs rsync when WiFi or ethernet is connected.

set -x

if [ -z "$1" ]; then
    echo "$0: called with no interface" 1>&2
    exit 1;
fi

# Fake ifupdown environment
export IFACE="$1"
export ACTION="$2"
export USERNAME="me"
export REMOTE_USERNAME="me"
export REMOTE_HOST="stuff.mine.nu"

case "$ACTION" in
    up)
	if [ "$IFACE" = "eth0" -o "$IFACE" = "wlan0" ]; then
		if [ -z "$(pidof rsync)" ]; then
			sudo -n -u $USERNAME rsync -a /home/$USERNAME/Music/* $REMOTE_USERNAME@$REMOTE_HOST:/shares/internal/MUSIC
		fi
	fi
	;;
esac

I used to try and just mount the drive via SSHfs/nautilus and play via Rhythmbox, but it would skip the first 30 sec­onds of the song, requir­ing man­ual inter­ven­tion every three minutes.

After that comes the cus­tom repos­i­to­ries I’m using to add a lit­tle snazz­i­ness and breakage:

ppa:ricotz/testing
Latest and great­est GNOME Shell
ppa:telepathy/ppa
Bleeding Edge Telepathy/Empathy (my at-work XMPP server man­ages to con­sis­tently crash Empathy)
ppa:ubuntu-mozilla-daily/ppa
Nightlies of Firefox 3.6
ppa:cmsj/lifesaver
Lifesaver screen­saver, search term “#fml” ;-)
ppa:chromium-daily/ppa
Chromium Web Browser nightly builds

Comment on this...