Search:  
Gentoo Wiki

Old_Hardware

Contents

Using Gentoo on old machines

Old computers don't have to run old software. Old software does not have its bugs covered and is bad for security.

Most modern distributions will be very sluggish when run on those machines; not because they use new software, but because they expect to be run on new machines and may automatically install large amounts of software. The thrust of Gentoo-on-old-hardware is to obtain a light, minimalist system that runs what you need it to and no more; unlike many proprietary OSes and the "heavier" distros such as Fedora, Gentoo starts very light by default.

Also take note: many of the basic ideas presented herein can be applied to newer systems to keep them running efficiently and smoothly.

Why Gentoo?

First, a caveat: contrary to popular belief, Gentoo is not a small distro in terms of hard drive space. It uses a LOT of space for compilation and for maintaining all the source files (/usr/portage/distfiles for example). Older machines tend to have small hard drives, so one of your top priorities is to use that space efficiently.

(Those numbers are entirely made up. I do run Gentoo on a 5 Gb partition. I have never even tried to accomodate Gentoo on less than 3 Gb...)

Note: Portage can easily push over half a gig. See this howto to learn how to minimize the space portage uses.

I got major disk space savings using a 256MB file with ext2 filesystem and 1024 bytes blocks, with a carefully chosen number of inodes (depends on the state portage is currently in - 160k inodes should be enough). Just mount it using a loop device under /usr/portage. However as the portage tree grows, you will have to enlarge the loop file and/or increase the number of inodes. This little bit of inconvenience really pays off though.

With that said, Gentoo is very configurable and can be made as "light" or "heavy" as the individual user desires, so it is a good choice for an old machine provided the user knows what he or she is doing.

You can still have Gentoo under 1 Gigabyte - with a help of newer machine (useful for old laptops). Just keep the portage tree on the newer one and heavily use NFS. Using emerge with ROOT=/mnt/oldlaptop on newer computer can speed things up. Just don't forget to use right /etc/make.conf and /etc/portage while compiling things for old and new - symlinks are your friends).

Note: It is possible to run Gentoo on P166 MMX with 96 MB RAM - and it works well.
Note: I run a Gentoo firewall on a P100 with 80 MB RAM - a happy 200 Bogomips.

Make.conf

One of the major, defining components of each individual Gentoo install is make.conf. What are good options for small hardware?

First, CFlags. You want to go with -Os. -Os is very similar to -O2, which most people use anyway, but it optimizes for size in addition to performing nearly all the optimizations that -O2 does (which is all a sane user would want anyway). -O3 is the kiss of death on an old machine; in addition to producing dangerously optimized binaries, it produces very large binaries, which will eat up your limited hard drive space and RAM. -Os is your friend.

Also consider the -pipe CFlag; this instructs the compiler to use memory instead of disk files for some parts of its compilation, which will not only speed the compile times but also save disk space. Unless you really need debugging information, try -fomit-frame-pointer too.

Portage Features

The main thing to remember here is not to enable CCache. CCache is wonderful for speeding up compilation, but it will happily consume 2 GB of disk space if you let it. Also make sure not to use "buildpkg" in the "FEATURES" section; if you really need a binary, use the quickpkg tool that comes with gentoolkit to make one.

USE Flags

Your mantra here is "less is more." Use the smallest set of USE flags you can get away with in make.conf, and make sure to set the "minus flags" where applicable. If you won't be using KDE or Gnome (and chances are you won't, if your hardware really is old), make sure you have -kde and -gnome in there. Also, don't be afraid of the -X flag: it won't destroy your system's ability to use X. All it does is tell Gentoo not to compile X support for some tools that are normally console or Curses-based but have an optional X gui.

The "minimal" flag has reported mixed success; for many people it makes X unusable, so compile X at least without it.

The best thing to do is to pass emerge USE flags for individual packages; always throw emerge the -av (ask and verbose) switches so you can see what USE flags could be set or unset for a particular package, too.

What to Emerge?

There are two things to remember here: 1) Install only what you need and 2) Look for lighter alternatives. The first of these just requires some forethought before hitting the commandline: "What do I want this machine to be?" Basically, don't install something you don't intend to use; this mindset alone will save you 90% of your problems.

The second takes a little digging around sometimes, as well as willingness to think outside the box. The biggest problem packages are the KDE and Gnome desktop suites; these have become so ingrained into the minds of Linux users that they are sometimes considered to be Linux in the same way that Luna and Aqua are considered to "be" Windows XP and Mac OS X, respectively. Not many people realize that there are a plethora of alternative offerings for window management out there.

If you are wedded to the Gnome/KDE/Windows-style of desktop, consider IceWM. It's a pain to theme for but it acts very much like the aforementioned DEs and is light on resource consumption. It's also surprisingly feature-rich, coming with a network and CPU monitor "out of the box." Be prepared to edit some config files for your menu and fine-tuned behaviors though. It's not bad, just annoying.

For those willing to try new things, I highly recommend Fluxbox. It is much easier to configure than IceWM, though less familiar and friendly; it lacks a "start menu," for example, though you shouldn't need one once you get the hang of editing the menu file (which is very easy, by the way).

Neither of these WMs provide desktop icons or a file manager; for icons, use idesk, and for a filemanager try Rox or DFM. You'll be surprised how Gnome-like or KDE-like (or Windows-like, for that matter) you can make these "alternative" window managers.

What about other applications? For an office suite, GNUmeric and ABIWord are far lighter than the bloated (though still svelte compared to its Microsoft counterpart) OpenOffice.org suite. If all you want is word processing and even ABIWord is too heavy, consider Ted or just use GEdit. For browsing, Dillo is an interesting alternative to Mozilla Firefox and Konqueror. Gnome-terminal and Konsole can be replaced by the tiny and versatile ATerm. If you're not afraid of using console apps, IRSSI can repalce X-Chat for IRC, and naim (NCurses-based AIM service) can replace GAIM or Kopete. These can be run in a terminal in the X session.

The bottom line is, your Gentoo is uniquely yours, and only you decide what goes into it. Make the right choices, and even old hardware will be responsive and stable.

Links

The RULE Project has the objective of optimizing linux to run on old hardware. It is kinda based on Fedora, that is, you wont find anything worth of downloading there, maybe, but the general discussion and techniques used there are easily applied to Gentoo.

The Jackass! Project provides highly optimized pre-compiled processor-specific toolkits for the x86 platform. Jackass! significantly improves the performance of Gentoo on older hardware.

RAM vs. Disk Space

I have an old laptop, hard disk space is not a problem (1.9 GB drive swapped for 40 GB) but the RAM slots are maxed out at 64 MB. I think many other users are in the same position. Here the key is not optimizing for space but to start the machine with as few services as possible, and you just turn them on manually when you need them.

Retrieved from "http://www.gentoo-wiki.info/Old_Hardware"

Last modified: Tue, 19 Aug 2008 23:49:00 +0000 Hits: 15,184