Linux Containers Authors: Liz McMillan, Elizabeth White, Zakia Bouachraoui, Pat Romanski, Stefana Muller

Related Topics: Linux Containers

Linux Containers: Article

A new distro in town: Gentoo emerges victorious

Nick Petreley sans Debian may seem like cereal without the milk, but Gentoo is the new kid on his box

(LinuxWorld) — A relatively new distribution called Gentoo Linux is gaining a rapidly increasing, rabidly loyal group of users. The increasing popularity of Gentoo is almost difficult to explain, given that it's clearly a distribution by geeks, for geeks and for nobody but geeks. Obviously a geek can set up a Gentoo system for a non-geek, so you may find novices using Gentoo. You just won't find many novices installing it.

To be more precise, Gentoo Linux is not really a distribution but a meta-distribution. You don't usually install pre-compiled binaries when you add software to a Gentoo system. You most often compile and build the binaries yourself, according to your own personal optimization and configuration settings. Gentoo gives you the ability to treat almost the entire system this way, but it also lets the less-patient users start with a basic pre-compiled system. After that, you can build your own higher-level packages on top of that core installation.

This may sound a lot like another project called "Linux from scratch," but Gentoo has an important difference in philosophy. While Gentoo Linux makes it possible to compile and configure everything on your system exactly the way you like, it also provides you with more structure and tools to ease the process and automate updates.

The heart of Gentoo is its packaging system, Portage. Portage is similar to the BSD Ports system in that it installs software by retrieiving source code and building it on your system, resolving any dependencies as necessary. If any given package is available only in binary form, Portage grabs and installs it that way.

Gentoo considers the process one of merging software into your system, so the basic command for installing software is emerge, which is mostly intuitive. If you want to get rid of some software on your system, you use the command emerge unmerge, which isn't entirely intuitive, but it works.


If you have any familiarity at all with the process of partitioning hard drives, mounting partitions and basic Unix commands, it isn't all that difficult to install Gentoo if you simply pay careful attention to the instructions. However, the process certainly isn't "easy" when compared to mainstream distributions. You can't just pop in a CD-ROM and answer a few questions; you have to get your hands dirty. Just how dirty depends on the version of Gentoo you are attempting to install, as well as your choice of installation methods. If you want the most-optimized system possible, installation will be a long and tedious process. If you can deal with a generic base system for Gentoo but want to optimize most of the high-level software, it will still be a long and tedious process, but less so.

I installed Gentoo Linux 1.4 rc4, which is available for a few different processor types, but the x86 support is only generic x86. Under normal circumstances, Gentoo offers a choice of optimized base systems for a variety of x86 processors so that you don't have to compile everything from scratch to get enhanced performance on Athlon, Pentium 4, or other systems. You can still compile everything from scratch if you like, but installing an optimized base system makes it easier to get a performance boost without as much time and trouble up-front.

I chose the quickest installation, which sacrifices a little performance. The basic software on my system is pre-compiled for a generic x86, but most of the rest of the software is optimized according to my preferences. For example, XFree86, KDE and most of the applications I use daily are all compiled for my Athlon system with the optimization switches I like.

There's no point in walking you through the installation process, because it is fairly well documented on the Gentoo Web site. But it might be useful to share some of the highlights and difficulties I had — and how well Gentoo held up under the stress.

The Gentoo documentation does an excellent job of walking you through the process of setting up an Ethernet card so that you can start grabbing things off the Internet almost immediately. The instructions may not be adequate for someone who has anything but a reasonably vanilla system, but anyone likely to be satisfied with Gentoo is also likely to be able to figure out how to handle such differences. Like I said, Gentoo is not for novices, and novices should avoid it unless they are interested in using the experience to graduate from their novice status.

I encountered a number of problems that were the fault of my hardware and motherboard BIOS, and the end result was that I could not boot directly into Gentoo after finishing the initial installation. I was concerned that I might have to reinstall everything from scratch because Gentoo is such a "from scratch" approach in the first place. That wasn't the case. I rebooted the Gentoo CD, got to a command prompt, mounted a few critical partitions and everything I needed to fix the problems was right at my fingertips.

Mother please I'd rather not do it

Gentoo uses GRUB as the default boot loader. At first I thought that was a bad choice, because I couldn't make GRUB work. It turns out my Biostar motherboard won't allow me to boot from the third hard drive (the primary IDE drive on the second IDE port, which is /dev/hdc). I solved the problem temporarily by adding a Gentoo boot option to the LILO configuration I use to boot Debian from the second drive. But in the long run, I had enough problems with the Biostar motherboard that I finally swapped it out for an older but more workable Asus. Once the new motherboard was in place, the system booted Gentoo directly from the third drive without problems.

Once I had the basic system installed and running, the rest was just a matter of getting used to the Gentoo way of doing things.

If you want to install a package in Gentoo, you can usually find the package you want by typing emerge -s <search term>. Then you can install the package by typing emerge <package name>. The Portage system will resolve all the dependencies, download the source and compile it for you according to custom options you specify in choice Gentoo configuration files. There are other utilities available, such as qpkg, to manage packages, each with its own set of strengths and weaknesses.

In some respects, Gentoo is more hands-on than distributions like Debian or Red Hat. For example, when you install a package in most other distributions and that package has to be initialized at boot time in one of the runlevels, the package manager usually puts the startup script in the appropriate runlevel directory, automatically. Gentoo makes you do this yourself, but the process is not manual. If you want to run ntpd at boot time by default, you would issue the command rc-update add ntpd default. This puts a link to the ntpd startup script in the directory /etc/runlevels/default. Notice also that this is not the traditional Unix SysV path for runlevel scripts (one fewer reason for SCO to think it can sue the Gentoo folks, I guess).

Likewise, when you install a package that makes changes to files in the /etc directory, you should run etc-update. Unfortunately, this utility is far less intuitive than rc-update, and I still haven't got the hang of it.

I had a problem with the custom Nvidia kernel module for XFree86, as it would frequently hang. I have the same problem with Debian, so the issue is probably related to the card itself or to the kernel module. The nasty thing about the custom Nvidia driver is that it replaces all your OpenGL libraries with custom Nvidia versions, so it can be a pain to switch back to the original XFree86 driver. Someone at Gentoo was thoughtful enough to make this process easy. There is a Gentoo utility called opengl-update that lets you switch between the default OpenGL libraries and the custom Nvidia libraries with a single command.

Hurry up and wait

Naturally, there is a down-side to Portage. It takes a long time to compile some things. For example, OpenOffice took at least two days to finish building. Gentoo fans will no doubt point to the fact that this process is hands-off, but that isn't always true. The OpenOffice installation warns you that OpenOffice is sensitive to some compiler optimizations, which means it may fail. If so, you may have to modify your build options and install it again.

Naturally, you can always get a pre-compiled copy of OpenOffice from some other source and install it. It even appears as if Gentoo itself offers a slightly out-of-date verison of OpenOffice in pre-built form. Nevertheless, this is not the sort of approach that works for those in a hurry to get software running.

In the long run, however, Gentoo benefits from the law of increasing returns. Once you have all your favorite software installed, you will rarely find yourself twiddling your thumbs waiting for a fat installation build process to complete.

Philosophy 101

Whenever someone who hasn't used Linux asks me to recommend a Linux distribution, I usually say Red Hat, the de-facto standard. It's a win-win proposition. Once you know your way around Red Hat, it is easier to figure out if another distribution is better suited to your tastes. If you don't find one you like better than Red Hat, then you end up with intimate knowledge of the most-popular distribution, and that can't be bad.

Debian has been my favorite for the past few years, but although I could certainly change my mind after a few more months of use, I already like Gentoo more than Debian.

Gentoo and Debian are very much alike in some respects. Debian has three branches: stable, testing and unstable. Gentoo has one branch, with options that will determine whether or not you end up with stable or unstable software, from the kernel to high-level applications. Anyone who likes to use the latest and greatest software won't see much difference between Debian and Gentoo in terms of things that work and things that break, because they're most likely to track the unstable branch of Debian and the latest software for Gentoo.

I'm anxious to see how Gentoo plays out over time. Two things about Debian are annoying. First, there is a philosophical snootiness in its software design that makes things far less intuitive and friendly than they should be. Second, there is an adolescent snootiness developers often exhibit toward each other whenever a conflict arises. The Debian bug list archives are filled with guttersnipe comments where instructions on how to solve a problem should appear. Maybe it's that way among Gentoo developers, too, but I haven't seen any Gentoo list archives. Maybe I just missed the link on the Gentoo Web site, or perhaps they're hidden… and for good reason.

Do I still like Debian? I absolutely love it. But for the time being, Gentoo has emerged victorious. Until further notice, Gentoo is now my flavor of Linux. If you have three days to a week to devote to Gentoo, and you're up to the challenge of installing it, I highly recommend it.

More Stories By Nicholas Petreley

Nicholas Petreley is a computer consultant and author in Asheville, NC.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

IoT & Smart Cities Stories
The platform combines the strengths of Singtel's extensive, intelligent network capabilities with Microsoft's cloud expertise to create a unique solution that sets new standards for IoT applications," said Mr Diomedes Kastanis, Head of IoT at Singtel. "Our solution provides speed, transparency and flexibility, paving the way for a more pervasive use of IoT to accelerate enterprises' digitalisation efforts. AI-powered intelligent connectivity over Microsoft Azure will be the fastest connected pat...
There are many examples of disruption in consumer space – Uber disrupting the cab industry, Airbnb disrupting the hospitality industry and so on; but have you wondered who is disrupting support and operations? AISERA helps make businesses and customers successful by offering consumer-like user experience for support and operations. We have built the world’s first AI-driven IT / HR / Cloud / Customer Support and Operations solution.
Codete accelerates their clients growth through technological expertise and experience. Codite team works with organizations to meet the challenges that digitalization presents. Their clients include digital start-ups as well as established enterprises in the IT industry. To stay competitive in a highly innovative IT industry, strong R&D departments and bold spin-off initiatives is a must. Codete Data Science and Software Architects teams help corporate clients to stay up to date with the mod...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
Druva is the global leader in Cloud Data Protection and Management, delivering the industry's first data management-as-a-service solution that aggregates data from endpoints, servers and cloud applications and leverages the public cloud to offer a single pane of glass to enable data protection, governance and intelligence-dramatically increasing the availability and visibility of business critical information, while reducing the risk, cost and complexity of managing and protecting it. Druva's...
BMC has unmatched experience in IT management, supporting 92 of the Forbes Global 100, and earning recognition as an ITSM Gartner Magic Quadrant Leader for five years running. Our solutions offer speed, agility, and efficiency to tackle business challenges in the areas of service management, automation, operations, and the mainframe.
The Jevons Paradox suggests that when technological advances increase efficiency of a resource, it results in an overall increase in consumption. Writing on the increased use of coal as a result of technological improvements, 19th-century economist William Stanley Jevons found that these improvements led to the development of new ways to utilize coal. In his session at 19th Cloud Expo, Mark Thiele, Chief Strategy Officer for Apcera, compared the Jevons Paradox to modern-day enterprise IT, examin...
With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
DSR is a supplier of project management, consultancy services and IT solutions that increase effectiveness of a company's operations in the production sector. The company combines in-depth knowledge of international companies with expert knowledge utilising IT tools that support manufacturing and distribution processes. DSR ensures optimization and integration of internal processes which is necessary for companies to grow rapidly. The rapid growth is possible thanks, to specialized services an...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...