What is happening when I run a persistent storage live USB from RAM?

I've got a persistent live USB set up that I'm running Ubuntu 14.04 off of. When I boot up my computer, I'm given the option of running the persistent live USB or running the persistent live USB "from RAM". My understanding is that with the first option "everything" will be read off the USB (which will be very slow), whereas with the second option "everything" will be read off the USB and put into RAM (which will be very fast).

Is this correct? If so, can someone narrow down what "everything" means? Is it just the OS that gets read into memory, or are all the persistent files also read into RAM? Conversely, if I choose not to use the "from RAM" option, what is read from the USB and what is read into the PC's memory? Also, at what point are any new files I've added written to the USB if I'm using the "from RAM mode"? Is it just at shutdown? If that's the case, what happens if my computer shuts off unexpectedly? Would I lose any files I've created in the current session?


The boot option toram makes the system read everything from the system image into RAM during boot. It means that the boot process in slower, but after that the system will be fast. It also means that /cdrom need not be mounted, and if it is a live-only drive, it can be removed or overwritten (for example installed into). But if there is a casper-rw partition or file there and you are running a persistent live session, obviously it is a bad idea to remove the drive.

Otherwise (without toram) the system image is mounted at /cdrom and programs and data are read from there, when needed (which is slower than to read from RAM).


The persistent overlay, which is read from casper-rw is managed independently of the toram boot option.