So the drive previously worked with that computer & configuration, but now has problems?
Intermittent problems like that (especially with an old/heavily used drive),are probably a sign the drive is unwell.
You can try cleaning the lens. Sometimes that helps with old drives. The cleaning discs you can buy usually scratch the lens. So if you are technically competent, a better method is to open the drive and use a cotton bud moistened with a little isopropyl alcohol.
Another possibility is a power supply problem to the drive. Some drives are very sensitive to low or unstable/fluctuating voltage. You can try plugging the drive into another line from the PSU, or try it with a different computer or PSU . Also, testing the voltage on the 5V & 12V lines, preferably under load using a electrical test meter (the voltages reported by motherboards are often inaccurate). Look at both the voltage & how stable it is.