First check the jumpers on your CD Rom. If it's a slave, make sure the jumper is on slave, and if its a master, make sure you put the jumper on Master. This will have a huge effect. But I doubt this is the problem since it was working for you previously. Jumpers just dont change their position on their own
Also check the IDE cable, they are very thin and susceptible to breaking. Try swapping out the IDE cable too.