USB Pendrives and Distributions for Them
A pendrive is a USB storage device. You plug it in to a USB port, and if the pendrive is compatible with your operating system, it should look exactly like another disk on your system. These days, it is easy to find pendrives with 1GB of storage.
It so happens that there has been an explosion of bootable live CD versions of Linux. Both commercial and noncommercial Linux distributions are providing live CDs (including Linspire, SUSE, Ubuntu, Kubuntu, Knoppix and Mepis, to name only a few—there are many more).
Imagine a mixture of both concepts—a USB storage device and a live CD version of Linux. You can pack a lot of features of a GNU/Linux live CD into 1GB. The USB pendrive has the advantage of being writable, which the live CD lacks. So, you can boot Linux from a pendrive and store data on it too. The end result is that, as long as you can find a machine that will boot from a pendrive, you have a fully portable version of Linux that carries your applications, settings and data.
I cover three LiveUSB distributions in this article: SLAX, Damn Small Linux (DSL) and Flash Linux. Each one has different window managers and different apps.
SLAX works with tmpfs and Unification fs (UFS), which gives it some nice advantages. SLAX is based on Slackware Linux with the 2.6 Linux kernel.
DSL is a little distribution of 50MB. DSL configures Fluxbox very nicely. Some of the apps included are Mozilla Firefox, the Slypheed mail client, xmms, text editors, graphics viewers and more. It includes a 2.4 Linux kernel with good hardware detection, but it doesn't have the big apps other distributions have, such as The GIMP. It is a compact distribution with a script to install it to LiveUSB.
Finally, Flash Linux is a solid distribution that uses the 2.6 kernel and the fast JFFS2 filesystem. It has good speed, both as a live CD and LiveUSB, and it includes large applications, such as The GIMP and OpenOffice.org. It uses grub, bootsplash, framebuffers and GNOME, and is based on Gentoo.
The biggest challenge in using a USB pendrive for your Linux distribution is booting the pendrive. Old motherboards do not support the ability to boot from USB hardware, so you may need to use a floppy disk to boot your USB-based distribution. Newer motherboards let you boot drives usually referred to as USBHDD, USBZIP, USB-FDD and others, such as USB-CDROM.
The first step to using a pendrive is to delete the original pendrive partitions, if there are any. Then, add a FAT16 partition, and format it with mkdosfs. I used cfdisk to do the work, but you can use fdisk too.
Check your dmesg log when you plug in the device to see if it is working:
dmesg | tail
You should see a message similar to the following:
sda: assuming drive cache: write through sda: sda1
Format the partition you created with the following line:
mkdosfs -F 16 /dev/sda1
(Change sda1 to whatever partition is appropriate for your system.)
Unplug the hardware, and plug it in again. You now are ready to install the distribution.
Go to the DSL Web site (see the on-line Resources) and download the ISO image file for the current version of DSL, and burn the ISO to a CD or DVD. Boot from this CD or DVD. The boot starts with a welcome screen, like most live distributions.
DSL looks for hardware, and then it installs and configures it. Depending on your machine, it will bring up an X server running Fluxbox in less than two minutes.
After booting from the DSL live CD, right-click on the Fluxbox desktop to open the Fluxbox menu. Go to Apps→Tools→Install to install it to your USB pendrive. Here, you have two options for installing the distribution: install to USBHDD or USBZIP hardware. DSL will ask about the location of the pendrive, and it also asks if you want to install DSL from the live CD, from a file or from the Web.
I suggest you use your broadband connection to download the files. In fact, if you have a router that supports DHCP, DSL should recognize your Ethernet card and have no problems accessing the Internet at boot time. DSL supports PPPoE too, if your Internet connection requires it.
I missed the features of the 2.6 kernel (the next release of DSL should support 2.6), but it's still a good little distribution. I think DSL is fine as it is, but if you need a big office suite, you should use SLAX. Resources that you must read if you use DSL are the Wiki and the complete DSL forums. You will find many tips and tricks with plenty of information that will be helpful if you run into problems.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Server Hardening
- May 2016 Issue of Linux Journal
- EnterpriseDB's EDB Postgres Advanced Server and EDB Postgres Enterprise Manager
- The Humble Hacker?
- The US Government and Open-Source Software
- BitTorrent Inc.'s Sync
- The Death of RoboVM
- Open-Source Project Secretly Funded by CIA
- New Container Image Standard Promises More Portable Apps
- ACI Worldwide's UP Retail Payments
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide