Linux on a Thumb Drive
By Michael Ross
This article was published by ComputorEdge, issue #2827, 2010-07-02, as a feature article, in both their PDF edition (on pages 10-15) and their website.
Of all the computer operating systems that are adequate candidates for running file servers (whether connected to the Internet or not), Linux has established itself as a favorite, for many reasons: It is built upon the same principles that made Unix the best choice decades ago. It is free to use and modify, thereby allowing companies, other organizations, and individuals to avoid the licensing fees associated with proprietary server-ready operating systems. It is a shining example of free open source software (FOSS), which means that anyone can examine the source code at any time, to make customizations as needed, and to check for potential security holes. Having countless programmers the world over examining the underlying code, has proven to be quite beneficial.
Incidentally, there is still some controversy over whether the term "Linux" should only be used to refer to the operating system's core, known as the "kernel", or to refer to the entire operating system. Only terminology purists insist upon the former, while the rest of the world now goes with the latter, and in this article we will do the same. Each edition of Linux is known as a "distribution" or "distro". Some distros are optimized for high security uses, while others are stripped down in size in order to consume fewer resources, such as disk space and system memory.
Proponents can point out that Linux is already lean, particularly compared to Microsoft Windows Server, its nearest rival. But that has not slowed down efforts to create distros that are even leaner and faster, and thus are ideal for use with older computers that are only capable of running smaller operating systems (such as the venerable DOS, or even Windows 3.1), but would never be able to support any of the more modern versions of Windows (especially the piggish Vista). As one might expect, the lightweight distros also turn out to be the best candidates for running on the increasing variety of mobile devices that do not have built-in operating systems.
Everyone is familiar with USB thumb drives (also referred to as "flash drives", "USB sticks", and other permutations). They initially started out years ago with relatively small storage capacity, but it didn't take long for them to reach 128 gigabytes (as of this writing), which is remarkable when one considers that hard drives had yet to reach that storage capacity not terribly long ago. The match-up of Linux with thumb drives was inevitable, given that smaller Linux distros were gaining greater attention and usage, at the same time that thumb drives were continually getting larger storage capacities.
There are numerous advantages to being able to install a Linux distro on a thumb drive. As an example, imagine that you are being sent to an overseas field office of your company, but you don't want to drag a laptop with you, because of the dangers of theft, environmental damage, the hassles of border checks, etc. Yet you still need to bring all of the data with you to perform your job, and it would be even better to not rely upon whatever operating system and software your foreign colleagues might make available. In these cases, having a lean version of Linux on a thumb drive would be so much more convenient than a laptop, regardless of how lightweight its vendor might claim it to be.
Other problems can crop up when you rely upon the technical support staff in an overseas office — and I speak from experience. You don't want to waste the time in setting up your preferred development and testing environment on someone else's computer, especially if time is limited. It would be so much better if you had all of your preferred applications and their settings — including your countless Web browser bookmarks and saved passwords — with you the moment that you arrived, so you can hit the ground running.
If you are sure that your destination will be blessed with a powerful computer preloaded with your favorite programs, and you won't have to share that machine with anyone else, then it might make sense to bring only the necessary data on your thumb drive, without an accompanying operating system. But there is always the chance that it would be advantageous to use PCs in other locations, and more than likely they will not be installed with the latest security applications — including those needed to detect spyware, viruses, and other malware. Bringing your own secure operating system, is the surest approach.
Linux Goes Live
To fully appreciate the progress that has been achieved in putting Linux in a pocket, consider the history of the efforts to make Linux portable in any form. After all, distros on thumb drives were not the first wave of pioneering technologies in lightweight Linux computing. Instead, that honor goes to the so-called "live CDs", which were the Linux distros that were made small enough so that they could be written to CD-Rs and CD-RWs, and also bootable by PCs. Because all modern PCs can be made to boot off of an optical drive (via settings in the system's BIOS), you can simply write the chosen Linux ISO file to an optical disc, pop it in the drive, and then boot off that disc. One of the earliest producers of live CDs was Knoppix.
These CDs make it possible to run Linux on any newer PC, even if it only has Windows installed on its hard drive. Consequently, you could try out the latest portable Linux distro, without being obliged to assign it to its own partition, and spend the time and effort installing it on the hard drive, as well as figuring out how to boot off of the new operating system in addition to the pre-existing Windows instance. Dual-booting of multiple versions of Windows only, is far less complicated than introducing a non-Windows operating system into the mix.
Knoppix, and the other CD-capable distros, do have some limitations. Although you can run all of the Linux applications — such as a Web browser — off of the optical disc, you cannot save changes within the operating system to the disc. Some of the distros were modified so that you could, if needed, store settings on a diskette, to be reused the next time that you booted off that disc. But now that diskettes are going the way of the dodo bird, saving any configuration to the hard drive may be the only option, assuming it is possible.
In the evolution of portable Linux, the next phase was the creation of distros that can run on a thumb drive, which is possible because newer PCs — even palmtops — can be configured to boot off of USB devices. That was a big step forward, but unfortunately those distros were not able to save application changes to those USB devices. Admittedly, this downside would have posed less of a problem in the years ahead, as more user applications and data transition from the desktop to the Web. Yet at the time, the majority of user data was still saved locally. As a result, these static Linux distros on thumb drives were of value mainly to people who restricted their computing activities to surfing the Web, checking online e-mail accounts, and anything else that could be accomplished using a vanilla environment that could not be customized on the go. These users could write data to their thumb drives at home, before hitting the road, and later upload that data to the Web; but they couldn't download and save files to their thumb drive.
Yet it didn't take long for Linux developers to modify portable distros so that they could not only operate on USB flash drives, but the operating system configuration could be modified as needed, and user data could be saved to the drive, including files downloaded from the Web. These distros are capable of doing this because they are employing a memory overlay system that makes possible the dynamic storage of data on the same drive as the operating system itself. These Linux distros include Fedora, Ubuntu, Damn Small Linux, Puppy Linux, and Xubuntu. There are numerous others, but this list is a good place to start, and we will next take a look at those first two. Beware that some of these distros may necessitate UNetbootin, which can be required to make a portable Linux desktop.
Distros on a Diet
In view of the fact that there are several portable Linux distributions from which one could choose, you may be wondering which of them, if any, have proven favorites among the Linux community. The four distros mentioned above, and all of the other ones not listed here, differ from one another in various ways — and thus each distro has its own advantages and disadvantages, as well as its own personality and community. Because of these differences, each one will have unique technical requirements for proper installation, such as the minimum storage size of the thumb drive, and the installation procedures. Consequently, we will not go into those details for each distro.
However, we certainly can examine some of the differences between two of the most widely-used candidates, Ubuntu and Fedora. These two were selected partly based on their popularity: according to DistroWatch.com, as of this writing, Ubuntu and Fedora are in the lead. This pair has also been chosen as a tip of the hat to their pioneering efforts and status in the realm of portable Linux.
Many years ago, the Ubuntu organization wisely decided that anyone on the Web could visit their site, enter an order for one or more copies of Ubuntu on CD-R, and the good folks at Ubuntu would send those discs, completely free of charge (even paying for the postage). Undoubtedly this proved to be a significant reason that propelled Ubuntu rapidly upwards in popularity, volunteer involvement, and industry attention. Furthermore, the organization's dedication to making everything free, was much appreciated.
Figure 1. Ubuntu website
Yet the CD campaign — which continues to this day — was just one component in Ubuntu's overall strategy. It didn't take long for this distro to gain a reputation for being complete, up to date, stable, easy to install, polished, and with a user community that is more friendly than the typical Linux crowd. Their thumb stick-ready version is known as Ubuntu Netbook Remix (UNR), and anyone interested in trying it out should consult the InstallationFromUSBStick page.
Fedora, owned by Red Hat, has an even longer history, and is considered one of the more well-respected and venerable distros available. However, during many of those years, it didn't exactly have a sterling reputation for stability, the way Ubuntu does. That's because the Fedora community has generally been more committed to keeping up with the latest changes in the Linux kernel and applications, even at the risk of causing more problems for people trying to install it and get their peripheral devices to work — which unfortunately has often been the Achilles heel for Linux adoption by power users.
Figure 2. Fedora website
Fortunately, each version of Fedora is proving more stable than the last, with 11 and 12 cementing this distro as an excellent choice. To learn the details about how to create a bootable thumb drive based upon Fedora, be sure to check their "How Do I Make Fedora Media?" page in their online documentation.
Regardless of which portable Linux distribution you choose, you will likely find that it can be an excellent alternative to lugging a laptop with you — provided that you have some sort of computer to plug it into.
Copyright © 2010 Michael J. Ross. All rights reserved.