I did a little research. Turns out your motherboard is not one of the latest and greatest boards from ASRock. The board has more than its fair share of problems and issues. Fairly well documented. Biggest problem seems to be the cpu socket. Some of the pins in the socket might be bad and cause random failures.
As for the BIOS resetting the primary drive, the most common problem is a sudden drop in voltage.
The next question is what is the brand and model of your power supply?