0

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.

Thanks

fidgetyphi
  • 135
  • 1
  • 3
  • 8

3 Answers3

2

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
    vm.max-readahead=2048
    vm.min-readahead=1024
    

    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!)

Fabby
  • 34,259
0
  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
A.B.
  • 90,397
  • 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? – fidgetyphi Aug 11 '15 at 01:05
  • usb drives speed are determine by two factors: 1) usb speed type please see https://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 01:12
0

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.