Advertise on MozillaQuest.com Free and Open Source Software Articles
MozillaQuest MQ Logo

MozillaQuest the on-line computer magazine

  3 June 2014
About Computers
contacts
feedback
archive



ProLog Express Internet
                                      Servicse
MozillaQuest Magazine Front
                                      Page button

Internet & Web browsers
                                        button

custom Netscape &
                                        Mozilla themes & skins                                        button

IRC - Internet Relay Chat -
                                      Chat button

Linux buttonLinux for Windows Users

Mozilla button

Netscape button
network articles

tutorial - help - how to
                                        button

Windows button




Linux on a Stick

Mike Angelo -- June 3, 2014 (C) -- Page 1


. . . You can think of your Linux on a stick as a portable Linux computer on a USB stick-- and at a cost of only whatever you paid for the USB flash drive . . .

. . . Linux on a stick lets you run your Linux OS and software on any, up-to-date PC that can run Linux -- anywhere, anytime -- regardless of which operating system is installed on the PC. . . .

. . . As with “live Linux”, Linux on a stick, does not have to be installed on a hard drive. One can run Linux on a stick without ever using the hard drive. . . .

Mike Angelo -- 3 June 2014 (C) -- Page 1


This Web site is best viewed at a screen resolution of 1280 by 1024 pixels.

Article Index

Kingston's David Leong notes (1)

Advantages of Linux On a USB 3.0 Stick.

Flash Drive Endurance

Kingston's David Leong notes (2)

Conclusion

Resources

Books


Open
                            Sandisk Cruzer USB Flash Drive. Courtesy                            Wikimedia Commons


A USB flash drive. The chip on the left is the flash memory. The controller is on the right. (From Wikipedia)


To learn why Linux is so much a better choice than is Microsoft Windows, please see our article Gaël Duval Tells Why Mandrake Linux Is Better Than MS Windows

logical cross-section of a
                              Linux-based computer system

Figure 1. A somewhat simplified, logical cross-section of a Linux-based computer system.

Please see Anatomy of a Linux Distribution in our article SCO Clears Linux Kernel but Implicates Red Hat and SuSE. for the details, an explanation, and a bigger figure.


Executive Summary


Linux on a stick is Linux installed to a USB flash drive instead of to a hard disk drive. USB 3.0, which is ten times the speed of USB 2.0, makes Linux on a stick fast

Linux on a stick lets you run your Linux OS and software on any, up-to-date PC that can run Linux -- anywhere, anytime -- regardless of which operating system is installed on the PC. . . .

. . . As with live Linux, Linux on a stick, does not have to be installed on a hard drive. One can run Linux on a stick without ever using the hard drive. . . .

. . . You can think of your Linux on a stick as a portable Linux computer on a USB stick-- and at a cost of only whatever you paid for the USB flash drive . . .

We installed Fedora 20 and PCLinuxOS 2014.05 on 32 GB Kingston, Data Traveler 100, USB 3.0 flash drives. They worked well. And just as fast and just as comfortable as running them from hard drives. And much more comfortable than running them from CD/DVD drives.

High endurance flash drives such as the Kingston DataTraveler Workspace make Linux on a stick better than ever.


USB 3.0 matures live Linux into a desirable, Linux-installation paradigm! That's because USB 3.0 is ten times the speed of USB 2.0. Moreover, the prices of standard, 8 GB to 32 GB, USB 3 flash drives are less than a buck a gigabyte. That makes live Linux on a USB flash drive very affordable and very fast.

Traditionally, live Linux is a Linux distribution installed on a bootable CD/DVD rather than a hard drive. However, many Linux distros also can be installed to a USB flash drive (a stick).

We are not so sure that installing Linux to a stick is live Linux in the traditional sense. That's because a USB flash drive looks similar to a hard drive to a computer. And it behaves similar to a hard drive also. So, we will refer to Linux installed on a USB flash drive as Linux on a stick.

USB 3.0 (5 Gbps) is theoretically 10 times faster than USB 2.0 (480 Mbps). You can expect three-fold to ten-fold increase (sic) in performance with the current generation of USB 3.0 devices over USB 2.0 sticks. However, your mileage varies, depending on the type of device” and the host. USB 3.0 Comparison 

When we started covering live Linux(2005), there were not many live Linux distros. Knoppix was the first liveLinux distro we covered. Give the Gift of Knoppix Linux and a Book for Less Than $30 

PCLinuxOS also was an early pioneer of live LinuxPlease see: PCLinuxOS: A Bright, New, Live-Linux on the OS Horizon

Today many, if not most, Linux distros offer a live Linux version. And most, if not all, Linux distros can be set up on a USB flash drive. However, successfully getting a Linux distro installed on a stick can be tricky. Be particularly careful when installing Linux to a stick that you have the USB drive selected during the partitioning process. Otherwise you might delete the OS or data from the hard drive on your computer.

We first wrote about running “live-Linux” on a USB (1.0) flash drive in 2006. Cheat Knoppix 4 to Improve Performance: Part 4, Computer on a Disc and a USB Key. Back then a 4 GB USB 1.0 flash drive cost from $300 to $400. We got our 32 GB USB 3.0 stick discussed in this article from Staples for $25.00.

So far, we have managed successfully to install two Linux distros on sticks PCLinuxOS and Fedora. We did this by downloading the live Linux ISOs and burning them to CD/DVDs. Then while running the live Linux we used the included install options to install them to sticks -- rather than to the hard drive.

This article is being written using LibreOffice Writer on an HP Pavilion laptop. The Linux distro running is Fedora 20 installed on a 32 GB Kingston, Data Traveler 100, USB 3.0 flash drive. It's just as fast and just as comfortable as running it from a hard drive. And much more comfortable than running it from a CD/DVD drive. The HP Pavilion 17-e146us Notebook PC has two, SuperSpeed USB 3.0 ports. Moreover, running Linux on a stick leaves the internal hard driv free for other use.

Kingston’s DataTraveler Workspace would be a better choice than the Data Traveler 100.  That's because of write endurance issues. Please see David Leong's notes, below.

To get the 10X speed, the USB 3.0 stick has to be plugged into a computer with a USB 3.0 port. If the USB port is just a USB 2.0 port, only USB 2.0 speeds will be obtained.

Note: the two USB 3.0 ports on the HP Pavilion are too close together thus only one USB 3.0 port can be used at a time if two USB 3.0 sticks are being used. That's because the USB 3.0 sticks we have are wider than USB 2.0 sticks. But the HP Pavilion USB ports are spaced for USB 2 stick's, not for USB 3.0 sticks. The computer designer/engineer responsible for that screw-up ought to be fired!

Kingston's David Leong notes:

It’s not the technology that makes the USB 3.0 stick wider. It’s just the way the drive is made from a design sense. There are many styles of USB drives: cap, capless, slider, and swivel to name a few. Kingston makes an assorted selection to appeal to consumers of all types.

Advantages of Linux On a USB 3.0 Stick.

As with live Linux, Linux on a stick, does not have to be installed on a hard drive. One can run Linux on a stick without ever using the hard drive.

Moreover, with Linux on a stick, you can save your data, bookmarks, and configuration files to the USB flash drive while using Linux -- without ever using the internal hard drive(s) on the computer. If you want to save the data, bookmarks, and configuration files when using a DVD/CD-based live Linux, you have to export them to a hard drive or a USB drive. Otherwise, they vanish when you reboot.

If you leave a partition of the USB flash drive in its original format, the MS DOS/Windows FAT format, you can access the USB flash drive when you are booted into a Microsoft DOS or Windows OS. Doing that makes it easy to let DOS, Windows, and Linux share data files.

Linux on a stick lets you run your Linux OS and software on any, up-to-date PC that can run Linux -- anywhere, anytime -- regardless of which operating system is installed on the PC. However, the PC you use has to be able to boot from the USB drive.

 Often, that requires configuring the BIOS so that the PC can boot from the USB port. And it requires the PC to look for a bootable USB stick before it tries to boot from the hard drive. Moreover, you have to be able to run Linux on that computer. For more about BIOS and UEFI issues see Chapter 5 in Upgrading and Repairing PCs, 21st  Edition, By Scott Mueller, Que, ISBN-10: 0-7897-5000-7. For more about the universal serial bus (USB), see Chapter 14, ibid.

You can think of your Linux on a stick as a portable Linux computer on a USB stick-- and at a cost of only whatever you paid for the USB flash drive.

For example, let's say you have a computer at home and a computer that you use at the office or at school. You are smart enough and wise enough to run Linux on your home computer, However, the system administrator or IT manager at work or at school is not smart enough or wise enough to run Linux on the office or school computers. So, the fool runs Microsoft Windows on those computers.

When you are at school or at work, just slip the USB flash drive into the computer you use there. Then reboot the computer, and you can be running your personalized, live-Linux system on the office or school PC.

You also will have your MP3s to listen to. You will have all your MP3s, bookmarks, games, and so forth from your home computer on your work or school computer -- and all the great free software that runs on the Linux operating system too. Moreover, when you take your USB flash drive out and reboot the computer, none of your data, files, music, bookmarks, browser history, email, and so forth will be on that office or school computer.

Flash Drive Endurance

A drawback to running Linux on a flash drive is limited write-endurance of flash drives. Over time (number of writes), flash drives wear out. However, it takes lots of writes to wear out a flash drive.

For a full treatment of flash drive write endurance, please see Write Endurance in Flash Drives: Measurements and Analysis by Simona Boboila and Peter Desnoyers.


To whatever extent flash-drive write-endurance is a factor, the write-load is in caching and swapping. While caching and swapping, the system makes many writes to the the disk buffers, disc cache, and swap file. (However, if there is ample RAM, there typically will not be much swapping, if any.)

Kingston's David Leong notes:

Endurance varies, but, Kingston's, standard, consumer, USB drives typically use NAND (Negated AND or NOT AND gate) Flash that is designed for basic file transfer. The NAND is not designed to run an OS.

The controller in the standard USB drive is designed to handle sequential reads and writes. OSes require lots of random writes. Even though these files might be small, the controller isn't designed to handle the workload. It is expected that a standard, USB drive running Linux will fail much sooner than normal.

The lifespan of the USB drive is determined by the usage. This is why Kingston’s Data Traveler Workspace and some other solid-state drives use higher-endurance NAND. Moreover, the Workspace controller is designed to handle the random read/writes; thus, marrying higher endurance NAND to a controller that handles random reads and writes. And that increases flash drive lifespan when running an OS.

Kingston DataTraveler Workspace 32 GB USB flash drives are available for around $3/GB.

I am using the Fedora Linux distribution on a stick on the HP Pavilion being used to write this article. And am using PCLinuxOS on an HP 2000 where I am running Linux on a stick also. Both of these distros set up disk buffers and disk caches. The default installations also set up swap partitions. When Linux is installed on a USB stick, the disk buffer, disk cache, and swap file are set up on the USB stick by default.

Some people recommend NOT setting up a swap file on a USB flash drive – because of the write-endurance issue. However, this computer has a 6 GB RAM. Thus the swap file is hardly ever, if ever, used. But, it is here if ever needed. Likewise for the HP 2000, which has a 3 GB RAM.

Moreover, with the generous 6 GB RAM, there is lots of room in physical memory for disk-buffering and for disk-caching. If the RAM is small, then the operating system will cut down on the size of the disk buffers and the disk cache.

It's always a good idea to back up your data. Flash-drive write-endurance limitations make that especially true when running Linux on a stick.

Installing a Linux distro to a USB flash drive can be tricky. In part it depends on one's computer skills. In part it depends on the computer. And in part it depends on the Linux distro. The nice thing is that you can download the Linux distro at no charge. Thus, you get a free home trial at no cost to you. Try it! :-)





Article Index

Kingston's David Leong notes (1)

Advantages of Linux On a USB 3.0 Stick.

Flash Drive Endurance

Kingston's David Leong notes (2)

Conclusion

Resources

Books

RESOURCES

PCLinuxOS


Fedora

Books

Upgrading and Repairing PCs, 21st  Edition, By Scott Mueller, Que, ISBN-10: 0-7897-5000-7, $60.

  • Related Linux and Open Source Software Articles

Give the Gift of Knoppix Linux and a Book for Less Than $30 -- Knoppix for Dummies

Solutions for the Energy Crises in this Union The Many Faces of Linux


In Pursuit of Good Desktop Linux:


  • KDE, KMail, and Konqueror Articles

Copyright 2000-20014 -- MozillaQuest -- Brodheadsville, Pa..USA -- All Rights Reserved

Archived Articles