Running an OS from a USB 3.0 drive?

I've a somewhat simple question. As a preface, there's a PC in my home that runs Win10. It's a powerful machine and it's hooked up to my media center as well (TV, BluRay, Roku, Sound system, etc.). I would like to install LM(17.3/18) on it, but the case is too small for another drive. It's an mITX case about the size of an Xbox 360 E. I don't want to install the OS over it and I don't want it running in a virtual environment. So, I've thought about plugging a USB 3.0 drive in and installing the OS to it as if it were the hard drive. Not only would this allow me to run either OS, but I would have access to data from either OS no matter which one is currently running. My question is, how much of a hit would I take, running it on a USB? The drive has a read speed of 72MB/s and a write speed of 48MB/s. How far could I push it before I notice slowness? OBS capture at 7.2k bitrate at 1080p? Would that be too much? Could I slip by? Not that I would, but I'm just trying to see how okay or not okay I would be.

It's easily doable and perfectly usable, but the speeds, despite being usb 3 is going to be significantly slower than compared to a vm or bare metal. How much slower I can't say, that's something that depends on multiple factors, most notably the quality of the usb drive itself, you'll have to try it out and test for yourself.
Also the lifespan of the thumbdrive will be drastically shortened with loads of reads and writes.
Pro feature of it tho is that u can plug it in any machine you get your hands on and basically continue from where you left off.

1 Like

It works fine but the performance can be slow. Two reasons i know of, one is that vanilla Linux installers tend to enable swap, you can turn this off in the custom install section as most modern computers with enough RAM rarely need it, due to USB's slower access and low write speeds it can cripple the performance but mileage may vary. Secondly for the same reason using a persistent install where your writing data to the stick can be very slow.

However, it does work and tbh it's not a terrible way to move lets say a linux netflix pen with chrome on and anyway it's fun to try, free and easy to do :)

1 Like

I'm going to try LM18 Cinnamon with and without swap, then I'll try Plasma 5.7 over it, with and without swap and see how tolerable it is. 16GB of RAM @2800MHz is probably okay?

Cool beans. When doing this i used a lighter desktop environment MATE or xfce i think. Plasma is the big fatty of the Linux desktop that surely is going to tank lol but yea, give it a go. Cinnamon isn't too bad.

Obviously post experiences :)

1 Like

Yeah, I'm going to try Plasma because Plasma will hit everything like a truck. Cinnamon has issues here and there, and I could always rewrite certain things for optimization. (I'm no expert, but I've some experience with C/C++ and the lovely land of angry, constricting snakes (Python) is getting a new visitor probing around. But I won't go through any trouble if it takes more than 45 min to fix. But YES. Oh, how I absolutely love Xfce. Cinnamon is really nice, but I've been using Xfce desktops since LM9 I think. I'll post some results if you'd like.

I've run Mint Cinnamon on external hard drives (Western Digital MyPassport which were USB 2). It was a nice way to experiment with installing Linux without worrying about trashing Windows. I was not doing anything complex (games mainly) and the performance was fine. I'd originally tried running Linux off USB sticks but I found these too slow.

I had such a positive experience with it that I've now got a dual-boot Win7/Mint machine, with Mint running on an SSD. I can see it becoming my main OS in a couple of years, once more Steam games are available.

1 Like

That's cool. Honestly, I wish the case were big enough for another drive, but I'm trying a USB to find out. I'm in the process of installing LM18 Cinnamon on it with no swap partition and an Ext4 JFS. Pretty standard (except for the swap part lol). I'm pretty excited. @meggerman instead of reinstalling the OS to try Plasma, I'll just patch it in. It'll save me time and write cycles lol.

UPDATE

I've installed LM18 Cinnamon with 120GB allocated to the Ext4 JFS and the other 8GB for swap. I've discovered that as long as the system doesn't need to use the swap file, it generally avoids using it, though sometimes Linux Mint gets greedy as hell with swap. With 16GB of RAM I think I'll be okay, but this allows me to essentially use any PC as 'my' PC whenever I need to. On the performance side of things, I've been getting consistent access speeds of around 118MB/s read and 64MB/s write. This is actually really good, as the access speeds are much faster than in my testing. I believe this has to do with the OS itself being directly on the drive, and the Ext4 file system. I believe that the operating system optimizes the drive, but more importantly, is accessing the drive as if it were an SSD, and may be giving false readings because of this. I'll continue my testing just to be sure. It may also be due to USB priorities. Because USB generally fluxuates when system resources are being used, and tries to prioritize certain processes. Because the OS is connected via USB, I believe the system is allocating everything it can to that port. (This is all speculation, I haven't had time to actually test it.) I've overlayed Plasma 5.7 and I can confirm, it hits like a truck. I'll have some pictures up soon, but right now, I'm really impressed. There's no noticeable difference from a HDD except from just a bit slower during large program installs and file transfers, but we all expected that. I'm waiting for Xfce, but I'm hoping it'll be an even bigger improvement.

2 Likes

Nice. one thing i remember about doing this was that i would get some random pause for 15 seconds, like a system halt, in fact it was actually ( weirdly ) the USB power saving feature running inside the USB installation punching itself out and then eventually something somewhere gave the system a strong coffee and a biscuit, it was back to normal like nothing had happened.

So yea, if you get a big pause it might actually be power saving on the USB installation or the motherboard settings.

1 Like

Yeah, I had that problem too. I remembered I used to run Minecraft off of a USB drive and it would do this. Pissed me off to no end, because Windows doesn't let you tinker with that unless you have two men turning the keys, a hamster on a wheel and nuclear launch codes... Thankfully I have more control now. I got it to stop through disabling USB power saving. (Also, yeah Windows has a settings menu for USB power settings, but the kicker is that it's only a setting menu for USB power states during sleep mode. Like, wtf MS? Why would I need to dynamically adjust USB power when I'm not using the drive, let alone the dam computer... However I digress, this issue was really annoying, but I was able to fix it in a little over a minute.

ive actually run ubuntu 14.04 on a external 5400rpm drive via usb 2.0 and it wasnt half bad. I wasent looking for speed though, so I didnt get mad at it when large files took awile but boot time was only 2 minutes =)

1 Like

@meggerman @nemo @Baz Alright! I can say it works great. But I've finally figured out why performance is actually so good. Creating and deleting large amounts of data will always take a long time, but moving data within the OS is actually very fast. The USB performance is also quite good. I've come to the conclusion as to why this is. 1) Because everything within the OS is on the drive itself, file transfers are not handled the way they typically are between a USB and another drive hosting the OS (such as an SSD or HDD/SSHD). Because all of the data is already in the drive and is already indexed by the OS, the data doesn't go anywhere. The only thing that changes is the OS just changes the 'address' or location of the data. Much like deleting files just marks it as empty space, rather than actually deleting data. This means that the data doesn't go through much change, the system just references it in a different location. 2) USB performance itself is much faster because it is directly communicating with the CPU/GPU/RAM/Motherboard etc. Because the OS is on the drive, the connection between that port and the rest of the system hardware is prioritized. Meaning that the USB 3.0 communication pipeline is pushed to the absolute max. I don't mean this as in data transfer and being able to copy stuff to another drive, but I mean the communication between the other hardware in the system is using as much bandwidth as possible through the port. I've even noticed PCI(e) access being completely bottleneck free. (That being said, it is limited by the speed of the flash storage itself, I am talking about the port itself). In conclusion, I believe it is safe to say that something like a mere 128GB USB 3.0 flash drive with a decent read/write speed is more than adequate for an OS such as Linux Mint, Ubuntu, and Fedora. (I don't know about any others because these are all I've tried but considering how Arch handles, I'd say a definite yes for that too). I would go so far as to recommend people to this if they don't always have access to a personal computer and would like to use any computer as theirs when needed. I see myself doing a lot with this. Anyway, I conclude. :D

2 Likes

Good stuff. The concern usually centers around cheap USB flash memory and write degradation along with slow write performance, however with proper NAND using the USB3.0 interface ( apart from some USB queuing protocols which take performance down vs SATA ) it should be pretty good and a totally fine way to move an OS around. In fact you could still use LUKS/LVM and have it encrypted just incase you drop it or there is a hole in your bag, this way petty thieves or nosy shits don't compromise your data and leave you high and dry.

1 Like

Yeah. All my drives are solid, but write degradation is an issue definitely with cheap drives. Encryption! Holy shit I forgot about assholes... I should look into it.

Speaking of which @meggerman , how much of the general population of thieves do you think is smart enough to know it's a bootable drive and you'd have to boot from start rather than just plugging it in? Just curious really... But I'm actually interested in doing a social experiment at my school... What do you think?

Well its not so much the actual thieves that are smart ( although as technology advances so do their methods, look at internet crime) , but all thieves tend to sell their wares and nowadays that means online. So the type of person who want's a cheap as shit but really nice USB3.0/SSD drive might go to whatever online merchant store they use and buy up your drive. Now those folks could be anyone ... totally possible.

@Schyken Sounds a bit like entrapment even if its just for fun also probably best not to mess with people just for the sake of it unless they are your good friends and they will be okay with it. Is it really worth your time ?

1 Like

If you have e-SATA, you may also consider a SSD with an adapter that plugs into the wall for power and the cable that goes into the e-SATA port on any modern PC. Would see the same speeds as a normal SSD, maybe slightly slower because of e-SATA typically being tied to a 3rd party on-board chip.

1 Like

You can fool your schoolmates by removing the letters that indicate the capacity (acetone should be good for that) and partitioning your USB stick.

Set the first partition to logical, flag it as active and install Linux on that. Set the second partition as primary and format it in whatever Windows filesystem you want.

When you plug the stick into a running Windows PC, Windows will only show the primary partition and your stick will look like a smaller one. When you reboot it, the BIOS will see the Linux partition.
If you let it boot into Windows (either by choice or because the PC gives boot priority to the internal drive), Windows will still only show the primary partition.

I have a 16GB stick like that. Looks like an 8GB one if you plug it in.
It doesn't have to be half the capacity, you can buy a 128GB stick and make it look like a 4GB one if you want.

1 Like

Well, it is entrapment technically, sure. But I'm not going to be reporting anyone for stealing. And I've got plenty of drives to spare. I'm just going to sit back and observe. A sample size of 25 cases at four different high schools gives a total sample size of 100. Now, given the age group, they're more likely to be somewhat technologically inclined than their elder counterparts. As for wasting my time, I've got plenty of time.