1

I am looking to use Linux for my college project on my laptop which has Windows installed. I am not looking to use Virtual machine on my laptop since I already tried it and it slows my laptop considerably ( I only have 4 GB on my laptop), so I am looking to use USB for my task. I wanted to know a few things about running Linux via USB. Where will my data be stored when I run Linux via USB? Will it be the USB memory or my own laptop HDD? Secondly, will removing and plugging the USB drive erase my data every time I do it? Thirdly, will I be able to use my laptop's original RAM memory or will it be something else?

I am absolutely a newbie in this field so maybe my questions may not have straightforward answers but it would be great if someone on this forum can help me.

Thanks!

  • USB flash drive or HDD/SSD and what size drive? UEFI or BIOS system? There are three ways to use USB. Live installer in live mode (no updates or data on flash drive & entire drive is erased with install to it), live installer with persistence (some data, no updates), or full install ( if drive is faster and larger). If you have Windows fast start up off, you can save to internal drive, but best to use separate NTFS shared data partition. https://askubuntu.com/questions/1217832/how-to-create-a-full-install-of-ubuntu-20-04-to-usb-device-step-by-step – oldfred Mar 06 '21 at 18:34
  • Live systems create a file-system in RAM and run from there, so all saved files are saved on a pseudo-disk in RAM by default; which is great, it lets you do things, then when you're done, a simple reboot & all evidence of what you did is gone. It also has limitations if you need to install large or multiple packages; as the created (ram) drive can fill & system become unstable over time.. (reboot and fast again). You can use network or local disk storage too (saving files there; my usual choice), or create & use persistent storage (on the thumb-drive if suitable), or install to thumb-drive.. – guiverc Mar 06 '21 at 22:05

1 Answers1

2

Full Install vs Persistent install

Ubuntu can be installed to a USB in different ways. A Live install extracts the OS from a compressed file and does not save between sessions.

A Persistent install extracts the OS from a compressed file and saves new data to an overlay file or partition each session, and to the hard drive if required.

A Full install installs the complete OS to the USB just like an install to internal disk. A full install USB can save data to it's root partition, it's /home partition, (if it exists) and to the hard drive.

Both Persistent and Full installs run mainly in the computers RAM. A Full install can use the computers Swap partition or The USB's swapfile once RAM runs out, (very slowly).

Comparison between Persistent and Full install USB

Advantages of a persistent install:

  1. You can use the persistent pendrive to install Ubuntu to another computer.

  2. A persistent install takes up less space on the pendrive.

  3. You can reset the pendrive by overwriting the old casper-rw file with a new one.

  4. The install to pendrive takes less time.

  5. Slightly less wear on the drive.

Advantages of a Full install:

  1. You can update and upgrade.

  2. If you have problems or wish to modify, the solution is the same as with an internal install, (You can ask for help in the forums).

  3. No ugly startup / install screen.

  4. Better security, you can use full encryption

  5. You can use proprietary drivers.

  6. Hibernation works.

  7. Many persistent installs are limited to a 4GB casper-rw and a 4GB home-rw persistence file, to get more persistence requires persistence partitions. Once casper-rw is full, the drive will not boot.

  8. More efficient usage of disk space. Does not require reserved space for persistence.

  9. Faster boot, no automatic disk checking or Try Ubuntu/Install Ubuntu screen.

  10. You can run VBox and use virtual machines.

  11. Generally faster boot than Live or Persistent USB's.

  12. More stable, better for day to day use.

Note that once booted, both methods run at about the same speed. If the computer has lots of RAM Ubuntu should run mainly in RAM and there will not be a big difference between running off internal HDD and USB3 flash drive.

Full Install Method

A quick and easy method to flash a Full install to USB can be found here: Easy Full Install USB that Boots both BIOS and UEFI

A more traditional methods for creating a Full install USB from scratch can be found here: How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step

C.S.Cameron
  • 19,519