Rescue MBR in Ubuntu?

I made a stupid mistake and can't seem to rectify it. I have a dual-boot Win XP/Ubuntu 9.04 system. This morning I tried to upgrade the Ubuntu partition to 9.10 UNR, but the installation instead created a new partition for 9.10 alongside the existing ones. Here is where I did something dumb and things went badly wrong. Seeing no easy way to undo the installation, I deleted the 9.10 partition. When I rebooted, I got the message

GRUB loading
error: no such partition
grub rescue>

The grub rescue> prompt does not seem to recognize any commands. Using a live installation USB stick, I can get to a regular Ubuntu command prompt and can also load a desktop using the startx command. 'boot.ini' looks fine, as does menu.lst. The Windows partition is is sda1 and is flagged as bootable. The Linux partition is extended partition sda2 with sda5 as the subpartition where the file system sits and sda6 as the swap file.

I assume there is a straightforward way to recreate the MBR, and need someone to point me to it.