[NAME] , it seems like HDD lose signal.  You may want to try out low cost solution such as replacing a known good SATA cable.  If issue is unresolved, try to connect the drive to a different power connector.
Hi there. I have trouble with the HDD, when working, sometimes it reboots suddenly, and the OS does not boot, a message "checking media presence" is showed on screen. I turn the PC off, when turned on  again, the OS does not boot, until I unplug the SATA power connector and plug the connector back. I hope some of you can have an idea of what component is giving issues. thanks in advance. 
Optiplex 3060 SFF HDD fails sometimes, BIOS diagnostics says it is good