Do as what The Sorcerer suggested.
Then check your rams with memtest86
http://www.memtest86.com/
Try with another single stick of DDR2 ram.
Check if HDD sata data & power cables are connected properly with the disk & mobo & reconnect them properly.
Check to see if your HDD is running in sata mode under bios.
Try another sata port on the mobo for the HDD.
Try with another IDE cable for the CD writer.
Try with a sata DVD writer.
Download & Install the latest drivers for your chipset, graphics & sound.