written August 9 2004
last update Dec 16 2004

Eine deutsche Seite zum Thema

Gentoo 2004.2 on the X5 force

On August 7th 2004 I installed a basic Gentoo Linux on my X5 force notebook computer.

The SuSE 9.1 installation does everything I want, it is rock stable, and all my favorite software is included and running well. So I do not need the trusty but outdated SuSE 8.0 on the other partition any more: time for something new! I read the websites of Gentoo, OpenBSD, NetBSD, and FreeBSD. Each one of those free operating systems seems to have its own merits. But I had to decide for one. From hearsay my favorite was FreeBSD, maybe because its relationship to Mac OS X. But after comparing for hours, Gentoo made it.
I am not sure why.
From what I have read I knew that Portage (with its emerge command) is probably the most advanced package system. Even better than Debian dpkg/apt-get.
Another advantage of Gentoo is its website, especially the docs, especially the "Gentoo Handbook", the Portage page, the FAQ and many others. Great!

Gentoo Linux installation


1. Basic installation

Before I started I read the docs - for hours. I think this is really necessary here. You should have some overview what will happen and what you will have to do and what you will have to know. And, where to look up something. I had my PowerBook open beside my Linux notebook, with several Safari windows open for the Gentoo Handbook, forum, FAQ etc. ...

ch 1

Gentoo is not like SuSE. In SuSE most of the installation is automated. While Gentoo is not as radical as Linux-From-Scratch, many many things you have to do yourself. The first decision is which kind of installation to use. I thought a CD-based installation would be best for me (it does not matter if you get the network up while installing, one risk less), and downloaded the "universal" install live CD and the package CD (together 1.3 GByte). In order to make use of the precompiled packages I had to follow the "stage 3 installation".

(For a technical description of my notebook computer see my X5-Linux page.)

Before I started I had my harddisk already partitioned like this:

  • /dev/hda1 9GB Windows XP
  • /dev/hda2 512MB swap
  • /dev/hda3 10GB Reiserfs for Gentoo (this was SuSE 8.0)
  • /dev/hda4 7GB Reiserfs containing SuSE 9.1 workhorse

My comments follow the structure of the ingenious "Gentoo Handbook" (= installation manual).

ch 2

Now I booted the Gentoo universal live CD. I got a nice screen and selected the "smp" kernel, a Gentoo notion for the current 2.6.7 kernel. (The 2.4.x kernel is called "gentoo". I find these names a bit misleading, but then... who cares.) Soon after you get your first encounter of the Gentoo way of things: Enabling DMA for the hard disk was clicking a checkmark in YaST in older SuSEs, and is default in the newer SuSE distros. In Gentoo, there is no installer window, no dialog box, no mouse: just enter the right command into the terminal screen. Very basic, and a bit error-prone, but if you are careful, no problem.

ch 3

Network was up automatically, just as expected, since I had connected my notebook via Ethernet to my router which offers dhcp access. Clearly it would have been demanding too much from a live CD to support the non-trivial wireless USB module. Interesting: as I understand the handbook it would support direct ADSL connection using our Austrian exotic picky PPTP method (in contrast to the widespread PPPoE method). When some day I will have some spare time I should try that out... If it worked I could build my own ADSL router using a Gentoo box...

ch 4

The chapter 4 "Preparing the disk" is IMHO a bit weak. It explains partitioning only for the case that you devote the whole disk to Gentoo. In my case Windows and SuSE Linux resided already on my harddisk and of course I did not want to remove them. After some thinking I concluded I could skip partitioning completely. /dev/hda2 is swap space, /dev/hda1 is Windows, /dev/hda4 is SuSE, and hda3 is for Gentoo. In the handbook they demand a separate /boot partition to be formatted with ext2, but I decided to stay with one single partition for Gentoo, like I am used to as in the last SuSE installations. So I just recreated a ReiserFS on /dev/hda3, and mounted the volumes, and ready.

ch 5

Next comes setting the date. Huh, just enter "date" and the correct date and time in a funny syntax... And now you have to install the stage file from the CD. Copying and un-tarring, all using the plain normal Unix commands. Next the Portage snapshot, in the same way. Last in chapter 5 is the setting of the compiler options. In order to do this you have to edit a config file by using a plain text editor. In the handbook they prefer using the "nano" text editor. I find nano extremely ugly. So I used vi, which is even more ugly - but I know enough to use it for config file editing. Luckily vi is included in the basic live CD system. (As we shall see, I soon had to come by without vi anyway.)

ch 6

Chapter 6 starts with calculating the best mirror sites for Gentoo resources. Yes there is a tool for this job! It took rather long, as it downloaded 100KB chunks of data from over 140 servers around the world to find the fastest three. Then comes a crucial step: chrooting into the newly installed (and rather incomplete) Gentoo system. I did it very carefully and voila! I found myself at / of /hda3. Good.
Now the USE variable has to be configured. Bad. No more vi. No vim. Only nano. And worse: mirrorselect had ruined my make.conf. Shocking!
After fiddling around with that nasty nano I got my make.conf straight, and the USE variable got written. So: Never panic. Keep cool, everything can be fixed.

ch 7

In Chapter 7 we have to set the time zone. (Are the easy things like time and timezone intentionally spread over the chapters, in front of the hard work of each chapter?) Then comes kernel configuration and kernel and modules compilation and installation. I used the "menuconfig" method, not "genkernel", for configuring. There is not much to say, the steps are more or less the same with all Linux versions.

ch 8

Chapter 8 begins with another Gentoo shocker: you have to write /etc/fstab yourself! Or so the handbook says. In fact it is not as bad, there is a template to be used as a start. On occasions I had to change something in a fstab, but this was the first I had to write myself, the first fstab where I am responsible for every line... In the meantime I had done a emerge vi and so I had at least that editor back, the worst of all good editors... Network setup was easy, System info setup was trivial.

ch 9

No real problem also in chapter 9. I got an inconsistence with sysklogd uninstalled and metalog installed, the services cache always claimed "logger already provided by sysklogd, metalog not added" and "sysklogd not found in any runlevel" or similar. I solved this the other day by reading in the Gentoo forums, where people had the same problem and found a solution.

ch 10

The bootloader chapter 10 was not applicable to my situation, but I could take some info out of it. (I manage my GRUB from SuSE where I changed the entry of my former SuSE 8.0 into the correct entry for Gentoo Linux.) I was glad to see that not using genkernel had saved me from fiddling with the initrd options. I hate initrd.

ch 11

Finally in chapter 11 the precompiled software packages are loaded. "... in zero time" says the handbook. Oh no. This also took plenty of time to finish. But no problem. I decided to give my Gentoo a Gnome desktop environment. (In Debian I had used Gnome too, while in SuSE I mostly use KDE, a natural connection.) So I have a Gnome system again after so many years.


2. Completing the installation

Updating/Upgrading

The next day I did it:

# emerge sync
# emerge --update --deep world

Yeah!

This reloaded everything, directly from the Internet, even the kernel, and everything as source code. Downloading, compiling, installing, my computer nearly melted... It lasted for ten (10) hours. Finally I had a completely new system - had I expected this I had done a "stage 2" installation from the beginning... and downloading just the minimal live CD would have been sufficient...

Only by accident I discovered that Portage had installed a new kernel source tree. Configuring, building and installing the new kernel was left to the user - that's me! All the other software was build and installed fully automatically, but the kernel I will have to do myself...

3D acceleration

pending...

Sound

pending...

Wireless

Uh uh. What a ...
But I have it going now. I needed some hours to read the experiences of the people in the Gentoo forums, and the documentation. Finally I got linux-wlan-ng-0.2.1_pre20 emerged. The init and config script organization in Gentoo is quite different from Debian or SuSE or Redhat, to name a few. But each required file was in place and adapted to the Gentoo places and paths. Good work of the maintainer of the linux-wlan-ng ebuild. Still, it did not work for me. I suspect that it is simply untested with USB devices. I filled every other line in /etc/init.d/wlan with echo statements. So I could find out where the problems came from. I have a detailed description how to enable linux-wlan-ng-0.2.1_pre20 for USB devices in this text file.


Conclusion (preliminary)

After some days of use I can say that the Gentoo experience is one I like very much, although the installation stresses your brain much more than a commercial distro installation. But maintenance of the system will be much easier thanks to "Portage". And you have the good feeling of knowing exactly what is inside and what not. Total control by the user. (This strong feeling gets a bit weakened when you install such monster packages like Gnome or KDE, but I find it hard to come by without one of those.)

I don't know if I will install Gentoo to any other computer in the future. But when I will certainly use the "stage 2" or "stage 1" procedure...


Updates

2004-08-10 new kernel

I have built the new kernel (r12) today. As it has a new extraversion it gets a new subdirectory for the modules under /lib/modules/. Such it is easy to keep the older kernel on disk in a functional state, just in case, as a backup kernel. (In GRUB I keep the old entry, clone it, and the new one gets "...-r11" substituted by "...-r12" in the kernel arg and in the title name.) On the first try I did not get the right framebuffer setting in menuconfig: console 1 just showed a tux logo, no text, the other consoles a pixel pattern.
On the second try I got it straight. Thanks to GRUB recompiling a kernel with only slight config changes is simple: after the

make && make modules_install
cp arch/i386/boot/bzImage /boot/kernel-2.6.7-gentoo-r12
cp System.map /boot/System.map-2.6.7-gentoo-r12
cp .config /boot/config-2.6.7-r12

you can reboot into the new kernel - no change to the bootloader necessary.
If the new kernel does not boot just boot the older one to fix the config problems.
If the new kernel boots okay then additional modules can be built, in my case the linux-wlan-ng kernel modules.
This is also quite easy: the only thing to do ist step 1.2 from my linux-wlan-ng Gentoo installation text.

2004-11 2004.2 -> 2004.3

The best feature of Gentoo is you can always have the newest software, and even the distro itself upgrades to the newest version.
But this actuality comes at a price:
An "emerge sync" followed by "emerge --update world" can easily run for many hours. When I returned from my two-week-trip my notebook needed about 12 hours to configure, compile and install the 100+ package updates. Big packages like X.org or Mozilla or Gnome compile for many hours. While these times the CPU load is nearly 100%, the harddisk is stressed, and the fans are running fast. This does shorten the life of the notebook hardware. In the meanwhile I think Gentoo is better suited for servers and desktop systems instead of notebook computers.
Still, having always the newest stuff is way cool...

2004-12-16 GPRS via Bluetooth

With SuSE I could go online anywhere in Europe while my autumn holiday )(-trip. Why not do the same with Gentoo?
I had success today, using basically the same procedure. Here is how I do GPRS internet access via a bluetooth cellular phone.

rm

back

 

2004-08-09 rudolf mittelmann


   
All mentioned trademarks belong their respective owners. This page expresses just my personal opinion. This is a private page written and owned by rudolf mittelmann. I have no other connection to any mentioned company or organization than as a customer of their products.