Several projects exist that purport to be small, run-in-memory distributions. The most popular probably is Puppy Linux. Puppy has spawned several variations, and I have used it several times myself on older machines. But, I have discovered one that bowled me over completely—Tiny Core Linux. This distribution is a totally different beast and fills what I think is as of yet an unfilled category. To start, Tiny Core is tiny—really tiny. The full desktop version weighs in at approximately 10MB—this is for a full graphical desktop. Not many other options can deliver something like this. People of a certain age may remember projects like Tom's root/boot, or muLinux. Tiny Core fits somewhere in between those older floppy-based projects and “heavier” small distributions like Puppy. Along with this full version, there is an even more stripped-down version called Micro Core, which weighs in at less than 7MB. This version provides a command-line interface for all of you text aficionados. Tiny Core is designed to be run completely, or partially, from RAM. This means the system can be very fast and responsive. You also can set up the system so that it is loaded fresh on every boot, which reduces the probability of cruft working itself into your system dramatically. To get Tiny Core, download it as an ISO image, which can be burned to a CD or copied to a USB device. Basically, you can put it on anything bootable. When you boot it up, you get the full desktop in a matter of a few seconds—in a virtual machine on my Mac, it takes less than five seconds (Figure 1). Figure 1. You are greeted with a nice, clean desktop on bootup. The default gives you a window manager (flwm, the Fast Light Window Manager), a set of custom tools and a terminal (aterm). Everything else is available as an installable package, using its own custom package system called the AppBrowser (Figure 2). At the time of this writing, 3,170 packages are available. Packages are being added constantly, and there are very clear instructions on how to create and add your own packages. When you boot Tiny Core, you initially are dumped at a boot prompt (Figure 3). If you don't do anything, it times out and places you on the desktop. However, you can use boot codes, which have the form of tinycore option1 option2 ... . Some of these boot codes include: tce={hda1|sda1} — specify restore TCE apps directory.

waitusb=X — wait X seconds for slow USB devices.

swapfile{=hda1} — scan for or specify a swap partition.

base — skip TCE and load only the base system.

xsetup — prompt user for Xvesa setup.

text — start up in text mode.

{cron|syslog} — start various dæmons at boot time.

host=XXXX — set hostname to XXXX.

noautologin — skip automatic login.

desktop=xyz — use alternate window manager. Figure 2. The packages available to you are listed after clicking on Connect. Figure 3. On bootup, you are greeted with a prompt where you can enter options to control your system setup. Many other options are available. You can find them on the Tiny Core Wiki or list them during bootup. By default, you're logged in as user tc automatically and end up at the desktop with flwm as the window manager. One of Tiny Core's features is that you get a fresh system on every boot. But, what if you want to save settings over a reboot? What are your options? In Tiny Core, you have the option to back up any necessary files at shutdown and have them be recovered automatically on boot. These files are saved to the file mydata.tgz. By default, the system saves all the files and directories that exist under /home/tc. You can control what's actually backed up and what's ignored by using the files /opt/.filetool.lst and /opt/.xfiletool.lst. In .filetool.lst, you can add any files you want included in the backup. The file .xfiletool.lst contains a list of files to exclude from the backup. This backed-up home directory resides in RAM, so if you have a lot of files in your home directory, they will take up precious RAM. Also, as your home directory gets bigger and bigger, the startup and shutdown times grow as those files are being backed up and restored. Another option is to create a persistent home directory. You can tell Tiny Core where to find this with the boot code home=xxx , where xxx is the device partition storing your home directory (for example, sda1 for the first partition on the first drive). If you want to put the home directory inside a subdirectory, you can hand this in with: home=xxx/yyy

where yyy is the subdirectory name. This gives you a really fast basic desktop, which is fine for everyday use. But, what if you want to adjust the distribution for some special case? To figure out how you can personalize it, let's take a step back and look at how Tiny Core is put together and how it works. Then you'll see how to change the system to suit your application. The core part of the system is stored in a compressed filesystem that gets copied to RAM. Any extra applications are mounted from wherever they are stored as loopback devices, by default. They can be selected to be actually copied to RAM along with the core system, if you prefer. The advantage of this “run from RAM” system is that once the system has finished booting, you can remove the storage media. In the first case, let's assume you have the system booting from a USB device that you don't need to remove. Then, you have two options on how to set up the system. The first, mount mode, is to create a directory called tce on the USB device. In this directory, you can dump packages for all the applications you want to have available. These then are mounted as loopback devices. You can use a utility called appsaudit to maintain those packages. You have the choice of having those packages mounted at boot time, or you can have them mounted “on demand” (Figure 4). The other option is called copy mode. In copy mode, Tiny Core actually takes the contents of the package files and copies them all into RAM. This costs a bit more in boot time, but then the entire system is, again, running from RAM, so you get the expected speed-up once everything boots. You actually can control which packages are copied into RAM on an individual basis through the configuration file copy2fs.lst. The system can use this file to decide what is copied and what is mounted. Figure 4. Maintaining your installed packages is made simpler with a GUI application. These aren't the only methods available if you want to make a tailored distribution. Because Tiny Core is under the GPL, you can grab the source code and mess around as much as you please. You actually can just remaster the ISO to add in any extra packages you need for your application. In the ISO, there is a gzipped cpio archive named tinycore.gz. This file contains the core filesystem that is mounted in RAM when Tiny Core boots. You can do this work on any Linux box or even from within Tiny Core. If you want to do it in Tiny Core, you need to install a few extra packages before you start: advcomp.tcz and mkisofs-tools.tcz. Once you have all the tools you'll need, you can mount the ISO image: sudo mount tinycore.iso /mnt -o loop,ro