When I create a bootable USB stick (Ubuntu) on Windows, does it mean that the changes that I will do (let's say save a new file called "abc.txt" on the Ubuntu desktop) will those changes be reflected the next time I boot this USB on some other computer (I will see the file "abc.txt" on the Ubuntu desktop)?

Next one might be a pretty stupid question but here it is:

Will it use the computer's RAM or use the space left on the USB as RAM.



That's extremely easy if you use the following set-up:

  1. Use your existing bootable USB stick to install Ubuntu on an SLC USB stick (USB 3.0 preferred if your hardware supports it) Just a normal install, treating the USB stick as an SSD.

    Why? The SLCs are twice as expensive as the MLCs but they are 4 times faster and last 8* longer! So they really are small SSDs on a stick!

  2. Reboot from the USB and optimize the system and treat the USB stick as a small SSD, so:

    In your /etc/sysctl.conf add:

    # Fabby: change the "swappiness" to 10 to prevent swapping as much as possible
    # to not wear out the USB stick as the Ubuntu default is optimized for a server.
    # 10 to balance with vfs_cache_pressure
    vm.swappiness = 10
    # Fabby: Lower vfs_cache_pressure to 75% 
    # (once cached, probably not immediately needed any more)
    # This percentage value controls the tendency of the kernel to reclaim
    # the memory which is used for caching of directory and inode objects.
    # At the default value of vfs_cache_pressure=100 the kernel will attempt to
    # reclaim dentries and inodes at a "fair" rate with respect to pagecache and
    # swapcache reclaim.  Decreasing vfs_cache_pressure causes the kernel to prefer
    # to retain dentry and inode caches.
    vm.vfs_cache_pressure = 75
    # Fabby: Good to improve sequential reads (stop stuttering in movie play)
    # Can also be implemented per disk using udev rules

    In your /etc/fstab add the bold paramaters to your boot USB line. (It'll probably be sdc or sdd. The below is an example, use UID if possible)

    /dev/sdc / ext4 defaults,noatime,discard,errors=remount-ro 0 1

Done! :-)

For the record: I have a 16GB USB 2.0 SLC stick just like this (more then enough for my use-case and not too expensive and it's about 5 years old now and still running!)

  • As you've never accepted an answer before on this site: If this answer helped you, don't forget to click the grey at the left of this text, which means Yes, this answer is valid! ;-) – Fabby Aug 12 '15 at 23:42
  • You and your MLC stick :) – A.B. Aug 13 '15 at 18:09
  • @A.B. Oops, actually, it's an SLC one! Thanks! – Fabby Aug 13 '15 at 18:10
  • Is it applicable to SD-card too? – Suncatcher Apr 19 '18 at 19:12
  • There are no SLC high-speed SD-cards, so yes it's applicable, if you don't mind it being slow... @Suncatcher – Fabby Apr 19 '18 at 19:19

If you burn a live Linux image to the USB drive, it will be booted read-only and therefore changes will only be stored in RAM. If you're not prepared to give up hard drive space to Ubuntu, you can burn the ISO to a second flash drive (even 2 GB is enough), boot it and install it to the 32 GB drive. I did that when 14.10 was in Alpha, and while it did suffer some performance issues, it was usable.

  1. if you created a boot usb everything will be deleted after shut down... there is one program for windows http://www.linuxliveusb.com/ that i use on other peoples computer if i do not have a live usb on hand.
  2. if you boot from a CD for example and then install Ubuntu on the usb then files will be saved please remember usb speeds will affect the OS
  3. and YES the information its store temporary on the RAM memory when you boot a live usb
  • So basically I have a 30GB USB drive. I need to solely use it to run Ubuntu and store all the changes I make on it. I would prefer if it runs fast. You think linuxliveusb would be the right way to go? – TheProgrammer Aug 11 '15 at 1:05
  • usb drives speed are determine by two factors: 1) usb speed type please see en.wikipedia.org/wiki/USB and go to version history and 2) if the computer have the same version or newwer when i try something like you want to do i used a SSD and a usb dock to it while the ssd its fast the usb dock was 2.0 so it have its limitations but it was pretty usable. If you use a liveusb only nothing will be store just burn a cd image and install ubuntu on the usb ;) just dont do very important things on it just in case the usb fails to read or at least keep online backups – Cristóbal Ortiz Ortiz Aug 11 '15 at 1:12

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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