I'm not an official on this, but this has happened to me twice before. The first time, I was able to access my computer by refreshing it from the menu that pops up after the first two failed bootups. While I was relieved to use my computer again, I also discovered that the refresh had deleted such desktop programs as Firefox, and with it, all of my bookmarks and history. I was forced to restore all of them manually.
The second time this problem came up, I was in despair at losing everything again, but I looked at all of the options and finally chose to try starting up my computer in Safe Mode. It started without a problem, and I then restarted it, hoping the notification wouldn't pop up again. It didn't. I didn't lose anything. Assuming this wasn't a chance of luck, I recommend this method. I only wish I had seen it somewhere on here before resorting to desperate measures the first time.
In short:
- Don't refresh or restore your computer to factory settings
- If error message continues to appear, turn off computer, turn on computer, wait for error message to show up again, turn off computer, turn on computer. This should cause a different message to pop up, offering advanced settings
- Under advanced options, find option for restarting computer under different settings (one of them should be safe mode)
- restart computer
- when message pops up (it will offer different choices for modifying the computer startup), hit 4 key (or different, if the safe mode option is attached to a different number)
- allow computer to start in safe mode
- restart computer
Hopefully when your computer restarts after safe mode, it will be as if nothing happened at all.
As for stopping it from happening again, I have no advice, sorry.