Fixing initrd to Regain Ubuntu Encrypted Root Prompt on Boot

2012-09-24
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.

Correcting iPhone photo filenames

2012-06-10
Sometimes, when uploading photos from my iPhone’s camera roll (for example, when using Dropbox), the photo filename format ends up looking like this: Photo 16-03-2012 21 21 10.jpg This isn’t very nice. Much better to have something in ISO-8601 format, which sorts nicely in file listings, and so on. So I wrote a quick bash script to search for all the files in the current directory (and subdirectories), and rename them to this style:

Compiling FlightGear 2.4.0 for Ubuntu Linux 10.04 (Lucid)

2011-08-17
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.

CyanogenMod on HTC Desire on Orange UK

2011-06-05
I installed CyanogenMod on my HTC Desire about a week ago in an attempt to get rid of some of the crapware that Orange UK are notorious for installing, and get a snappier, cleaner phone. I won’t repeat the excellent CyanogenMod install instructions, which you can find here. However, here are some points that might help you if you’re doing something similar: The OS (Android) firmware and the radio firmware are two separate things.

Windows 7 64-bit on VMWare on Ubuntu Hangs on Boot-up

2011-03-20
I recently tried to install Windows 7 64-bit on VMWare Workstation 7.1.3 on top of Ubuntu 10.04 as a host. I found that it behaved quite unreliably once the VMWare tools were installed into the guest OS - in particular, it regularly hung on boot-up. However, once I saw this error message, which clued me into the problem: ![]({{ site.blog_root }}/images/Selection_001_vmware.png) I discovered that the solution was to disable 3D graphics acceleration - in the VM’s settings, untick Display / Accelerate 3D Graphics.

How to Travel

2011-01-04
After three years of travel as a consultant to many cities across 14 countries, and many other personal trips and holidays, it seemed to be about time to write down what I’ve learnt about travel – both for work and pleasure. These tips are the guidelines I lay out for myself – which I don’t always follow – and they might not work for you. But I’ve found they’ve helped get more out of the places I visit, and I come back feeling like I’ve seen something of the world.

Orange/T-Mobile Roaming

2010-10-16
I recently started using Orange’s new roaming service that allows you to roam on T-Mobile’s network, in the same way as you might roam around networks when you are abroad. So far experiences are very positive. The phone remains on Orange most of the time, which is fortunate as 3G/HSxPA signals are only available via the Orange network. However, when a signal isn’t available, it seems to roam fairly quickly and efficiently onto T-Mobile’s network.

The Song of Lunch

2010-10-09
Just watched The Song of Lunch on BBC iPlayer. Catch it before it disappears. An excellent little mini-film, starring the classic and highly-talented Alan Rickman and the beautiful Emma Thompson, it is based on a poem by Christopher Reid. It’s almost entirely sensuous: based around the sights, the sounds, and the baser senses of revisiting a former lover. I really enjoyed it, and it didn’t bore me for any of its 45 short minutes.

Turning off Resume from Hibernation in Ubuntu 10.04

2010-10-03
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.

Huawei K4505 with Ubuntu 10.04

2010-07-30
I just acquired a new Vodafone Mobile Broadband modem to replace an aging ExpressCard version I had that wasn’t working too well. It came in the form of a Vodafone-branded Huawei K4505 USB stick. It didn’t work completely out-of-the-box with Ubuntu 10.04, at first appearing unrecognisable. After some hunting, I discovered that these sticks initially present themselves as USB Mass Storage to allow you to install the Windows drivers. You have to give a few magic incantations on Linux to make them switch into modem mode:
[tags]