Hello fellow USB booter :3
I am excited to say that, I, like you have had the need to the solution to this exact problem; though, I did it more for portability than anything else.
I actually tried many things before like using the live-boot with/without persistence and any other similar live boot setups but they never really worked for me. Adding to the fact that persistence wasn't going to happen the same as with a normal pc or laptop due to having to create a specific filesystem or something like this for the persistence file and the wear and tear the USB would have to take I ended up with the following.
So... if you've already tried USB persistence and found it lacking this is what I followed.
The method is pretty straightforward:
Required tools:
- Vbox with Ubuntu image
- USB 3.0 min storage suggested from personal observation 128GB
(I purchased a Samsung USB 128GB as it seemed it would handle all the OS installation and probably have an OK speed for read/write operations. I also have used other Samsung SSD's so I was pretty confident in it's performance)
Overview of method:
Somewhere in the Vbox settings of the image you'll need to select 'Use as live bootable disc' or something similar maybe 'Live/Boot' could also be the option
Depending on your setup you might need to install USB 3.0 support on Vbox if your connecting your USB device to a 3.0 port as it might not recognize it otherwise
Start your Live Ubuntu Vbox and go through the process until you're selecting the installation disk.
You'll need to format the USB with ext4 I believe. I think some have suggested ext2 or ext3 but I used ext4 and selected '/' as an option somewhere in those settings as well.
Once you've configured it proceed with the installation and wait until the installation process is done.
5.1. Try booting from the USB
- Depending on your BIOS settings you might need to enable UEFI support(I always have to research how the MBR,GPT,ext4,UEFI and Legacy all work together to boot an OS because I always forget, so I'm sure google has the answers if you run into an issue with any of these settings).
If all happened correctly then you should now have ended up with the following:
USB 3.0 126GB with a full-fledged Ubuntu installation on it.
This USB 3.0 device can now boot up from any computer that supports USB booting and possible will need UEFI enabled to.
Longevity:
I haven't met anyone who has run a full-fledged operating system from a USB as their main driver. On that note I've been using mine for well over 10 months now and it's still going good.
Use Performance:
After using it for many months and not even turning off the pc most of the time I don't think I've notices any sluggishness. I'll sometimes be editing short videos and images as well as working with programming and browsing a lot on a dual monitor screen and it handles well. Not as fast as my SSD but much faster than many HDDs. The good thing here is that USB 3.0 is pretty fast now and it's almost in every place now. If you use USB 2.0 port you'll definitely see the difference in speeds when programs open or files move.
Always bear in mind that it's a USB installation and that sometimes these things fail all at once or over time as well.
I've used my USB Ubuntu installation on many computers now and it's been flawless, except with macs as their booting has different requirements)
Also, I remember doing something about installing EFI on it so that the computer could detect it was an OS and add it to the boot order so if another computer doesn't support UEFI you might need to try another method or try changing this one somehow.
You might also want to create a swap file for some performance improvement but this is only what I've seen recommended on forum's about server performance so I'm not sure how much it would help here and it would also be costing you storage space in case you're on a lower than 128GB USB.
In any case I hope this sends you in the right path. I know it took me a while to figure it out but now I'm able to write this post from my own USB installation ;)
casper-rw
partition for persistence. mkusb provides a tool for that, https://help.ubuntu.com/community/mkusb/persistent – sudodus Mar 19 '17 at 19:41