Tips to run Linux Mint on USB/Flash Drive?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
able2c
Level 1
Level 1
Posts: 3
Joined: Wed May 11, 2016 4:50 pm

Tips to run Linux Mint on USB/Flash Drive?

Post by able2c »

Hello everyone,

I've been running Linux Mint 17.3 Rosa 64bit for a while now from a 32Gb Samsung USB 3.0 flash drive. (shock, x-ray, magnet proof)
I'm using xfce4-panel 4.12.0 to keep the resource usage low and Cinnamon kept crashing.
The thumb drive is encrypted so that, should I ever lose it, I would not have to rush to change passwords. Interestingly enough Mint boots up in a black screen and "enter passphrase" only shows when escape is pressed. For the uninitiated it would probably look like a faulty Flash drive.

So far it works like a charm except for the odd pause when Google Chrome tries to access cache or when a menu needs to be accessed. How can I improve that and make it more responsive? Is there a way to increase the read/write cache or maybe make it smaller?

I have put Mint on a thumb drive because I expect to travel and not be able to take my (desktop) computer with me.
The idea is that I use my home brew Mint on someone else's computer to, show off Mint, have the OS setup the way I like it.

What problems can I expect to run in to booting on a different computer? Currently Grub doesn't search for any other OS and boots straight through.
What programs could I remove that take up space but are likely not used by end users?
What programs should I install to make using Mint on different computers easier?

P.S. I've tried Tails. I'm no Snowden and I don't need that much secrecy. Tails also would crash because I couldn't update the Nvidia drivers. Mint is more user friendly and I like it best.
User avatar
cogier
Level 3
Level 3
Posts: 184
Joined: Sat Mar 31, 2012 9:51 am
Location: Guernsey

Re: Tips to run Linux Mint on USB/Flash Drive?

Post by cogier »

I have not done this but this site looks like it may be able to help you.
http://tuxtweaks.com/2014/03/create-lin ... -live-usb/
User avatar
WharfRat
Level 21
Level 21
Posts: 13909
Joined: Thu Apr 07, 2011 8:15 pm

Re: Tips to run Linux Mint on USB/Flash Drive?

Post by WharfRat »

That device is inherently slow so I'm not sure what you expect as far as performance goes running on a usb stick.

What might provide a slight increase in performance is installing the packages preload and prelink and mounting /tmp to memory.

Otherwise the throughput of a usb stick is what it is...

Good luck :wink:
ImageImage
User avatar
Arch_Enemy
Level 6
Level 6
Posts: 1389
Joined: Tue Apr 26, 2016 3:28 pm

Re: Tips to run Linux Mint on USB/Flash Drive?

Post by Arch_Enemy »

able2c wrote:Hello everyone,

I've been running Linux Mint 17.3 Rosa 64bit for a while now from a 32Gb Samsung USB 3.0 flash drive. (shock, x-ray, magnet proof)
I'm using xfce4-panel 4.12.0 to keep the resource usage low and Cinnamon kept crashing.
The thumb drive is encrypted so that, should I ever lose it, I would not have to rush to change passwords. Interestingly enough Mint boots up in a black screen and "enter passphrase" only shows when escape is pressed. For the uninitiated it would probably look like a faulty Flash drive.

So far it works like a charm except for the odd pause when Google Chrome tries to access cache or when a menu needs to be accessed. How can I improve that and make it more responsive? Is there a way to increase the read/write cache or maybe make it smaller?

I have put Mint on a thumb drive because I expect to travel and not be able to take my (desktop) computer with me.
The idea is that I use my home brew Mint on someone else's computer to, show off Mint, have the OS setup the way I like it.

What problems can I expect to run in to booting on a different computer? Currently Grub doesn't search for any other OS and boots straight through.
What programs could I remove that take up space but are likely not used by end users?
What programs should I install to make using Mint on different computers easier?

P.S. I've tried Tails. I'm no Snowden and I don't need that much secrecy. Tails also would crash because I couldn't update the Nvidia drivers. Mint is more user friendly and I like it best.
A lot of variables here. What size USB stick are you using, are you installing a full system and writing to it, or would an ISO and a separate USB stick suit you well?

I just make an ISO snap of my system and put it on USB. I can't save anything to it, and settings don't stay when I change them. I make the settings changes to each program I want on the drive before writing the ISO, so I try to make sure all my preferences are correct before writing the ISO. If you use a 'cloud' drive accessible anywhere, so much the better.

I've found the best drives for this are Sandisk Cruzer Glide and PNY Attache devices, and 2.Slow! The 2.0 devices work on any machine, and believe it or not 3.0 is slower in this application! Linux/USB 3.0/Storage is not the winning combination. If I need to save data I have another USB drive that I put the data on. Also, the size of the thumb device dictates speed as well. It runs lightning fast from an 8G 2.0 device from the brands mentioned just fine.
I have travelled 35629424162.9 miles in my lifetime

One thing I would suggest, create a partition a ~28G partition as /. Partition the rest as /Home.
When the system fails, reinstall and use the exact same username and all your 'stuff' comes back to you.
User avatar
phd21
Level 19
Level 19
Posts: 9739
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Tips to run Linux Mint on USB/Flash Drive?

Post by phd21 »

Hi "able2c",

Welcome to the wonderful world of Linux Mint and its excellent forum !

I just read your post and the good replies to it. Here are my thoughts on this as well.

It would help to know more about your system setup. If you run "inxi -Fxzd" from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.

There are 3 ways to create a USB flash drive stick of Linux Mint:

Note: for compatibility with almost any computer that you may come across, using a 32-bit Linux Mint might prove a better choice. If you use a 64-bit Linux Mint, then you can only use a 64-bit computer with the USB flash drive stick, whereas a 32-bit Linux Mint works on 32-bit and 64-bit computers.

1. Easily create a Live "test drive" Installation version of Linux Mint using one of the many USB stick programs, "unetbootin", Linux Mint USB Image Writer, "Live USB", Start Up disk creator, etc.... No changes that you make, or programs that you install, will be saved (retained) upon restart (reboot).

Here are two ways where changes that you make, or programs that you install, to the installed Linux Mint system can be saved after rebooting (restarting):

2. Create a fully installed version of Linux Mint onto the USB flash drive stick. Simple to do, create a Live Installation version of Linux Mint onto a DVD or USB flash drive stick, boot to it, and click the install desktop icon, and during the install select the USB flash drive stick (or another USB flash drive stick) that you want a full version to be on as the destination. Easy to do, takes a little longer, but you do not have the option to install Linux Mint from this. This is a great option for a portable Full version of Linux Mint, but you should have IMHO at least 16gb or larger USB flash drive stick. And, it would be best if it was as fast and as durable as you can find. I use a Patriot USB Flash drive stick because they are very fast and durable with a good warranty (2-5 years), available on Amazon.com; I think they might have some that are also shock proof, water resistant, and anti-magnetic. There are other manufacturers, but you have to do some research on it. There a numerous posts in this forum on this, and there is "pendrivelinux.com" as well.

http://www.pendrivelinux.com/

I would not recommend encrypting the USB flash drive stick as part of the Linux Mint installation because that is another layer that will slow it down, just give it a good password. You can install and use a file and folder encryption program later if you want, or need, that. Or, some USB flash drive sticks have a built-in Encryption Lock requiring a password to gain access.

And, you can use one of the excellent "cloud" Internet storage provider's services to store your files and folders with access from anywhere, which also have encryption, like "pCloud", "Mega", "Dropbox", Google's Drive, etc... I really love "pCloud" (10gb free) and "Mega" (50gb free) because they have really simple to install and use Linux Mint client and sync software, Dropbox is in the Software Manager or Synaptic Package Manager (SPM), but has been having some system tray icon issues lately, and Google Drive will take some effort to get that working, but it does work too... All of these have pretty good pricing, if you need more "cloud" Internet storage space.

3. Create a "Persistent" USB flash drive stick where the Live "Test Drive" installation version of Linux Mint's ".iso" file (usually around 1.5gb) is put onto the USB flash drive stick, and create an amount of "Persistent" space up to 4gb where changes and customizations that you make are saved. Not hard to do, can use a smaller USB flash drive stick, & you can install Linux Mint from this. Not all customizations that you can make, or install, will work properly using this method, like some video drivers. And, you really do not want to install video drivers, if you do not know what computers you may be booting this USB flash drive stick from.

My favorite program for creating a USB Persistent drive is " 'MultiSystem' LiveUSB multiboot", where you can put more than one operating system on it, like a 32-bit Linux Mint & a 64-bit Linux mint, and one of those can be "Persistent"; the installation instructions for this are in the links below. This program has always worked for me.

Recent posts on USB flash drive stick with installation instructions for creating Persistent USB drives and other very good information.
viewtopic.php?f=90&t=221619

viewtopic.php?f=46&t=221730


If you want anonymity, without using "tails" or something like that, when installing Linux Mint, use a generic user name, and computer name, and use a VPN provider's connection when on the Internet, like the low cost, but excellent, "Private Internet Access (PIA), or a free VPN, like "vpnbook", or "vpngate", or one of the browser VPN add-ons (plug-ins) "DotVPN" (on Opera), or "Hoxx VPN" on Firefox, etc... Google's Chrome no longer supports 32-bit, and I do not know which VPN add-ons are available for that, perhaps the ones I just mentioned, and others. There are also numerous VPN proxy websites (HMA, etc...), where you go to their website (bookmark it), enter in a web address, and can surf anonymously that way. And of course, all the browsers have "private windows" as options as well, so using that, and a combination of the VPN providers, will give you plenty of security and anonymity.

I personally like having a fully installed portable version of Linux Mint for the portability, and In Case of Emergencies (ICE), and because it is secure. Using a USB flash drive with an installation version of an operating system, with or without "persistence", is not secure. You can also have another smaller USB flash drive stick with an Installable "test drive" version, or versions, of Linux Mint, or partition a larger USB flash drive stick, and have both. I have multiple USb flash drive sticks, one with a fully installed Linux Mint 32-bit, and others with "Persistent" USB installation versions of Linux Mint.

Hope this helps ...
Last edited by phd21 on Sat May 14, 2016 12:46 pm, edited 1 time in total.
Phd21: Mint 20 and 19.2 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
User avatar
Arch_Enemy
Level 6
Level 6
Posts: 1389
Joined: Tue Apr 26, 2016 3:28 pm

Re: Tips to run Linux Mint on USB/Flash Drive?

Post by Arch_Enemy »

A quick tutorial on USB thumb drives:

This will be brief. There are three basic types: SLC for Single-Level Cell: "Single-Level Cell (SLC) flash outperforms Multi-Level Cell (MLC) flash."
SLC flash is always in one of two states, programmed (0) or erased (1). The state is determined by the level of charge that’s applied to the cell. Because there are only two choices, zero or one, the state of the cell can be interpreted very quickly and the chances of bit errors is reduced. Individual SLC memory cells can sustain approximately 100,000 write operations before failure. Once a cell is written to its limit, the cell starts to forget what is stored and data corruption can occur.
The other is MLC:Multi Level Cell: "Multi-Level Cell (MLC) flash has low-cost benefits, but performs at slower speeds."


Faster write speed

SLC flash accesses and writes to the flash faster by using "simpler" control logic with 1 bit versus the 2 bits used by MLC flash.
Longer lifespan

The program operations in SLC chips last 100,000 cycles, ten times longer than MLC.
Lower aggregate cost

At a first glance, SLC flash appears to be more expensive than MLC. However, taking into consideration the higher reliability and lifespan of SLC, the aggregate cost is for SLC is lower.

TLC -- Triple Level Cell: championed by Samsung, TLC has higher power and error correction requirements, and higher wear levels. TLC is targeted at environments with predominant read uses, and has not been commonly used.

SLC is the best for using as a portable operating system if you are going to be writing data to it continually, as in your TMP directories. Modern SLC devices can write about 1 million times before approaching failure point. That should last quite a while.

MLC is better used for writing to once and then reading from many times, as in the case of writing a DVD ISO to it. They can be read into the millions of times, but writes are only about 100,000 cycles. Of course, the world being imperfect, some will get more, some will get less.

The TLCs are out there, but not very plentiful. Usually the really cheap flash drives are TLC.

SLC drives can run $120 or more for an 8G device, so it is a bit of an outlay, but if you plan on writing data long term it's the best bet.
I have travelled 35629424162.9 miles in my lifetime

One thing I would suggest, create a partition a ~28G partition as /. Partition the rest as /Home.
When the system fails, reinstall and use the exact same username and all your 'stuff' comes back to you.
able2c
Level 1
Level 1
Posts: 3
Joined: Wed May 11, 2016 4:50 pm

Re: Tips to run Linux Mint on USB/Flash Drive?

Post by able2c »

Thank you for the great answers and the welcome guys,

Phd21, I went with your option 2. Wrote an image to a 8Gb flash drive and installed that to the 32Gb Samsung flash drive. I know nothing of the computer(s) I will be using and I hope none of them are older than 10 years. The reason I went with 64 bit is because Google no longer appears to support 32 bit Chrome?

Good to know about the life cycle of flash drives. My Linux mint only has to last a year, maybe 2 years tops and by that time I'll have a new box and will hopefully not need to use a flash drive.

I've used UNetBootIn but it caused some issues with installation. I believe only older distributions were available and caused crashes. That is why I used the Mint Install.
WharfRat wrote: What might provide a slight increase in performance is installing the packages preload and prelink and mounting /tmp to memory.
I've been thinking about creating a ram drive but I haven't got a clue how I would preload Mint and the most accessed programs onto a ram drive. I know from from long ago that it would work very fast and might be beneficial to run Mint partially from ram when booting from USB.
Mute Ant
Level 14
Level 14
Posts: 5130
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

Re: Tips to run Linux Mint on USB/Flash Drive?

Post by Mute Ant »

Mint always runs from RAM (the CPU can't address block storage devices). Preloading files you might need is just pre-empting the kernel caching files you do need; it can only make it slower overall.

Mint sets up a RAM drive for you, under /run/user/1000/ I think, I'm not running a Mint right now.

I have found USB-Stick-Install to be transparent on devices that can support 5MB/s sustained writes. That's going to be everything made by a famous manufacturer since 2014 I guess.

Ext4 works fine, I have tried BTRFS for the error-detect-and-correct feature but it gets uppity when cached data just has to be written; everything else goes on hold for a few seconds for no apparent reason.
While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named "manual".
User avatar
Arch_Enemy
Level 6
Level 6
Posts: 1389
Joined: Tue Apr 26, 2016 3:28 pm

Re: Tips to run Linux Mint on USB/Flash Drive?

Post by Arch_Enemy »

Mute Ant wrote:Mint always runs from RAM (the CPU can't address block storage devices). Preloading files you might need is just pre-empting the kernel caching files you do need; it can only make it slower overall.

Mint sets up a RAM drive for you, under /run/user/1000/ I think, I'm not running a Mint right now.
Wow. Indeed. Thanks, that's a good thing to know!
I have travelled 35629424162.9 miles in my lifetime

One thing I would suggest, create a partition a ~28G partition as /. Partition the rest as /Home.
When the system fails, reinstall and use the exact same username and all your 'stuff' comes back to you.
User avatar
Moem
Level 20
Level 20
Posts: 11812
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Tips to run Linux Mint on USB/Flash Drive?

Post by Moem »

able2c wrote:I've used UNetBootIn but it caused some issues with installation. I believe only older distributions were available and caused crashes.
It shows a list of distros, that's true, but you can also point it to whatever you have downloaded the .iso for.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
User avatar
I2k4
Level 5
Level 5
Posts: 678
Joined: Thu Feb 02, 2012 8:33 pm

Re: Tips to run Linux Mint on USB/Flash Drive?

Post by I2k4 »

It seems you're up and running. If I have it right, it's interesting to try traveling with only a USB stick. My main concerns with unknown PCs would be

1) they'll have to be configured for USB priority boot in BIOS - you may or may not be allowed to change that

2) 64-bit compatibility is not assured - you might make a 32-bit system on another thumb drive as a backup and install Chromium, which is still good for that instead of Chrome - only issue is Adobe Flash, which can be a problem in Chromium, but all your Chrome settings and extensions will sync via login with your Google Account.

3) Wi-fi adapters can be a problem, either in being recognized or in performance. Hard to anticipate

4) If you're having problems with Chrome (or Chromium) performance there are tweaks within the browser itself that can be much more effective than anything done with the operating system - especially "Flags" - paste this into search box for URLs to various Chrome adjustments, but do some homework before applying changes:

chrome://chrome-urls/

Good luck.
TRUST BUT VERIFY any advice from anybody, including me. Mint/Ubuntu user since 10.04 LTS. LM20 64 bit XFCE (Dell 1520). Dual booting LM20 XFCE / Win7 (Lenovo desktop and Acer netbook).
User avatar
phd21
Level 19
Level 19
Posts: 9739
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Tips to run Linux Mint on USB/Flash Drive?

Post by phd21 »

Hi able2c

As user "I2k4" just pointed out, and I mentioned before, you might seriously consider creating a 32-bit USB flash drive stick with Linux Mint on it as well, then you cover all options.

1. On my extremely old, underpowered, computer I cannot boot to a USB device like most newer computers can easily do, without using a CD with "SuperGrub2" on it, or "PloP". "SuperGrub2" is in my opinion the better of the two, but both work. Carrying one of these CD's with you would allow you to boot to your USB drive without having to update or change a computer's Bios, assuming the computer has an accessible CD/DVD drive. "SuperGrub2" is an excellent tool to have anyway, because if you ever have a problem booting into any system, you can usually boot into it with this, even if the boot area is corrupted. The great "boot-repair-disc (CD)" program is also a highly recommended program to have, as it can easily repair most boot issues.

Super Grub2 and Rescatux programs - Super Grub2 allows you to boot into your system even with a corrupt Grub or MBR boot issue(s), usually.
http://www.supergrubdisk.org/

boot-repair-cd (disk) - easiest boot repair program
http://sourceforge.net/projects/boot-repair-cd/files/

2. I would also highly recommend that you purchase a USB WiFi network adapter for Linux to carry with you, just in the rare case the computer's WiFi network adapter you might come across does not work with Linux. Installing "linux firmware" and "linux firmware nonfree", "linux-wlan* ", might also help for certain things.

There are numerous low cost, but very good, USB wireless adapters for Linux available on Amazon.com and elsewhere. Amazon.com has really great prices. I have personally found that the ones with an external antenna do get better reception.

Amazon.com "usb wireless network adapter linux"
https://www.amazon.com/s/ref=nb_sb_noss ... pter+linux

Panda N600 Dual Band (2.4GHz and 5.0GHz) 300Mbps Wireless N USB Adapter - Windows Vista/7/8/8.1/10, Mint, Ubuntu,… $18.99 US
https://www.amazon.com/Panda-2-4GHz-300 ... pter+linux

Panda Wireless PAU06 300Mbps N USB Adapter $19.99 us
https://www.amazon.com/Panda-Wireless-P ... pter+linux

3. Even though Google stopped support for its 32-bit Linux Chrome browser, the newer "Opera" & "Opera-Beta" browsers are excellent, secure, and fast. It can play videos, and the new "beta" one has a cool pop-out video option now.

New Opera Browser available for 32-bit and or 64-bit computers. I would recommend removing the older Opera browser completely first, if you have that installed.
http://www.opera.com/computer/linux

And, you can install and use Chrome extensions from the Google Chrome Store in Opera by adding the add-on below:
https://addons.opera.com/de/extensions/ ... display=en


Other Recommended add-on and extensions:

Awesome "Fireshot" (web page screen capture to image file, PDF, printer, etc...) for ALL browsers
https://addons.opera.com/en/extensions/ ... display=en

A full system VPN, best option is Private Internet Access (PIA) VPN provider, and or at least a VPN browser add-on (plug-in, extension) like these excellent ones "DotVPN" or "Hoxx VPN".

Privacy Protector Plus

"V7 Stash", "V7 Tabs", "V7 Sessions", & "V7 Notes"

The newer Opera has built-in ad blocking, but you might consider adding "uBlock Origin" as well and check its options, turn on block webRTC.

4.) "CherryTree" is an incredible all purpose Notes program in the Software Manager or Synaptic Package Manager (SPM), newer versions available from PPA, or easy to install Linux ".deb" file.

Cherry Tree
http://www.giuspen.com/cherrytree/

CherryTree: A Powerful Notepad For Easy Note Taking
https://www.maketecheasier.com/organize ... herrytree/


Hope this helps ...
Phd21: Mint 20 and 19.2 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
User avatar
phd21
Level 19
Level 19
Posts: 9739
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Tips to run Linux Mint on USB/Flash Drive?

Post by phd21 »

Hi "able2c",

I just remembered something else that you might consider for portable computing when traveling.

1.) Linux Mint has a really small but powerful computer that you can easily take with you and connects to a monitor or HDMI TV.

mint box 2
https://www.linuxmint.com/store_mintbox.php
Description below
http://blog.linuxmint.com/?p=2055

http://www.amazon.com/MintBox-IPC-D2x2- ... B00EONR674

2.) Intel has a USB computer Stick that turns any HDMI TV into a Linux computer $70us, just get a small portable or mini keyboard.
http://www.intel.com/buy/us/en/catalog/ ... 084/463163


Portable keyboards on Amazon.com - some full size and foldable, or rollable, or mini but very functional with trackpad and backlighting. I use a Favi mini (USB) with Linux Mint sometimes, and it works well.
http://www.amazon.com/s/ref=sr_nr_n_1?f ... 2941120011
Phd21: Mint 20 and 19.2 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
Post Reply

Return to “Newbie Questions”