Gentoo Linux

From Wikipedia, the free encyclopedia

Gentoo Linux
Gentoo stylized "g" logo
Website: www.gentoo.org
Company/
developer:
Gentoo Foundation
OS family: Linux
Source model: Open source
Latest stable release: 2006.1 / August 30, 2006
Update method: Continual
Package manager: Portage
Supported platforms: i386, x86-64, PowerPC, PowerPC 64, sparc, DEC Alpha, ARM, MIPS, PA-RISC, S390, IA-64, sh, m68k
Kernel type: Monolithic kernel
Default user interface: Console, Framebuffer, X Window System (various)
License: GPL
Working state: Current

The Gentoo Linux operating system (pronounced /ˈdʒɛntu/) is a Linux distribution named after the Gentoo penguin. It is designed to be modular, portable, easy to maintain, flexible, and optimized for the user's machine. All tools and utilities are built from source code. For convenience, however, several large software packages are also available as precompiled binaries for various architectures via the Portage system.

Contents

[edit] History

Gentoo was initially created by Daniel Robbins as the Enoch Linux distribution. The goal was to create a distribution that was built from source code, tuned to the hardware, only included required programs, and decreased maintainer workload through scripting.[1] At least one version of Enoch was distributed: version 0.75, in December 1999.[2]

Compilation issues revealed problems with the GNU Compiler Collection (gcc), used to build from source code. Daniel Robbins and the other contributors experimented with "forked" versions of gcc, finding a version that gave a 10% to 200% speed increase over the "official" gcc. At this point, Enoch gained a reputation for its speed, prompting the name change to Gentoo Linux (the Gentoo species is the fastest swimming penguin).[3] The modifications eventually became part of the official gcc (version 2.95), and other Linux distributions experienced similar speed increases.

After problems with a bug on his own system Robbins halted Gentoo Linux development and switched to FreeBSD for several months, later saying "I decided to add several FreeBSD features to make our autobuild system (now called Portage) a true next-generation ports system".[4]

The Gentoo Linux 1.0 was released March 31, 2002.[5]

Robbins had wanted Gentoo Linux to become a commercially successful project, but found an appropriate business model difficult to achieve. In 2004 he set up the non-profit Gentoo Foundation and transferred all copyrights and trademarks to it and stepped down as Chief Architect of the project - later working at Microsoft's Linux Lab for almost two years.[6][7] He is currently in the process of returning to Gentoo as a developer.[8]

The current board of 5 trustees was elected on October 21, 2006. There is also a subsidiary 7 member Gentoo Council whose members "decide on global issues and policies". The current Council members were elected September 11, 2006 by 121 active Gentoo developers.

[edit] Portability

The Gentoo FreeBSD logo, derived from the BSD Daemon
Enlarge
The Gentoo FreeBSD logo, derived from the BSD Daemon

Gentoo is available on more architectures than most other Linux distributions.

Although originally designed for the x86 architecture, it has been ported to many others and currently runs on the x86, PowerPC, PowerPC 970, SPARC, x86-64, IA64, MIPS, DEC Alpha, PA-RISC, ARM, zSeries/s390, SuperH and 68k architectures. Gentoo was the first distribution to offer a fully functional 64-bit Linux computing environment (user space and the kernel) for the PowerPC 970 (G5).

There is also a "Gentoo for Mac OS X" project which allows Mac OS X users to use Gentoo's Portage to install packages, in a similar way to the one provided by Fink. Although still a work in progress, this project can coexist with Fink because it uses the same environment as Mac OS X instead of creating a new one.

Portability toward other operating systems, such as BSD-derived ones, are under active development on Gentoo/ALT project. The Gentoo/FreeBSD project already has a working release, while Gentoo/NetBSD, Gentoo/OpenBSD and Gentoo/DragonFly are being developed. There is even a project to get Portage working on the Hurd although development is slow.

[edit] Portage

Main article: Portage (software)
Portage in action
Enlarge
Portage in action

Portage is similar to the BSD package management system called ports; in fact it was originally designed with FreeBSD's ports in mind. Gentoo's Portage system works similarly to Debian's APT. Portage is written in the Python programming language, and is the main utility that defines Gentoo. Although the system itself is known as Portage, it consists of two main parts, the ebuild system and emerge. These two have roughly the same relation as rpm and yum, or dpkg and apt, in that the ebuild system takes care of the actual work of building and installing packages, while emerge is a front-end that takes care of things such as dependency resolution and other miscellaneous issues. A GUI Qt-based front-end known as Kuroo and a gtk-based front-end known as Porthole are also available for working with Portage.

[edit] USE flags

The Portage system offers the use of "USE flags," which allows users to indicate which software features they would like to include while building packages. For example, there is a USE flag to include DVD support, where available, in all packages that are compiled after the flag is enabled. The USE flags can affect which dependencies are built or what options are sent to the program when it is compiled.

The specification of USE flags is the usual way to configure programs on Gentoo. For a list of available USE flags, see the Gentoo website.[9]

[edit] Ebuilds

Main article: Ebuild

Gentoo does not, by default (see next paragraph), use binary packages as package management systems like RPM do, employing instead a format known as the ebuild. The main difference between RPM files and ebuilds is that RPMs are precompiled binaries, whereas ebuilds are bash-scripts with variables and functions which contain a description of the software, and instructions on how to obtain, configure, compile, and install it. There are nearly 25,000 ebuilds available, the majority of which are distributed by the Gentoo mirrors. New and updated ebuilds can be obtained by synchronizing the local ebuild repository with the mirrors. This is done by executing the command emerge --sync. Recently, Gentoo has begun providing pre-compiled binary packages for many common programs, especially those which are lengthy to compile, such as Mozilla Firefox and OpenOffice.org. These are still installed with emerge, just by appending a "-bin" to the package name to instead install the binary version. (Note: These binaries are compiled for the x86 architecture and will not work on ppc, sparc, etc.)

Gentoo does have a binary packaging format, which is a .tbz2 file (tar with bzip2 compression) with additional metadata. This feature enables the building of binary packages on one system (using Portage's buildpkg or quickpkg) followed by quick installation on other, identical systems (with Portage's getbinpkg or emerge -K). See Portage Features in the Gentoo Linux Handbook for more information.

[edit] Masking

Masking is how Gentoo determines which packages are suitable for a system. Ebuilds designed for different architectures or experimental software are usually masked in a way that will not allow a stable system to install them without proper user intervention.

Packages that generally just require some testing but will often work fine are said to be keyword masked (i.e. they are available for systems with an ACCEPT_KEYWORDS make.conf entry starting with the character ~, such as ~x86, ~amd64, ~ppc). The standard way to unmask an individual keyword masked package is by adding an entry to /etc/portage/package.keywords.

Packages with known problems or not considered mature enough to be candidates for stable are hard masked by one of the various package.mask files in /usr/portage/profiles, and such entries are generally accompanied by a comment from developers explaining the reason for the mask. The standard way to unmask a hard masked package is to add an entry to /etc/portage/package.unmask. This should be done entirely at one's own risk.

[edit] Init system

Gentoo's init system is another important feature of its system. It is similar to the System V init system that most Linux distributions use, but uses named run levels rather than numbered ones and dependency based scripts. It also includes a command called rc-update which manages runlevels.

A faster init system known as initng is available and under active development on the Gentoo forums.

[edit] Logo and mascots

The official Gentoo logo is the stylized G resembling a silver magatama. Unofficial mascots include Larry the cow and Knurt the flying saucer. In fact as Larry appeared originally on the official website, it can be considered semi-official. However, there is much controversy around Larry, laid out in several heated debates on the Gentoo forums, mainly because of his/her gender ambiguity.

[edit] Installation

Gentoo may be installed in several ways. The most common way to install it is by using the Gentoo LiveCDs, but as with any Linux distribution, it can also be installed by most LiveCDs, and even from existing Linux installations.

Installation of Gentoo can be completed by following the Gentoo Handbook. Additionally, several other methods installation are listed in the Alternative Installation Method HOWTO, most of which are targeted at experienced users or users unable to boot from the Gentoo live CD.

As of version 2006.0, the Gentoo Foundation has now released a GTK+ based installer to greatly simplify the process of installing the distribution from scratch.[1] More advanced users will note that the new installer also brings back the stage 1 installation (see below) as a common installation method.

[edit] Catalyst

Starting with 2004.0, Gentoo introduced a tool called Catalyst, which is used to build all Gentoo releases and can be used to build one's own customized install media.

[edit] Stages

Traditionally installation could be started from one of three base stages:

  • Stage1: System must be bootstrapped and the base system must be compiled.
  • Stage2: System has already been bootstrapped, but the base system must be compiled.
  • Stage3: System has already been bootstrapped and the base system already compiled.

As of November 2005, only stage3 installations are officially supported. Although tarballs for stage1 and stage2 are still distributed, the instructions for installing from these stages have been removed from the handbook and put into the Gentoo FAQ. To get an install similar to that of a stage1, you can complete a stage3 install, then optimise your CFLAGS and recompile all of your packages.

[edit] Version history

Gentoo 2006.0 desktop
Enlarge
Gentoo 2006.0 desktop

Note that once Gentoo is installed, it becomes "versionless," that is, once an emerge update is done, the system is the latest version. So, if the system was installed from a 2005.0 CD and 2005.1 was released, and the system was updated, then it is up to date. A great advantage to this, is that system administrators can keep a system more up-to-date, because there is less of a 'waiting period' before a specific program can be updated. The versions are only to make new Gentoo installs up-to-date from the start.

Even though the versioning system changed to years, the numbering version system still continues. For example, /etc/gentoo-release might contain "Gentoo Base System version 1.6.13" (Modified Aug. 26, 2005).

[edit] Criticism

Gentoo has attracted criticism in a number of areas.

Requires a good internet connection. This seems to be related to downloading sources prior to building packages. However, any other distribution that has internet updates has to download binary packages instead, and the sizes of binary and source packages are usually comparable. Source files can be pre-fetched with the emerge -f/--fetchonly flag, or they can be fetched in the background while compiling by enabling the parallel-fetch feature.

Long initial installation. While many users praised the traditional long, largely-manual installation process for what it taught them about the under-pinnings of Linux, it also put off many others. The current “Stage 3” installation is much easier, but remains significantly more daunting than nearly all other distributions. However, if Gentoo is "...all about choice and customization..." then it's inevitable that more choices need to be made, which makes this an argument usually used by inexperienced users or those not aware of the Gentoo Linux goal.

Slow package installation. Compiling from source means that packages are slower to install. In the extreme cases of KDE and OpenOffice.org, this will take hours, or even days on older hardware. Also compiling these packages requires a lot of hard disk space (4-6 GB for OpenOffice.org - see app-office/openoffice ebuild for more information). Generally, Gentoo users accept these delays as the cost of being able to apply their own compile-time options, but there are now pre-compiled binaries for large popular applications such as KDE, OpenOffice.org, Mozilla Firefox. Using these binaries one can install the packages within minutes.

[edit] Gentoo-based distributions

[edit] See also

[edit] References

[edit] External links

Look up Gentoo Linux in Gentoo-wiki, the wiki about the Gentoo Linux distribution.
Wikimedia Commons has media related to:

[edit] Official

[edit] Community

[edit] Press

[edit] Distrowatch


Linux distributions
CentOSDebianFedoraGentooKnoppixMandriva LinuxRed Hat Enterprise LinuxSlackwareSUSE LinuxUbuntumore…comparison…