Distribution Watch: Gentoo Linux 1.2: Getting Better Every Day

By: Dee-Ann LeBlanc
Wednesday, July 10, 2002 01:33:27 PM EST
URL: http://www.linuxplanet.com/linuxplanet/reviews/4302/1/

Back in the Saddle with Gentoo

I admit it: I have a soft spot for Gentoo Linux. I'm not sure if it's because it's the shiny new kid on the block, or its focus on a part of the Linux market that was fairly ignored before (distribution-wise). Maybe it's just the excitement and energy that tends to surround any new project. Who knows.

The ratings system gets awkward here as well. Once you've got Gentoo Linux up and running it's wonderfully fast. The installation, however, can take hours and hours with all of the compiling you have to do. I don't mind it, and any developer who chooses this distribution for their work platform probably doesn't mind either, especially since the folks at Gentoo don't try to hide what's involved in the installation process.

I also go easier (ratings-wise) on a newer product. Since Gentoo is early generation I still give them some slack for not having my old lab machine supported. Considering that the other Linux machine, which comes from the same time period, installed without a single problem, I figure that balances out.

As interest in this distribution grows, so does the number of platforms it supports. The last time I reviewed this product it only supported the PC architecture. Today you can install Gentoo Linux not only on a PC, but also on PowerPC machines, Sparc machines, and Sparc 64 boxes. This article focuses on the PC version.

The minimal hardware requirements for the PC realm haven't changed. You still need only a 486 with 64MB of RAM. Even so, the usual rules of faster CPU and more RAM being pretty nice still apply.

So, let's take a look at Gentoo Linux 1.2 and see how far it's come.

Getting Gentoo Linux 1.2

You've got more options these days for grabbing a copy of Gentoo Linux 1.2. You can go to Gentoo's Web site (www.gentoo.org), click on the Install link for the appropriate platform, and then select one of the CD images available there. My personal preference is to get the smaller one (gentoo-ix86-1.2.iso/), but if you have a 686 and don't want to deal with the earlier compile stages then get the bigger one (gentoo-686-1.2.iso/).

No matter how you slice it, following the downloading instructions is going to get frustrating if you don't have a high-speed connection or hate burning CD-ROMs. Fortunately, you've got the option of buying pre-burned Gentoo CD's from a variety of vendors, and for a nice low cost. Since vendor information changes over time I'll just say to go to the Gentoo Web site and check out their latest vendor list.

Gentoo Linux is the only distribution I'm aware of that focuses on the needs of the developer community. Specialized tools such as Portage, a build manager on steroids, make this dream a reality. The major differences between Gentoo 1.1a and 1.2 revolve around updated packages, numerous bug and security fixes, and of course KDE 3.0 and (big emphasis here) GNOME 2.0.

One major comment most people make about Gentoo is that it's fast. This is a distribution that from the ground up can be optimized for your system. It's also amazingly easy to update your entire Gentoo install with a single pair of commands.

Installing Gentoo Linux 1.2

Gentoo offers a nice set of installation instructions. Once I downloaded the smaller ISO and burned the CD-ROM, I popped the media into my lab machine and booted the box. The language selection and PCI auto-detection as usual passed by smoothly, and in under a minute I'm at the base installation console.

The first instructions are to load the appropriate networking card modules, but instead I type lsmod and see that mine was loaded after being properly auto-detected, so I don't bother. Running dhcpcd eth0 gives the expected response with errors, though different than the errors I got the last time I went through this process. Still, a quick ifconfig tells me that I'm still doing fine.

Following the handy dandy partitioning chart they give in their installation documents, I utilize fdisk to create the recommended set of three partitions (/boot, swap, and root), and change the swap partition's type to 82. From there it's mkswap to make the appropriate filesystem on the swap partition, and then mke2fs j to create a nice robust journaling ext3 filesystem on the others.

Now to mount the partitions. A quick swapon for the swap partition, and then I forget that I do literally have to follow the order given while creating the mount points and adding the partitions, but that's an easy thing to fix. Then soon I've got the Gentoo CD-ROM mounted on the CD-ROM drive, and visible for the filesystem. This is where I hit my first snag, but it was from looking at too much code at once, or sunspots, I'm not sure. Once I properly changed to /mnt/gentoo and then extracted the Stage 1 tarball to the proper directory, everything worked fine.

Once I've mounted the proc filesystem, copied /etc/resolv.conf over, and chrooted to /mnt/gentoo, I cross my fingers. If I remember correctly, here is where I had problems last time. Oops, there we go again. Typing env-update gives me an error, but it also gives me the output that the installation guide tells me to look for (after the error). So, I type source /etc/profile and lo and behold, there's a prompt! Considering that I never was able to get that prompt last time, things are looking promising.

Now for the first download. I type emerge rsync and Portage takes over my cable modem, downloading 10MB worth of material. Last time I ran this I was using ADSL but my connection was intermittent, so I had to download all of this material half the time under ADSL and half the time under a regular 56.6 kpbs modem. From that experience, I'd say that if you don't have a high-speed connection, you're probably better off getting the larger CD image and saving yourself some immense frustration. Maybe not so much now, but later in the process.

Since I'm using the Stage 1 only tarball, I now get to bootstrap my machine, but first I have to tell Portage how to handle the compilations. Instinctively I try to utilize vi but the text editor included here is nano (pico, nano, get it?) So, nano w /etc/make.conf and I select the P6-exclusive settings so I can fully optimize the OS, and then save and exit. And now it's bootstrap time. I change to the Portage directory and run the bootstrap shell script, and then go off to do something else. After all, the installation instructions point out that on a 900MHz AMD Athlon this process can take an hour, and my poor lab machine is only a 450MHz.

However, I come back later to find that the bootstrap has stalled with an error. Being the odd superstitious sort that I am, I try it a couple more times, and nothing changes. At least it's consistent. I go dig through the Gentoo Bugzilla entries, the discussion and troubleshooting forums, and find a few things that might be relative but nothing close enough. Rather than immediately filing a bug I figured I'd better try the sequence again to find out if it was repeatable, and if perhaps it was just a glitch.

This is where things went bad, and part of it isn't any fault of Gentoo's unless the folks at Gentoo Linux have the ability to cause trouble at a nearby power substation. First, I think the bootstrap managed to finish but the machine hung overnight with the same problem I'd run into earliera blank screen as though the terminal had gone into wait mode but it couldn't recover. So I rebooted and assumed the bootstrap had worked, and went through the parts of the process that load the partitions back into place and then proceeded from there.

Meanwhile, during the day, we lost power at least three times. Since we just moved and have rearranged all of our machines I'm in the annoying situation of having a single UPS that can only handle one computer and one monitor, and my lab machine is not the protected one. Let's just say that when I tried proceeding to a later stage and thing s went wrong again, I decided it was time to do everything over on another machine. Between the power outages and the previous version never learning to get along with the other hardware it seemed a good idea.

So, I made good use of the idle hard drive in my main Linux box. Everything worked like a charm. Got through the bootstrap without a single difficulty. Passed from stage 2 to 3 with no problem. I finally get to set the local timezone, and I select the vanilla-sources version of the kernel since I'm not trying to do anything wild and crazy and I feel like being a little different than Gentoo's favorite kernel (plus, let's see how it works with a more vanilla kernel).

In configuring the kernel, the first thing I do is address the issues laid out in the warning in the Gentoo documentation. I'm a bit forgetful so I might miss them otherwise. I tweak a few things here and there but for the most part I'm not looking to do anything too out of the ordinary. I don't have a compiled kernel yet so I have no bzImage to move. I then select syslog-ng since I've been reading about that logger lately, and I select vcron since that's the one I'm familiar with.

Now I have the fun of setting up /etc/fstab (this part certainly could be better documented for folks newer to Linux), including setting the proper devices to the proper partitions, my filesystems to ext3, and my options to defaults. Then I set the root password, create /etc/hostname and tell it what to call my machine, leave /etc/hosts alone because the only machines this one will deal with are all resolvable with the information given to my Linux box by DHCP, configure the networking, edit startup files, and then finally set up GRUB.

Since I'm setting up a dual boot box, I actually can't complete the GRUB setup until I reboot and go into Red Hat Linux, which has the primary hard drive and already has GRUB installed. Once I get Gentoo added to the Red Hat installation's /boot/grub/grub.conf I'm ready to go!

Configuring Gentoo Linux 1.2

Once I get the system installed and booted, I can go on to configure my desktop. I click on Gentoo's Linux Desktop Configuration Guide and kind of follow the instructions. While the person who wrote them prefers KDE, I prefer GNOME, so I type emerge --pretend gnome to get a glimpse of just how much work my machine needs to do at this point. It's a lot, as suggested. But, well, I do kinda like to have a GUI available so I type emerge gnome and then go do something else for a while.

The configuration phase in many ways is like the installation phase. Emerge this, emerge that, and do a bunch of stuff by hand that you're used to being able to gloss over with handy dandy tools; for example, Gentoo makes us configure X by hand. But that's okay, this distribution's for developers. What I find ironic about that is that all of the compiling is so easy that us non-developers get through that without a problem, but building a Linux system manually doesn't seem to me so much a developer thing.

I'm not complaining! It's just an observation. The power in Gentoo is that with Portage, the developer can have various parts of the filesystem set up with compilation defaults that make life a whole lot easier while creating new software. That doesn't really come out in a basic installing and configuring discussion.

Wrapping Up

Gentoo Linux 1.2 still does not get along with my lab machine. It does get along with my main Linux box, and gets farther into the installation on the lab box than 1.1a ever did. I'll be sending some more information to the Gentoo folks so maybe next time my lab box can have its very own Gentoo Linux installation. For now it will have to be content with a certain other distribution's beta release.

Gentoo is still quite a young distribution, and it already has quite a following. I find that I do hope for the sakes of the lazy among us, that some of the installation process will be automated in the future. If not, well, a fussy installation process is a small price to pay for one of the fastest Linux distributions out there.

Dee-Ann LeBlanc has written over 10 computer books, over forty articles, taught classes, and more, mostly involving the Linux operating system and its programs. Her latest book is Linux Routing from New Riders. You can reach her at dee@renaissoft.com, or find out more at http://www.Dee-AnnLeBlanc.com/.

Copyright Jupitermedia Corp. All Rights Reserved.