|If it doesn't appear in your bios and you're sure it appeared there before (older bioses may show no evidence that they detect an optical drive), it can't appear in your operating system.|
If it's a desktop computer
- make sure the power connector to it is plugged in all the way.
- If your PS is not putting out enough of what is supposed to be an accurate +5v, your floppy drive (if you have one), your optical drives, your USB controllers , your PS/2 keyboard and mouse, and your serial ports cannot work properly, and the floppy and optical drives may not be detected by the bios. If your PS is putting out too much of what is supposed to be an accurate +5v, that will damage the floppy drive and the optical drive's logic board in a short time, and after more time your USB controllers and other things that require an accurate +5v.
Failing power supplies are common and can cause your symptoms.
Check your PS.
See response 4 in this:
If the PS is okay........
Start up the computer.
Let the computer get to the Windows desktop.
These tests don't require a working data cable connection - they only require the drive has 12v and 5v power and the computer is running.
Press the button on the front of the drive to see if it's tray will eject, retract - if it doesn't, it's fried, or something is broken inside of it that's jamming the tray, or it has a rubber belt that has broken (you can often see it just inside the front of the drive when the tray is ejected a bit when there is no disk - you can replace it with a suitably sized rubber band in a pinch).
If the led on the front of it never lights up when you press the button, it's fried.
Place a CD in the tray and retract the tray. The led on the front of it should come on briefly, then go out, and the CD should spin - if either doesn't happen it's fried.
If the led comes on and stays on for a lot longer than usual, or goes on and off for a lot longer than usuall, it's fried.
If it's an desktop IDE drive....
It is common to un-intentionally damage IDE data cables, especially while removing them - the 80 wire ones are more likely to be damaged. What usually happens is the cable is ripped at either edge and the wires there are either damaged or severed, often right at a connector or under it's cable clamp there, where it's hard to see - if a wire is severed but it's ends are touching, the connection is intermittant, rather than being reliable.
Another common thing is for the data cable to be separated from the connector contacts a bit after you have removed a cable - there should be no gap between the data cable and the connector - if there is press the cable against the connector to eliminate the gap.
80 wire data cables are also easily damaged at either edge if the cable is sharply creased at a fold in the cable.
Try another data cable if in doubt.
If it's a desktop SATA drive
Check your SATA data cables. The connector on each end should "latch" into the socket on the drive and on the mboard, or on the drive controller card - it should not move when you merely brush your hand against it near the socket - if it does, mere vibration can cause a poor connection of it - use another SATA data cable that does "latch", or tape the connector in place.
(There is a slight projection or bump on one side of the outside of the connector that "latches" it into the socket - it's easily broken off or damaged)