If the CD drive is detected/works properly where it was originally
connected as the slave, and if (something you didn't qualify to us) the
new HD is detected/works connected to the second IDE cable, why bother
changing which cable anything is connected too.
If you insist, you can first try uninstalling the CD drive in Device
Manager and the Controller(s) it's associated with, reboot and they will
be re-detected/re-installed.
If that fails to bring joy, you could try uninstalling all
drives/controllers, reboot and see if that sorts it out.
Perhaps one of these may help:
CD-ROM access is missing and messages cite error code 31, code 32, code
19, code 39, or code 41 after you remove Easy CD Creator in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314060
CD-ROM drive or DVD-ROM drive appears to be missing after you install
Windows XP or Windows Vista Beta 2
http://support.microsoft.com/kb/320553/en-us
How to troubleshoot unknown devices that are listed in Device Manager in
Windows XP
http://support.microsoft.com/kb/314464/en-us
Troubleshooting Device Conflicts with Device Manager
http://support.microsoft.com/kb/310126/
Explanation of error codes generated by Device Manager in Microsoft
Windows XP Professional
(Also applies to XP Pro x64 and XP Home)
http://support.microsoft.com/kb/310123
How to manage devices in Windows XP
http://support.microsoft.com/kb/283658/en-us
If none of the above brings joy, the only other thing I can think of at
this moment is to delete everything in the Right pane, Except the Default,
from the registry key:
HKLM\System\Mounted Devices. Close out of the registry, reboot and the
drives will be re-enumerated. Before even attempting this procedure make
sure you have a complete backup of your system to restore in the event
something should go wrong. Also make a backup of the registry key by
exporting it to where you can get at it easily in the event something goes
bad yet Windows still boots, you can then import the saved backup back
into the registry.
Always backup the registry or any key before making any changes so that
you may import the keys back in should anything go wrong. Haphazardly
removing keys in the registry is very dangerous and can render your system
useless. Be 100% sure of what you are doing and what you remove can be
done safely.
How to back up, edit, and restore the registry in Windows XP and Windows
Server 2003
http://support.microsoft.com/kb/322756/en-us
Description of the Microsoft Windows registry
http://support.microsoft.com/kb/256986/en-us