Just Follow The Following Steps..........:
Try with just the old HDD connected as the master first the solutions below. With sata in IDE mode.
1. Can you boot into safe mode to verify it's not a device driver problem? Hit 'F8' repeatedly during boot and choose 'Safe mode' at the boot menu.
2. Otherwise, make sure you properly boot to the Windows XP CD. (You may need to enter your BIOS setup to change your boot order eg '1st Boot Device' to CD-ROM and make sure the '2nd Boot Device' is Harddisk. Once you see the 'Welcome to Setup' screen, press 'R' to go to the Recovery Console and select your windows installation. Then type "chkdsk /p /f" without the quotes and try to boot into windows after that.
3. If that doesn't work, you may want to do an 'in-place' upgrade. Boot to the windows XP CD, press 'ENTER' and then 'F8' to accept the EULA, and then press 'R' to 'repair' your windows installation. You will need to update windows through windows update after it's done.
4. If the above solutions don't work, connect the 2nd hard disk as master and disconnect the old HDD. Then, try to install windows on the new HDD by booting to the CD. If the install is successful, connect up the old HDD as slave (you may need to make sure the master/slave setting on the drive is correct or use cable select for both) and run the 'Error Checking' tool in windows by right clicking the old HDD in explorer, and select 'Properties' and the Tools' tab.