Debian on the IBM X22 Laptop


Table of Contents

1. Introduction
The Hardware
2. Installation
Preparation
Installing Potato
Installing Woody
3. Configuration
Network Connectivity
Mouse
The X Window System
Sound
Modem
ThinkPad Specific Modules
Remaining Configuration

Before Linux could be installed, I had to make room for it. I wished to keep Windows 2000 on the laptop so that I could boot into it if I needed to. To do this I installed Partition Magic 7 and looked at the partitions defined.

Windows 2000 was installed in the first primary partition, but I wondered what the second primary partition was for. I activated it so it was available as drive D: and discovered it was the rescue partition. Upon booting the laptop, the user has the option of pressing F12 to re-install Windows 2000. I could delete this partition if I knew I could still re-install without it.

More hunting around revealed another copy of the Windows 2000 install CD, this time unpacked. I guess it is for the user when they add new hardware. In total there was nearly 2G of disk space being used by Windows 2000 images which I did not need. I did some research and found that IBM will send out rescue CDs if requested. Reports varied on the price from free up to $50 but I knew it was possible. With that information, I removed the rescue partition and deleted the Windows 2000 images. This gave me plenty of disk space to install Linux onto.

Using Partition Magic I resized the Windows 2000 partition to 5G (from 9G) and created a few new ext2 partitions. I have a natural habit of creating a /boot partition even on systems which won't require it, so I created a 10M partition for /boot and used the rest of the space for /. I did not format them in Partition Magic as Linux is much faster at formatting ext2 partitions, so I left that for the installation routine. Now I was ready to attempt installation of Linux.

I initially tried installing Debian 2.2, also known as Potato. This release is fairly old but stable and is how I originally installed Linux on my desktop machine. I docked the laptop to the MediaSlice and booted the CD and immediately hit a problem. When the kernel tried to start the md driver the laptop froze. 10 minutes on Google later revealed that this was a common problem with modern hardware an older version 2.2.x kernels. The solution is to boot with a modern kernel, either 2.2.x or 2.4.x.

I hunted around the Internet for replacement boot floppies, as the task of creating new boot floppies seemed rather daunting. This revealed the rather obvious fact that people producing boot floppies with the latest kernel 2.4.x are not the sort of people who will be running older releases of Debian, rather Woody, also known as the soon to be released Debian 3.0. This meant that the boot floppies will want to install Woody somehow which suited me as Woody is very similar to Sid. Thus onto...

I down-loaded the boot floppy images from htttp://foo.bar/. These disks were based upon the 2.4.7 kernel, Creating the floppy disks is trivial in Linux: dd if=boot1.img of=/dev/fd0 bs=1024 Repeating this command gave me four floppy disks: two for booting, one with the core modules and one with extra modules. I booted the kernel, crossed my fingers as the md driver loaded and didn't freeze, and then entered the Debian installer.

Once inside the installer I hit F2 to go to a bash prompt to see what hardware I could get working from the boot floppies. The floppy drive and CD driver in the MediaSlice were detected by the kernel so they were available. But the most important one was the network card, so that I could do a network install of Woody without having to download an entire ISO image first (the base install size of Woody is ~30M). The network card is produced by Intel and is a EtherExpress model, common in corporate desktops. I tried modprobeing eepro100, which detected the card but unfortunately bailed out when it did not recognise it. I had thought this would happen but was hoping it would not. [1] This left me with a laptop which has a floppy and CD-ROM drive, but no network connectivity in Linux. Not a good situation. However, when I am in Windows 2000 I have a working modem and network card, as well as over 2G of spare disk space.

At this point I could see several options: either download an entire Woody ISO image and burn it on to a CD, or find a way of bootstrapping the installer without a CD. One of the options in the installer as a source to install from is basedebs.tgz, which looked suspiciously like a tarball of the base packages. A search of the Internet confirmed this, however also revealed that the Debian release team would not create this file until Woody was officially released. Not to be dismayed, I investigated creating this file myself. Through sheer luck and perserverence I discovered the channel #debian-boot on irc.debian.org, which is dedicated to the Debian install routine. Here I was told about the package debootstrap which is designed to bootstrap a Debian installation from inside another Linux. This does not seem useful but one of the tasks is to create a basedebs.tgz.

I downloaded the source of deboostrap from packages.debian.org and built it on a RedHat 6.2 box. This involved a few changes to the source, all of which I have forgotten but were simple and obvious. I promise to recreate what I did and update this document in the future. Finally, I ran the script and 30 minutes later it had download the required packages and created basedebs.tgz. I copied this file onto C: whilst in Windows on the laptop, and the booted the Debian installer again. This time I could mount the Windows partition, select basedebs.tgz as a source, and the installation continued. When I restarted and finished the installation I had a basic, but working Debian system.

At this point I upgraded from Woody to Sid mainly because I already a snapshot of Sid on CD which meant I could install it without a network connection. This stage is optional, and everything should work just as well in Woody.



[1] Some updates to this are due.

  • I have heard of options which can be given to the kernel driver to force it to use the network card.
  • Kernel 2.4.18 (and possibly earlier) supports the mini-PCI card in my laptop. I am now using the stock eepro100 module instead of Intel's one. A set of install floppies build around 2.4.18 or later will be able to use the network card in the install procedure.

Now for graphics. The graphics card is an ATI Radeon Mobility LY, which is only supported by XFree86 4.2. Unfortunately, at the time of writing XFree86 4.1.1 is the latest packaged in Debian due to the maintainers efforts to get a perfect and stable XFree86 into the Debian 3.0 release. I could have checked out XFree86 from CVS and built it myself, but I found that had hit this problem a month beforehand and had built a tarball of XFree86 from CVS. This tarball is just the X server itself, so removing the package xserver-xfree86 and extracting this tarball gave me XFree86 4.1.99.1. With the following configuration in /etc/X11/XF86Config-4, X started correctly:

          
          Section "Device"
          Identifier      "ATI"
          Driver          "ati"
          VendorName      "ATI"
          BoardName       "Radeon Mobility"
          BusID           "1:0:0"
          EndSection
        

The mouse was trivial to configure. The primary pointer was A MouseSystems mouse reading from the gpm repeater file.

My desktop has a duel PS/2 and USB mouse. I decided that often I could take the laptop and the mouse so that I can have a more convenient pointing device. I was not sure if X could handle a device which was not always plugged in (thus the device will not always exist), but I was pleasantly surprised.

The TrackPoint is the "core pointer", and the USB mouse is told to produce events for the core pointer if it exists. If I did not do this, X would not start when the mouse was not plugged in, and when it was the USB mouse would control a second pointer which I could not see.

        
        Section "InputDevice"
        Identifier      "TouchPad"
        Driver          "mouse"
        Option          "Device"                "/dev/gpmdata"
        Option          "Protocol"              "MouseSystems"
        EndSection
        
        Section "InputDevice"
        Identifier      "USB Mouse"
        Driver          "mouse"
        Option          "Device"                "/dev/input/mouse0"
        Option          "Protocol"              "ImPS/2"
        Option          "ZAxisMapping"          "4 5"
        EndSection

        Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Default Screen"
        InputDevice     "Generic Keyboard"
        InputDevice     "TouchPad"              "CorePointer"
        InputDevice     "USB Mouse"             "SendCoreEvents"
        EndSection
      


[2] Note that running dselect update opposed to apt-get update also updates dselect's list of packages.