11

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?

8

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.

8
  • What is included in the system image? Is the system image related to / based on the stuff in the casper-rw partition? It sounds like the main difference is that the "system image" is loaded into RAM vs read from the USB drive.
    – Adam
    Jan 7 '17 at 21:46
  • To state it briefly - the content of the iso file. There is a list 'md5sum.txt' (without toram seen at /cdrom/md5sum.txt), and it contains the file names of all files and their md5sums).
    – sudodus
    Jan 7 '17 at 21:52
  • Ok, so basically the operating system gets read into RAM, but anything in the casper-rw partition is still being read from the USB?
    – Adam
    Jan 7 '17 at 21:54
  • The file filesystem.squashfs is by far the biggest file, and it contains the all the programs and settings, that are not necessary for booting, but are extracted at a later stage.
    – sudodus
    Jan 7 '17 at 21:58
  • 1
    The boot toram option can be handy if you only have one flash drive. You can boot a Live, (no persistence), flash drive, then unmount the drive and, from RAM, install a Full system, or a Persistent system to it, (if you install mkusb to the Live drive). You need enough RAM for the amount of data on the Live drive. Mar 8 '20 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.