There is no “second configuration.” Other than a second partition, there is no place to store it. Trust me, I know…I have examined the filesystem layout of RouterOS and know where the config files are stored.
To me, It sounds more likely that you are not getting a “second configuration” but instead a BLANK configuration, as if RouterOS was unable to read the config files from the disk. When you reboot it, it tries a second time to read the config and is successful.
Here is a simple test you can run (make a backup first before you do this and copy the backup off-site so that you can upload and restore if something goes wrong!! Depending on what is causing this issue, this test could actually end up wiping out your config):
Next time you get this “second” (blank) configuration, make a simple change, like add an IP address. Then reboot the router. If your real configuration comes back and your change is not there, then try to get the router in a state where the “second” config is back. Once that happens, check for your change. If it is not there (and I doubt that it will be), and instead all config is gone again, then clearly it didn’t save your change to disk in this hypothetical place where a second config might exist. At this point, you know that you are dealing with an issue that is preventing the router from reading its config, and so it thinks it doesn’t have one. Then it presents you with a blank slate.
(It is possible that when you run this test, when you make a change to the system while the “blank” config is what is showing, that RouterOS will try to write the change that you just made to disk. If it is successful, it is possible that it might replace that subsection of the config with what you added, completely overwriting was used to be there. In other words, the next time you boot it up to get your config back, you might find that all of your config is there except all of your IP addresses got wiped out, with the exception of the one you added while everything was blank.)
Regardless of the outcome, you are most likely dealing either with defective hardware (bad flash chip, or flash controller, or something), or a filesystem that is not in a good and consistent state. If it is the latter, about the only thing that is going to solve that is a format and Netinstall.
– Nathan