Category Archives: Linux

Mounting a USB in Linux?

These days “the cloud” is ever-present, but nothing beats a physical copy of important files you can hold in your hand. I’m not talking about printouts, I’m talking about USB sticks. Seems like a simple enough topic, but it’s not as simple as you might imagine.

Last year I purchased a couple of 64GB Sandisk Fit USBs. First thing I noticed, they get VERY hot. A couple of days ago, one of them failed. I’m guessing it was the heat. (Ironically, the USB died on a cold day.) Apparently, when they fail, they automatically go into a “read-only” state and they won’t mount after that.

FWIW I will never buy Sandisk again. However, my Samsung Fit USBs are all working OK so far–I believe they have a 5 year warranty. So I’m in the process of moving some files from my Sandisk Fits to my Samsung Fits.

Now you might be wondering, how do you know a USB is actually destroyed? It’s a tricky question, because there are a lot of little mistakes you can make. Here are the mistakes I made recently with my Samsung Fit USBs:

1. Don’t trust Thunar or whatever file manager. Just because a USB doesn’t mount in Thunar, that doesn’t mean it won’t mount at all. To fix your file manager, maybe you need an entry in /etc/fstab

2. Try mounting from the CLI as the root user.

3. Let’s say you have a USB mounted in Thunar, but you can’t drag files into the USB? It might be a permission issue. Check the appropriate directories (at the mount point and where you want to copy the files) to see if you have enough permission to copy files to the USB. Your Linux desktop GUI user (for Thunar) is probably not root. Likewise, your “fstab” entry might need the “user” option set, so that all users have access to the USB, not just the root user.

4. If you’re still stuck, “gparted” is a nice GUI tool that will provide a lot of information about your USB stick. It’s not the most intuitive application, but I think it’s the best tool available with information about many file systems. And if you’re really out of options, you can use gparted to partition & format your USB stick to start over fresh (assuming your USB device isn’t totally burnt out.)

5. Check out udisks2. This udisks2 link also recommends some “mount helpers” that I haven’t tried yet. I have a feeling Thunar uses udisks2 to recognize USBs without fstab, but I’m not exactly sure how that works yet. FWIW, my PC doesn’t need “fstab” entries to auto-mount USBs, but my laptop does. They both have the latest version of Manjaro, so that doesn’t make sense :-/

Lastly, what file system are you using? This is really something you need to plan for in advance, not after the fact. If you exclusively use Linux, like I do, I would recommend using a GPT partition table and a modern Linux file system like ext4. If you must have backward compatibility with Windows devices, I have a hunch that is going to be less efficient and less reliable, which I think means your USB is going to “burn out” faster than it normally would.

Now you might be thinking: My company only gives me the option of Windows or Mac, not Linux. What I recommend you try, get two USBs, one that has a Linux installer and one to install Linux on. You can install Linux on a Windows laptop’s USB drive without ever booting Windows on the laptop. Simply press F12 (or whatever the BIOS says) to boot Linux from the USB instead of booting Windows from the HD. Using suspend or hibernate, you can work for weeks without ever rebooting. This is 100x better than running Linux inside a VirtualBox (I tried that and it’s not a viable option, period.)

Since most work these days is done using the Internet, you’re probably not exchanging USBs at work anyway. In which case, I wouldn’t worry about backward compatibility with outdated Windows file systems. So for day-to-day use, you probably want a reliable “Linux-formatted” USB that’s optimized for performance and reliability, that won’t burn out prematurely.