I'm trying to use Ubuntu 12.04 to transfer data from an unbootable hard-drive in Windows XP to a usb. Does the partition need to be mounted beforehand? Also, I read I could use ddrescue to perform the transfer but it doesn't seem operational on ubuntu 12.04. Any suggestions
You have two issues here, so I suggest you open a new question about ddrescue.
To perform any disk operation you need to mount the disk beforehand, because Ubuntu needs to know that the disk is in the computer to handle it. Being the disk with Windows XP unbootable does not mean you can not mount it, so if the disc is not already on your computer, do so.
After restarting your Ubuntu, it should recognize the new hard drive and mount it for you. If this is true, then simply just browse it with Nautilus and copy to USB you need.
If not, you need to manually mount the disk. If you do not know which device is the disk with Windows XP, type in terminal:
and you should end up with an output like this:
Certainly your output will be different, mine is in Brazilian Portuguese; nevertheless it is perceived that it is listing two disks, one on /dev/sda and the other on /dev/sdb. Probably the disk with Windows XP should be the second on your system, so your partition will be /dev/sdb1.
To mount it, first create a folder for that Ubuntu can view its contents:
Then mount the disk with
With this the disc content be available to be copied to an USB device.
I hope I have helped you.