Can I use a USB stick for a normal install? (to get platform adaptability)

So I know I can make a persistent LiveUSB whereby there would be anywhere up to 4GB (I think that's the max) of persistent storage for downloads, etc.

I am asking the opposite, in a sense. I'd like to configure a USB install to have the platform adaptability that a Live OS offers while fully utilizing the 120GB of space I have.

In essence I'm hoping to have a boot up install that reconfigures most/all the hardware/drivers as necessary every boot as I'd like to be able to boot off of it on nearly any machine. (Within reason - they will all be 64-bit)

The biggest gripe with doing multi-platform booting is the video driver stuff. Sometimes the system I'm booting off of is AMD, sometimes Nvidia, sometimes Intel.

Alternatively, a usable answer may be a way to better configure the LiveUSB setup for more storage utilization and customization.


Solution 1:

No problem whatsoever! (I've got a USB disk just like that but I've never tried anything but BIOS machines, as I rarely encounter UEFI machines and if I meet one, I put them in BIOS mode and revert back when I leave)

Procedure is exceedingly simple:

  1. Buy a decent USB 3.0 SLC USB disk. These are normally advertised as 200-300 Mbps USB 3.0 disks, but your mileage may vary. Read the specs

    Why? SLC is vastly superior in speed to MLC or TLC drives and lasts about 4-12 times longer. This outweighs the cost of these things... (2-3 times as expensive as other "fast" USB disks, 3-4 times as expensive as a low-end one)

  2. Use Lubuntu (in your case: 64-bit)

    Why? Lubuntu is the most compatible of all of the Ubuntu family and you're not going to use this as a high-end server, so Lubuntu will be snazzy even on a 1GB USB 2.0 machine. I use the 32-bit version with PAE extensions forced as I run this thing on a variety of hardware (mainly to resurrect Windows machines, but I've been told already to wipe the F|@#§g Windows and install this nifty, fast, free OS!)

  3. Install like you would install any other machine, but treat the SLC as a simple hard disk and install grub, swap, / and /home.

  4. Optimise fstab as you would for an SSD drive

    Why 3+4? Obviously ;-) you basically have an SSD on a stick!

  5. Set the sysctl.conf parameters as follows:

    # Prevent USB wear out due to excessive swap usage.
    # Only start swapping when the memory is 90% full
    vm.swappiness = 10
    
    # 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.
    #
    # Basically, once something is swapped it's probably not immediately needed
    # any more, so increase the kernel's resistance a bit more trying to build up
    # a large cache again.
    vm.vfs_cache_pressure = 75
    
    # Good to improve sequential reads (stop stuttering background music)
    # Can also be implemented per disk using udev rules
    # in KB, so only 3MB lost, so who cares nowadays?
    vm.max-readahead=2048
    vm.min-readahead=1024
    

    Why? Read the comments above...

  6. Install as many command-line tools as you want, but stay away from huge memory-hungry programs as you won't know what kind of machine you'll be running this on. (OK: I confess: I've got LibreOffice running, but that's about it. Nu MySQL, no GIMP, no 3D-rendering, ...)

  7. Stay away from any proprietary modules (aka drivers), just standard Linux kernel modules... And these are extremely good at adapting to their environment! They're like mongrels: they'll eat anything, drink anything and ... well, whatever. ;-) It just works!

That's it!