Can I boot a Live USB fully to RAM, allowing me to remove the disk?

I have a live USB made with the standard Ubuntu disk image creator for 16.04 LTS. In the current state, I can boot to this disk, but it still requires the original USB to run properly at all times.

Attempting to pull the drive and use the system generates a large amount of I/O errors, further suggesting that the USB drive is actually needed for things not already loaded into RAM (For example, Firefox worked without the USB, but I used it once before already. apt, on the other hand, did not.)

Is there a way to copy the entire Ubuntu live disk to RAM, so I can remove the drive and free up a USB slot for other things?


Solution 1:

You simply need to add the toram boot parameter in GRUB.

Here is how you can do that, tested (and screenshots taken) with an Ubuntu 16.04 64 bit desktop iso in a VM:

Boot in UEFI mode

Boot from the live DVD/USB and wait for the GRUB menu to appear.

enter image description here

Highlight Try Ubuntu without installing using / and then press E to edit the boot script.

enter image description here

Search for the line starting with linux and add the option toram right after (or instead of) quiet splash, as depicted above. Then press F10 to boot the modified script.

After Ubuntu has fully booted, you may eject/unmount the live DVD/USB device and continue using the system and all available programs.

Boot in BIOS/Legacy mode

Boot from the live DVD/USB and wait for the language selection boot menu to appear.

enter image description here

Select your language with / and confirm with Enter. The boot menu appears.

enter image description here

Use / to highlight Try Ubuntu without installing.

To make the editable Boot Options line appear, press F6 followed by Esc to close the little pop-up.

Then you can navigate the cursor in the Boot Options line using /. Search the quiet splash options and add the toram option after or instead of them, as depicted above.

Boot the modified configuration by simply pressing Enter.

After Ubuntu has fully booted, you may eject/unmount the live DVD/USB device and continue using the system and all available programs.