I suggest that you
read up on the Linux boot process.
A few comments:
The OS cannot load files
from RAM because, at time of boot, RAM is not populated. Rather, the boot process loads files, such as elements of the Linux kernel,
into RAM in order to start the boot process and operate the computer.
History is not stored in RAM. It's stored on disk in various configuration and cached files. Your browser history, for example, is stored in the
browser cache. Your command history, if you are using bash, is stored in a dot-config (that, is hidden--all that "hidden" means is that the file does not display unless you ask it to) file called .bash_history. And so on.
As for your third question, what type of mistakes are you referring to?