LWN.net Logo

Tiny Core Linux 2.1: Less is more

July 8, 2009

This article was contributed by Koen Vervloesem

While most Linux distributions have been growing in the last years to the size of a DVD, others go in the other direction and try to minimize their footprint. Most Linux users will know Puppy Linux and Damn Small Linux, but one of the more recent and even more minimalist projects is Tiny Core Linux, the brainchild of Robert Shingledecker who used to work on Damn Small Linux.

Tiny Core Linux is a Linux distribution that aims to be a minimal but usable desktop operating system. The minimal system requirements are a 486DX processor and 48 MB RAM. Your author downloaded Tiny Core 2.1, which comes in a 11 MB iso file. Users can burn it on CD or install it to a USB pen drive. Unsurprisingly, the distribution boots very fast and shows a minimal desktop with a one-color background. There's no simple installer to write Tiny Core to the hard drive, but there is a step-by-step installation guide on how to partition a hard drive, copy Tiny Core and install the GRUB boot loader.

Under the hood we see the Linux 2.6.29 kernel, Busybox, Tiny X, FLTK, and the not so flashy but useful JWM window manager. By clicking on the desktop the user gets a menu with access to the minimal set of applications. The wbar panel at the bottom gives access to the Aterm terminal, Tiny Core's control panel application "cpanel" with access to some system tools and the "appbrowser" for installing applications.

tiny
core appbrowser

From less to more

Tiny Core's philosophy seems to be: start small and add programs only as needed. This means that the user doesn't get bothered with a bloated set of applications that are rarely used and has complete control over which applications or drivers (e.g. for an Atheros wireless card) are installed. Tiny Core is contained in a compressed cpio archive populating the initial ramdisk upon booting of the Linux kernel and runs entirely in RAM. Additional applications can reside in RAM or be installed into a storage drive.

Tiny Core essentially has four "modes of operation", one volatile and three persistent ones:

  • Cloud/Internet: This is the default mode, where Tiny Core boots entirely into RAM. If the computer has a working internet connection, the user can explore the application extension repository and install extensions at will. Of course, the downloaded applications are not persistent, as they are installed into RAM.
  • PPR/TCE: In this mode, Tiny Core uses a writable persistent storage partition, which can be specified with the boot option tce=hdXY. The storage partition becomes a "Persistent Personal Repository" (PPR) for so-called TCE extensions. When the user installs extensions, they will be saved on the storage partition into the directory tce. When Tiny Core boots, all TCE extensions on the partition will automatically be loaded into RAM. A disadvantage is that adding many TCEs may quickly exhaust system memory.
  • PPR/TCZ: In this mode, Tiny Core also uses a Persistent Personal Repository on a storage partition, but it uses the TCZ extension type, which is more RAM-friendly.
  • PPI/TCE: In this fourth mode of operation, extensions are installed into a Linux partition or a loopback file, which can be specified with the boot option local=hdXY. The developers call this mode "Persistent Personal Installation". It boots faster than the other modes, because no loading or mounting occurs during boot. Moreover, it has the same RAM savings as the PPR/TCZ mode.

Compressed applications

As mentioned above, applications can be installed in Tiny Core in two ways: as a TCE extension or as a TCZ extension. A TCE extension is basically a tar.gz archive with optional menu and/or icon, which gets loaded from the partition into RAM completely. In contrast, a TCZ extension consists of a cramfs or ziofs compressed mountable image of an application directory, that becomes mounted in /tmp/tcloop and symlinked into the root filesystem. For example, after installing alpine the alpine.tcz image is mounted in /tmp/tcloop/alpine and /usr/local/bin/alpine is a symlink to /tmp/tcloop/alpine/usr/local/bin/alpine. Therefore, a TCZ extension only uses RAM when the application is running. The user can mix and match both extension types, but some extensions are not available as a TCZ type.

Installing packages can be done by clicking the Apps icons and choosing TCE or TCZ in the "Connect" menu item. This "appbrowser" program is a (too) basic package manager with dependency resolution. When the user has installed an application it gets an icon in the Apps menu on the desktop and maybe in the wbar panel. Tiny Core Linux has hundreds of applications, including Abiword, Audacious, Filezilla, Firefox, gFTP, Gimp, Java, MPlayer, Opera and X-Chat, and it is rather up-to-date as the inclusion of Firefox 3.5 shows.

tiny core firefox

Just like Tiny Core has an option to make the downloaded applications persistent, there's also a boot option for a persistent home directory: home=hdXY. This will mount /dev/hdXY/tchome to /home/tc. Tiny Core also offers an encrypted home directory: the user first chooses "Make Crypto Home" from the Tools menu to create an encrypted loopback file with a chosen password. Once this is created, the boot option cryptohome=hdXY will make Tiny Core prompt for the password during boot.

For the adventurous users

On the project's wiki there's a guide for creating extensions and guidelines for extension submission. Even more, adventurous users can remaster Tiny Core and make their own distribution. This is easy as it comes down to copying the iso's contents and adding or removing files or integrating extensions. Then the directory is packed into an iso image. There's even documentation about using a custom kernel, for example if you need real-time performance. For the even more adventurous ones, there is Micro Core Linux, which is Tiny Core Linux without an X environment. The 7 MB iso file boots into a BusyBox prompt and extra applications can be downloaded and installed with the tce-wget command.

Probably the best use case for Tiny Core Linux is a sort of portable environment that the user carries in his pocket on a USB pen drive. Tiny Core Linux isn't really beautiful or fancy, but it does what it has to do and has a fair amount of well-known software packages. That said, it still looks a bit too rough. One illustration of this is that there's no wireless support out-of-the-box, although the user can solve this problem simply by installing the wireless and wireless_tools extensions via a fixed network. Another problem is the package manager, which could use some work. Hopefully we'll soon see some spin-off distributions coming out of the Tiny Core community. At least one has been started already: NetbootCD, which allows the user to download and run several Linux netboot installers.


(Log in to post comments)

Tiny Core Linux 2.1: Less is more

Posted Jul 9, 2009 14:07 UTC (Thu) by ibisum (guest, #59406) [Link]

This would be a lot more impressive if it was self-hosting, development wise.

That is, if it had a compiler onboard and everything you need to build apps for the distribution itself was onboard and functional from initial boot-up ..

Tiny Core Linux 2.1: Less is more

Posted Jul 9, 2009 14:54 UTC (Thu) by sbergman27 (guest, #10767) [Link]

Yeah. And if it included Gnome, KDE, and XFce by default. And Eclipse, along with common plugins. And Django and RoR application servers. And a Bugzilla server.

Tiny Core Linux 2.1: Less is more

Posted Jul 12, 2009 2:57 UTC (Sun) by giraffedata (subscriber, #1954) [Link]

This would be a lot more impressive if it was self-hosting, development wise.

That would be cute, but I don't think it would impress me.

I have a bicycle that does not contain any tools for designing or building bicycles, or even for enhancing itself. And I would find it quite unnatural if it did.

Tiny Core Linux 2.1: Less is more

Posted Jul 9, 2009 17:11 UTC (Thu) by Tet (subscriber, #5433) [Link]

Tiny Core's philosophy seems to be: start small and add programs only as needed.

An excellent idea, and one I wish the more mainstream distributions would take to heart. OK, so Tiny Core takes it to extremes that wouldn't be appropriate for a mainstream distribution. But as a general principle, starting small and adding only what you need will result in a much better system that one where you install the kitchen sink from day one. It's a philosophy I've followed for years now. But modern distributions are making it harder and harder to do. Even selecting just the core OS at install time brings with it significant bloat on, say, Fedora or Ubuntu.

Tiny Core Linux 2.1: Less is more

Posted Jul 16, 2009 11:12 UTC (Thu) by kragil (guest, #34373) [Link]

I think package managers just need to get smarter. The DE should provide some default use cases, but once you encounter a file you cannot open the OS should just install the appropriate app.

And the DE should offer a few more activities that once selected install the additionally needed software.

Tiny Core Linux 2.1: Less is more

Posted Jul 28, 2009 8:05 UTC (Tue) by Duncan (guest, #6647) [Link]

Much of the problem with binary based distributions is compile-time
dependency choices. Many an app can link with or without KDE and/or GNOME
support, for instance, but if they are linked in, they're required as
dependencies to run, as well. That's why most such distributions choose
one desktop over the other, and don't support the other one as well as
they could, because they don't want to /require/ that both be installed as
would be necessary if they turned on linking against both. It's also why
some distributions end up with X and even KDE/GNOME dependencies for a
server targeted installation that may never run either one -- because they
some dependency has been linked to X and/or the DE for desktop use, and
it's now pulled in for no-X server use as well, because otherwise the
binary won't run!

This is in turn one of the strengths of good from-source distributions.
If there's a compile-time dependency option exposed by upstream, it's
exposed by a good source based distribution as well, and YOU get to decide
what's linked in at compile time and thus must be present at run time.
This makes for FAR less bloat (provided you, the admin, make good choices
setting up what to link in at compile time), because only what's actually
required (non-optional), and what's actually useful on a particular
installation (optional, with support for it desired), are linked in and
thus required for run-time use. Compiling from source is thus NOT just
for the ricer crowd, but for those wishing less bloat for security or
admin reasons as well, since they can choose exactly what is loaded on the
system, and when done correctly, can rest well in the knowledge that 100%
of it is actually either required for something they use, or is
functionality they actually use. No bloat from options turned on just to
support OTHER people's systems.

What's /really/ great about this is that from-source is actually a
practical choice time-wise, etc, on a modern system, now, and will only
get more so as time goes on and Moore's law does its thing. A decent 2+
GHz quad-core with 4+ gigs RAM isn't an unreasonable system for an
individual desktop or laptop purchased computer these days (US$500-600,
perhaps, desktop, a bit more laptop), and with it, from-source becomes
almost as trivial as binary-based installations. The actual instance
configuration ends up taking more time than the build, and it's easily
possible to do the build limited to a couple cores while continuing to
work full speed on the other pair of cores, for no real system
responsiveness slowdown even when building updates in the background.
Thus, there's little effective slowdown in installation over what you'd
normally be doing anyway.

While I'm a Gentoo user, I've been reading that Arch Linux works
reasonably well in this mode as well, and if there aren't other
distributions doing it this way now, there likely will be by the time oct-

OTOH, the desktop -> laptop and laptop -> netbook trends reverse the more
CPU and memory capacity trends of past decades, so while we see quad-core
desktops now, desktops are already dieing as the common personal computer,
and laptops are only beginning to hit the quad-core 4 gig level at which
from-source really becomes trivial. By the time that gets mainstream
laptop, people may be moving to netbooks, after which the UI becomes the
practical issue on further size reductions, as smaller platforms
(cellphone, palmtop, etc) require quite different modes of interaction.
So it may be that we have to wait for quad-core quad-gig RAM netbooks to
become popular before from-source /really/ hits its stride, but I do
believe that's ultimately where the trends are headed, as the biggest
from-source negative becomes ever more trivial, while the same advantages
it has always had remain.

Duncan

Tiny Core Linux 2.1: Less is more

Posted Jul 12, 2009 12:36 UTC (Sun) by Cato (subscriber, #7643) [Link]

The fact that it includes Firefox 3.5 is impressive, though we'll have to see if less popular apps are also kept updated. Too many small distros don't manage to package recent versions, so the only packaged choice is an older browser with known security vulnerabilities.

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds