You are here

Installing Gentoo Linux 2006.1 on IBM x60s

Introduction

This page describes how to install and customize Gentoo Linux [1] 2006.1 so that it will run nicely on a Lenovo (IBM) x60s [2].

Lenovo x60s hardware

The x60s is build on the Intel Centrino technology and is using the Intel Core Duo processor.
The hardware specs of my x60s can be seen below.

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller AHCI (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
02:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet Controller
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
15:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev b4)
15:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 09)
15:00.2 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 18)

More details about the x60s hardware can be found at ThinkWiki [3].

lsusb output can be seen below:

Bus 005 Device 002: ID 17ef:1000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

The unnamed device in the first line is the blue tooth device and can be enabled/disabled by a sliding button on the front.

Installing Gentoo

The x60s does not have a built-in optical drive, but an optical drive is available for the X6 UltraBase Docking station [4]. So unless you have the X6 or a peripheral optical drive, you have to find another way to boot the Gentoo [1] LiveCD.
One way of booting the LiveCD is using an USB drive. A guide [5] to using an USB drive to boot a machine is available on gentoo.org.

Booting Gentoo

To get the x60s to boot from USB you can either change the boot order in the BIOS, or you can press F12 when ThinkPad logo is displayed. Pressing F12 will present you with a prompt allowing you to choose which device should be used to boot the x60s.
After the USB drive has been selected as the primary boot device, the x60s will continue to boot the LiveCD. At this point you can follow the instructions listed in the Gentoo Handbook [6].

The SATA disk

The USB drive during the install process is to be found at /dev/sda1 and the hard drive is to be found at /dev/sdb.

Building the base system

I always do a stage 1 install when I install Gentoo and therefor my make.conf [7] can contain a greater deal of customization. I have attached it so you can see what flags I use.

As of 2006.1 I tried to do a stage 3 install for the first time, and I must say that it is a lot easier and faster than a stage 1. When you have finished the stage 3 install and your machine has reboot, you can "upgrade" to a stage 1 by doing:

emerge -ueDNav world

My make.conf [7] is still available...

Building the kernel

I have attached my .config [8] for the sys-kernel/vanilla-sources-2.6.19 to this page. What is in my kernel:

  • Support for the dual core cpu
  • Support for cpu frequency scaling
  • Wireless support
  • Graphics card support
  • Highmem support
  • Ultrabay DVD-ROM drive
  • Reiserfs 3
  • Bluetooth support
  • infrared, SD card, fingerprint reader NOT supported

Configuring GRUB

One thing i found out (at least for me) is that the SATA disk switches from /dev/sdb to /dev/sda when you boot your own kernel. This means that GRUB [9] has to look on /dev/sda for the kernel during boot.

Installing the graphics driver

In order to run X.org 7.1 you need to use the x11-drivers/xf86-video-i810 (>=1.6.0) driver. The current stable version is 1.6.5 so you should be good to go. If you set VIDEO_CARDS="i810 vesa" in your make.conf portage will install the driver as a dependency.
If it isn't installed, you can install it by doing:

emerge x11-drivers/xf86-video-i810

When you have installed the driver (and the rest of X.org) you should be able to start X. I have attached my xorg.conf [10] if you would like the see how to configure X to run on the Intel Graphics Media Accelerator 950.

The Intel 950 Graphics card is fairly decent and gives me the following in glxgears:

4526 frames in 5.0 seconds = 905.046 FPS
4581 frames in 5.0 seconds = 916.151 FPS
4563 frames in 5.0 seconds = 912.507 FPS
4555 frames in 5.0 seconds = 910.823 FPS
4578 frames in 5.0 seconds = 915.587 FPS

Installing the wireless driver

The driver for the Intel Wireless 3945ABG card is in portage so it is straightforward to install.

emerge net-wireless/ipw3945 wireless-tools -av

NB #1: Current portage versions of net-wireless/ipw3945 (1.0.5 - 1.1.0-r1) require the net-wireless/ieee80211 (

NB #2: If you are using my kernel configuration, the emerge of net-wireless/ieee80211 will fail complaining about the presence of ieee80211 in the kernel. The error message should tell you what command you need to run in order to remove the ieee80211 from the kernel. Once you have removed the conflicting files from the kernel, you can run the above command again.

NB #3: net-wireless/ipw3945d >= 1.7.22-r3 requires the ipw3945d service to be started in order to see the device through iwconfig.
It should be enough to add it to the default runlevel:

rc-update add ipw3945d default

Installing the sound card driver

The Intel High Definition Audio Controller can be installed either by enabling SND-HDA-INTEL in the kernel or by installing the media-sound/alsa-driver package.
Set ALSA_CARDS="hda-intel" in make.conf to only build the hda-intel driver.

emerge alsa-driver alsa-tools alsa-utils -av

When that is done, run alsaconf and select the Intel High Definition Audio Controller in the ncurses menu in order to tell alsa what drivers to load.
Next, add the alsasound service to the boot runlevel:

rc-update add alsasound boot

You may have to unmute the card through alsamixer to enable sound.

NB: There is a bug in the BIOS that requires the modem to be enabled or else the sound card won't play anything. If the modem is disabled, the card can be installed, but not used.

Installing the HDAPS driver

The HDAPS [14] driver can read the information from the accelerometer on the hard disk and can be used to park the disk head when a shock is detected. The driver is available as SENSORS_HDAPS in the kernel or as app-laptop/tp_smapi in portage.

USE="hdaps" emerge app-laptop/tp_smapi

You should note that this doesn't enable disk head parking, it just installs the driver. To enable disk head parking you need the app-laptop/hdapsd package, but this relies on the kernel module and cannot be used with tp_smapi. Furthermore there seems to be some problems with hdapsd and kernel 2.6.18 and SATA disks.

Loading the drivers at boot

Gentoo [1] will automatically load modules listed in /etc/modules.autoload.d/kernel-2.6 if you are using a 2.6 profile.
These are the modules I load at boot:

ieee80211_crypt
ieee80211
ipw3945

usbhid
uhci-hcd
ehci-hcd
ohci-hcd

thinkpad_ec
tp_smapi
hdaps

i915

A note about portage installed drivers

You need to re-emerge portage installed drivers every time you have updated your kernel. You can make this easier by installing the sys-kernel/module-rebuild package. This will provide the module-rebuild command that will rebuild all extra drivers installed through portage.

What to do next

When my install is complete, I usually install some extra portage utils:

emerge app-portage/portage-utils app-portage/gentoolkit app-portage/eix app-portage/genlop -av

Configuration wise you could follow the UTF-8 guide [15] to enable UTF-8 on your system. The Power management guide [16] might also be of interest.

Comments and feedback

If this helped you, please leave a comment (or send me an email) with your feedback and/or suggestions to make this guide better.

Shoutouts

I would like to thank ThinkWiki [3] for the detailed listings of the x60s hardware, which made it a lot easier to build the correct kernel.
Also thanks to Werner Heuser at TuxMobil [11] for listing this page under the IBM/Lenovo section [12] and under the Gentoo section [13] of his excellent home page.

References

[1] http://gentoo.org
[2] http://www-131.ibm.com/webapp/wcs/stores/ [snipped]
[3] http://www.thinkwiki.org/wiki/Category:X60s
[4] http://www-131.ibm.com/webapp/wcs/stores/ [snipped]
[5] http://www.gentoo.org/doc/en/liveusb.xml
[6] http://www.gentoo.org/doc/en/handbook/
[7] http://farmerzonen.dk/files/make_0.conf
[8] http://farmerzonen.dk/files/2.6.19.2.vanilla.config
[9] http://www.gnu.org/software/grub/
[10] http://farmerzonen.dk/files/xorg.conf
[11] http://tuxmobil.org/
[12] http://tuxmobil.org/ibm.html
[13] http://tuxmobil.org/gentoo_mobile.html
[14] http://www.thinkwiki.org/wiki/HDAPS
[15] http://www.gentoo.org/doc/en/utf-8.xml
[16] http://www.gentoo.org/doc/en/power-management-guide.xml

Powered by Drupal