Does this machine boot from disc?
If so reseat/replug the hdd.
If no help then you have a choice.
Replace the hdd or take it to the repair counter and get and estimate or buy a new machine.
I was writing an essay and a blue screen with an error randomly poped up. I waited a couple of minutes and nothing happened so I turned it off and when I turned it back on after the hp logo a black page saying it couldn't boot becuase the hard drive is missing or doesn't have windows installed. I hit f2 and tested the hard drive. It said the hard drive is missing or unpluged. It is a HP 15-bs015dx.