The sata connectors that attach to the sata drives have NO locking mechanism on them, just a little friction.
Just working around inside your case, you can loosen the data or power cable. Then the drive will sort of come and go.
Usually its the drive end of the data cable that's the real bugaboo.
I've taken to securing those data cables to the drive with HOT GLUE
In some cases, I've even had to replace the sata data cable to get a good connection.
Secondly, I'd remove all power from the system and then take out the cmos battery for about a half hour. That completely resets the bios.
Then replace the battery and restore system power.
Reset your date and time and boot order.
Somewhere along there, you should have the problem fixed.