Try setting the HDD to cable select instead of master. Then connect it to the primary ide channel on the motherboard and make sure the HDD is connected to the end connector on the IDE cable.
Then set the CD drive as the FIRST boot device... pop in your OS cd and boot from it to run the REPAIR feature.
Here is how:
Repair Reinstallation of Windows XP (using XP CD)