Subscribe to

I am a physical chemist working at the Oxford Centre for Clinical Magnetic Resonance Research and Merton College at the University of Oxford. Please follow one of the links above to find out more about me. The bar on the right of this page has links to other websites. Recent additions to my website are shown below.

Windows 7 is available for purchase at a discount from the Microsoft student and teacher “Ultimate Steal” website. This sounds great. Now to upgrade from 32-bit Vista to 64-bit Windows 7 you need to do a clean install. So far so good.

Unfortunately, Windows 7 will then tell you that

The following failure occurred while trying to use the product key:

The Software Licensing Service determined that this specified product
key can only be used for upgrading, not clean installations.


Even though this is an upgrade bought straight from Microsoft themselves, it doesn’t play ball… ;-(

The telephone activation people don’t know what to do but thank goodness, there’s a “simple” solution on the Microsoft website:

Digital River responded with instructions on how to correct problem.

Open regedit.exe with Start Menu Search and navigate to:

Change MediaBootInstall from “1″ to “0″.

Close RegEdit.

Start Menu on the Command Line utility. Right-click this shortcut and choose “Run as administrator.”
Click Yes to the UAC prompt.

In the command line window, type: slmgr /rearm press enter

wait for the “Command completed successfully” dialog.

Then, close the command line window and reboot.
After Windows 7 reboots, Right Click Computer select Properties select change product Key.
If the Key does not work now please contact Microsoft technical support at:

Phone: 1-800-MICROSOFT (1-800-642-7676)
Wow Digital River stepped up to fix my problem.

It seems a mighty kludge!!

Process substitution in bash

There’s a very clever syntax in bash (and several other unix shells) that allows the output / input for subcommands to be hooked together.

This can be used to secure mysql passwords in scripts. e.g.

mysql --defaults-file=<(
printf '[client]\npassword=%s\n' xxxPASSWORDHERExxx

Escape single quotes in bash

Some helpful instructions on Stuart Colville’s blog explain how to do this.

To produce e.g. abc'def, you need to enter

$echo 'abc'\''def'

The '\'' first closes the single quotes, then puts a literal (escaped) ' and then opens single quotes again.

I found a good set of instructions for connecting to the Eduroam Wifi service from the website of the University of Valencia. These work for me in Oxford. (Local mirror).

This Microsoft support article explains how to prevent annoying password prompts that appear when downloading documents from password protected websites using Word 2007.

Netgear WGT624 v4 router

It is possible to gain root access on this router.

You need to follow the telnetEnable procedure on the web, using the username/password Gearguy/Geardog as for the previous routers.

Then, you telnet to port 23 and will get a “login:” prompt. At that prompt you can log in with “root” and “5up”.

Once at the Linux shell, the following commands are available:

There’s also a command “cli” with username “ambit” and password “ambitdebug” for configuring NAT and the Firewall.

You can download some useful utilities that I compiled for the MIPS processor on this box from

and others from

These include “busybox” with many commands and “dropbear” which provides
an SSH server and client.

Netgear have changed the software running on this router considerably since v3, so you have to figure things out yourself and cannot rely on old step-by-step instructions on the web.

There is a command “cli” which gets you into an interface similar to that for the old v3 routers. That command will prompt for an additional username “ambit” and password “ambitdebug”. Run it by typing “cli” and pressing enter at the root prompt.

Photographs of the inside of this router are available here.

If anyone discovers how to flash this router with OpenWRT or if they manage to open arbitrary ports to the WAN port in the firewall, please do let me know.

Venison Toad-in-the-Hole

Serves 2


6 Sainsbury’s Taste-the-difference venison sausages
6oz plain flour
2 large eggs
pinch of salt & pepper
6 fl oz milk
4 fl oz water


1. Place sausages in a pyrex / ceramic dish about 15 x 25cm and 3cm deep.
2. Bake at 220 deg C for 20 min.

Meanwhile, make batter by
3. Mix together flour, salt & pepper in a large bowl.
4. Make a well in the centre.
5. Place in the eggs.
6. Begin to whisk on high speed with an electric mixer, the flour will begin to incorporate into the edge of the well.
7. Slowly add in the milk / water whilst mixing.

8. Remove sausages from over. Drain off juice and keep for gravy.
9. Pour the batter over the hot sausages and immediately return to the oven for 20-25 min to complete cooking.

10. Serve with green vegetables and gravy (beef gravy granules + water + juice from step 8).

Restore HP iPAQ

My HP iPAQ ran out of battery this morning. When I started it up, the memory was blank. When I tried to restore my files using Windows Mobile Device Center under Windows Vista, I got an annoying message saying that “Restore cannot be completed successfully. The selected backup file was created from a different type of mobile device.”


Fortunately, the kind people at had the solution:

You’ll see this under a couple of circumstances: either you’ve recently done a software upgrade (a new release of the operating system / ROM upgrade) and are trying to restore a backup that applies to the older software operating system. More commonly, you’ll see this after having reset your machine, and the device is set to a different region to the region in use when it was backed up (it defaults to US English). Go to ‘Settings > System > Regional settings’, and switch to the appropriate language.

In my case, I had to set the language to English (UK) and then restore ran smoothly.

I hope this helps someone.

I own a Netgear WGT624 v4 router. This router runs a MIPS embedded version of Linux and I was curious whether it is possible to get shell access.

So far, I have failed, but in case anyone else is interested, I did find these things:

  • There is a useful webpage with details about a similar router at
  • The latest firmware image is available from Netgear at
  • Root filesystem

    Using Fedora Core 9, it is possible to mount the root filesystem from this image.
    dd if=WGT624v4-V2.0.13_2.0.14.chk of=rootfs.image bs=1 skip=58
    mount rootfs.image /mnt/WGT624_rootfs -o loop

    Here is a tarball containing these files from the root filesystem.

    (It will be mounted using the squashfs LZMA filesystem.)

  • Telnet access

    The router has a back door from the local LAN. A telnet server can be activated using the telnetenable utility.

    Unfortunately, I do not know the username and password to log on to the router with telnet.

  • Root password

    There is a file in the above image called “shadow”, this holds an entry for the router root password:


    This is a FreeBSD MD5 password hash ($1$$zdlNHiCDxYDfeF4MZL.H3/) i.e. the MD5 checksum of the password is 7f1a6793eb3c3df9ac6a6460e5054c45.

    I have not yet been able to determine the password from this hash.

I scratched my flat screen (LCD or TFT) monitor some months ago. For a while, I’ve just lived with the damage. This evening, however, I tried a trick I found on the web. I rubbed hard on the scratch with a white pencil eraser. After about 3-4min vigorous rubbing, the deep scratches on my monitor have vanished. I can’t see them at all!

Next »