Are you booting in from one of 2 hard drives at start-up .. ie. do you have a dual-boot system?
If your sound works fine when using the original hard drive but not when you boot from the slave, then it sounds like a driver problem -in the slave. You'll need to download the sound drivers for XP/Slave.
I can't think of any reason why your computer should beep after you have opened and closed the case. I don't think it is anything to do with the case. It's more likely that there's a bad connection or fault (maybe you have the slave and master on the wrong cable) - or badly fitted RAM.
Count the error beeps - there is a pattern of long and short beeps. You can find a list of their meanings here:
Though having said that, I would hazard a guess that you've got the master/slave configuration wrong. If you have both hard drives on one cable (ide) the MASTER drive should be at the end of the cable.
Remember there's a primary master (c) and a secondary master - your dvd drive. A 2nd hard drive would be set up to be the primary SLAVE. You cannot have 2 'master' drives on the same cable or bus. That would cause an error beep ...