Fixing initrd to Regain Ubuntu Encrypted Root Prompt on Boot

Recently, I upgraded my Ubuntu 12.04 server, which uses an encrypted root directory (with LVM and LUKS). Unfortunately, somewhere along the way the upgrade broke the boot process - next time I booted, it hung for 5 seconds, then timed out and dropped to a BusyBox prompt. I quickly found a workaround which allowed me to manually intervene and continue the boot each time: cryptsetup luksOpen /dev/sda5 root exit Of course, however, I didn’t want to intervene on every boot, especially since this is normally a headless server.

Compiling FlightGear 2.4.0 for Ubuntu Linux 10.04 (Lucid)

Update 2011-08-26: If you are using Ubuntu 11.04 or later, it looks like this is now packaged as a .deb by PlayDeb. This post may still be of interest to those using earlier versions of Ubuntu. I recently had cause to install FlightGear 2.4.0 on Ubuntu 10.04. It’s not packaged in the form of a deb yet, so I’ve documented the commands I used. No guarantees this’ll work for you, as I haven’t tested them rigorously; and I’m assuming some Linux and command-line knowledge.

Turning off Resume from Hibernation in Ubuntu 10.04

I use dm-crypt on all my machines now, including laptops, to provide full-disk encryption. I also use it to encrypt swap partitions with a randomly-generated key. All of these are features that Ubuntu 10.04 provides out-of-the-box, at least when you use the alternate CD to install. I also recently installed µswsusp on one of my laptops, a userspace hibernation facility. I didn’t really connect the dots until one day I left the laptop running, coming back to find it hibernated.

HTC Desire - Bad Points

Recently I acquired an HTC Desire, when seems to be the de-facto Android phone of the moment__. Generally, I love this phone - I wrote part of this blog post on it, and the quality of the hardware is frankly astonishing. Irritatingly, one can’t help but feel a little smug comparing it to the iPhone. However, I don’t want to become yet another mindless gushing fan. So instead of raving about it, I thought I’d provide some provide some constructive criticism on the aspects of the phone I don’t like so much:

Logitech Presenter R800 with USB HID in Windows XP SP3

I recently acquired a Logitech Presenter R800. It’s a beautiful device - not particularly cheap, but very slick and easy-to-use. Unfortunately, Windows XP (Service Pack 3) on my system refused to recognise it - the device was listed as USB Receiver in Windows Device Manager, but Windows kept claiming it couldn’t find the driver. It is presented to the system as a standard USB HID device, so there is no Logitech-specific driver: it uses the standard Windows HID Driver.

Connecting Google Reader and podget

For some time, I’ve had a Perl script that runs regularly, backing up my Google Reader subscriptions using the standard OPML format: #!/usr/bin/perl # # Usage: # backup-google-reader-opml file-to-write-to.opml google-password use strict; use warnings; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get("") or die "Cannot reach Google Reader Homepage"; $mech->submit_form( form_number => 1, fields => { Email => $ARGV[1], Passwd => $ARGV[2] } ) or die "Cannot submit form"; $mech->get(""); $mech->save_content($ARGV[0]); However, I recently wrote another script (this time Python) that then takes this OPML, parses out all the URLs that are tagged with ‘podcast’, and outputs a serverlist file for podget (an automated console-based podcast downloader).

Reinstalling The Thinkpad

My work Thinkpad (a T61) was becoming a little crufty, so I decided to reinstall it from scratch. Here are a few lessons I learnt along the way: Making a hot copy of your entire drive onto a USB hard disk with VMWare Converter beforehand is a great idea. This basically means you have your entire previous installation still bootable, so you can rescue any data or settings you forgot about, after you’ve done the reformat and reinstall.

New Delicious - For Mobile Once Again

Used to be, I employed a cunning trick I found on the web to create a quick ‘n’ dirty homepage for my browser on my mobile - all the delicious bookmarks I’d tagged with mtag. Then delicious went and released a new version and this trick broke. After a bit of fiddling, I’ve found a reasonable alternative. feed.informer will take any RSS feed and turn it into fairly plain HTML. So take your RSS feed, which might look something like this:

LaTeX Tips

A general grab-bag of tips for using LaTeX, from the days when I still used it a lot: To add nice headers and footers to each page use the fancyhdr package. Use glosstex for most acronym and glossary needs. Use the hyphenat package if you need monospace text (such as that set by the \texttt command) to wrap correctly, with hyphenation marks. The varioref package provides easy-to-use cross referencing with automatic phrases such as ‘on the following page…’ etc.

Picasa and RAW Bug

Note to self and others: never use Picasa to download photos direct from the camera when using RAW+JPEG. It has a nasty habit of downloading the JPEGs, then deleting the RAWs. Ouch. Always use a card reader on the Compact Flash card instead.