Installing Debian on an IBM Thinkpad X23 (2662-E5U)

Copyright (C) 2002 Eu-Jin Goh (eujin at

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 published by the Free Software Foundation; with the no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

GNU Free Documentation License

License Text


My IBM X23 came with a Pentium III M 866, ATI Radeon M6, i810 sound chip, Ricoh PCMCIA controller, Intel ethernet express 10/100 chip, 640 MB of SDRAM, 30 Gig drive. I also got the X2 Ultraslice with the DVD drive and a IBM High Rate Wireless LAN card. The IBM wireless card is actually a rebranded Lucent Orinoco card (I'm not sure if it's the Gold or Silver). It only cost 24xx before tax because of an educational discount and another special offer which bundled the laptop together with the Ultraslice and a carrying case for $460 less.

I put this page up as a public service to repay all the excellent man, howto and linux laptop pages written by others.

Update: I added instructions for hibernation and modem setup. Chris Barker provided his notes on installing using PXE.


Repartitioning the drive

This laptop did not come with a Windows 2000 Professional CD. Instead, they stuck a 680 MB hidden partition on the drive which contained the recovery image. Also, there is some code in either the MBR or BIOS keeps prompting at bootup to hit F11 to run the recovery process.

If anyone knows if you can safely remove the hidden partition and overwrite the MBR, please let me know (eujin at

Be warned that the IBM recovery process is particularly nasty. It wipes out all partitions (except the recovery partition) during the recovery process. So the usual trick of repartitioning the drive with a small first partition in the hopes that Windows will install itself there does not work. Instead, you need something like Partition Magic to resize the Windows partition to make space for Linux.

After resizing the Windows partition, my hard drive looked (approximately) like this

hda1 Windows (FAT32 5 GB)
hda2 Recovery (FAT32 0.68 GB)
hda5 Shared (FAT32 10 GB)
hda6 Swap (0.5 GB)
hda7 /boot (EXT2 32 MB)
hda8 / (EXT2 4 GB)
hda9 /home (EXT2 8.5 GB)

The Shared partition is what I use to keep files (such as mp3's and documents) that I want to access across Windows and Linux partitions. The swap should be the same size (or twice) as your memory.

Update: I used partition magic to repartition my drive for hibernation. I shrunk the Windows partition by about 640 megabytes and created a new partition for the hibernation file. If you plan on using hibernation, you probably want to partition your drive right the first time.

Using the DVD Drive in the Ultraslice

I figured out (the hard way) that the DVD drive is invisible to the BIOS unless Windows first detects it. I initially just wiped the original Windows partition (not the recovery partition). I then tried to boot the Debian CD and it just wouldn't work. I then restored Windows and realised that Windows couldn't detect it either. I figured that the DVD drive must be hot swapable and sure enough, after inserting the DVD drive into the Ultraslice while running Windows resulted in the drive being detected as a Matsushita DVD drive. From this point on, I could boot off the cdrom.

Installing Woody

The install cd for potato 2.2r6 does not work out of the box because the boot hangs when the image tries to load the md driver. I then chose to install using the three idepci floppies for network install from Woody. The normal install process went smoothly. Don't forget to also load up the eepro100 driver during the installation because that's the network driver for the built in ethernet. This driver is another reason to install using Woody because the idepci images in Potato don't have this driver.



The first thing I do when I install Linux is to make sure that the IDE devices use DMA and not PIO. The disk benchmarks for this laptop using hdparm showed an improvement from 3.6 MB/s to 22 MB/s or so.

For this laptop, I stuck an rc script called in "/etc/init.d" and made a symlink called "S65hdparm" to it in "/etc/rcS.d". The script is a one liner calling on hdparm to set the mode for /dev/hda to use DMA and also to use UltraDMA mode 3. The drive is actually capable of ATA 100 but it's highly doubtful that mode 3 will be saturated on this laptop.

Recompiling the Kernel

The kernel-package package is amazing. When I was using RedHat, recompiling a kernel was such a pain but the pain is totally gone in Debian.

I used apt-get to obtain the 2.4.18 kernel source. This is the config file I used. It builds apm support and other goodies into the kernel. It does not have scsi support because I don't own any scsi devices, don't have a CDRW drive on this machine and don't own any removable hard drives.

Because the kernel-package is so nice, I am able to provide the kernel-image package that kernel-package built for me. kernel-package also generates the kernel-headers package . Using these packages is the quickest way to get your system up and running.

Dual Booting Win2k and Linux

Because of the uncertainty about the MBR that I mentioned earlier, I decided not to install LILO on the MBR and to use the ntldr instead. After the new kernel has been installed, you will need to edit "/etc/lilo.conf" anda then run lilo on the partition with "/boot" to install lilo on that partition. The particular command that I used was "lilo -b /dev/hda7". Your lilo.conf file should look similar to mine. Then mount the Windows partition with ntldr ("/dev/hda1" for me) and run the following command with the _right arguments_ for your own system

dd if=/dev/hdanumberofbootpartition of=/mountpointofhda1/bootsect.lnx bs=512 count=1

The if argument is /dev/hda7 for my particular system.

Once the file bootsect.lnx has been created in the Windows partition, you will need to edit the "boot.ini" file (found in the Windows partition) and append the following line to the end of the file

C:\BOOTSECT.LNX="Debian Linux"

Kernel Modules

These are the kernel modules that I have running. Run "modconf" which will generate the appropriate scripts to load up these modules at boot up. The modules are orinoco, hermes, i810_audio, ac97_codec, radeon, i810 and eepro100.


Ethernet is extremely easy to get working if you use the kernel packages that I provide. The right driver is eepro100 found in the stock 2.4.18 kernel.


The IBM High Rate Wireless LAN Card is a repackaged Lucent Orinoco card. The drivers that are required for this are orinoco_cs, orinoco and hermes. After that, configuring the wireless card should be very easy if you have the wireless-tools package installed. Also, I had to install the pcmcia package because my card is a pcmcia card.


The mouse was trickier to configure than I expected. It turns out that the IBM trackpoint isn't a real ps/2 mouse. So when configuring gpm (preferably using dpkg-reconfigure gpm), the type of mouse is "fups/2". Furthermore, Xwindows will have problems with this trackpoint if it tries to access the mouse directly. Hence, the best way to set this up is to make gpm a repeater and configure Xwindows to use "/dev/gpmdata" instead. During the configuration of gpm, set the repeat type to "msc".

As of XFree 4.3, you don't have to use gpm for the mouse to work under X. Reconfigure X to use '/dev/psaux' as the mouse device and make sure to kill gpm before running X ('gpm -k').


The graphics card is a ATI Mobility M6 LY which is not supported by the Xwindows packages in Woody. You have to get the 4.2 prerelease packages for X to work. Check the Debian XFree86 maintainer's page for a list of apt-get mirrors from which you can obtain the prerelease packages and install them.

Again, run "dpkg-reconfigure xserver-xfree86" to configure Xwindows. For the answers to the various questions that it prompts, look at my XFreeConfig-4 file for the right ones. The most important thing is to answer "no" to using the kernel framebuffer and to use "/dev/gpmdata" for the mouse. Alternatively, just copy the config file that I provide to your "/etc/X11/" directory and it should work.


Sound turned out to be the trickiest thing to get right. I had loaded up all the right drivers but when I tried playing a mp3 track, it would look like it was playing but there was nothing coming out of the speakers. I tried reading newsgroups and fooling around with various sound modules to see if they would work without any success.

It turns out that under Linux, the system mutes the sound by default and also sets the pcm volume to 0. So install the package "aumix" and then unmute the speakers and set the pcm volume to whatever you like. The thing that threw me off the track was that I originally installed the aumix applet that only let you configure the volume and umute the speakers. Since the pcm was still 0, even when I unmuted the sound, there was nothing coming out of the speakers. So I promptly thought there was something wrong with the driver configuration. The drivers to use for this are the ac97_codec and i810_audio.

The most amazing thing about sound is that the three buttons on top of the keyboard for adjusting master volume and muting actually work after you set it up using aumix!


APM is very well supported in this laptop. The apm scripts are smart enough to unload all the appropriate sound, pcmcia, ethernet drivers when suspending and reloads them when coming out of suspend.

One particular quirk when suspending when connected to mains power is that it only turns the screen off. You have to run the command "apm -s" to actually get it to suspend when connected to the an A/C current.


Update: I had to get hibernation working when I got a spare battery. You can't swap batteries without first powering down or hibernating. First, you need a blank partition on your drive that is roughly the size of the RAM in the machine. Then, use the IBM utility to create initialize the hibernation partition. I forgot if the utility creates a boot floppy that you boot up with or if it runs from a DOS command line. In either case, just run the program from a DOS command line and figure it out. The instructions that come with the program are quite useless.


Update: This version of the ltmodem package works with the kernel I packaged with kernel-package. Just unpack, configure, and compile. I managed to get it working with wvdial, which is what I recommend you use too.

Chris Barker's Notes on PXE install, X Configuration, and Mouse Button Configuration

Notes on installing Debian on a thinkpad x23. Chris Barker

PXE install: Installing without a floppy--what an ordeal. You can find reasonable documentation at the syslinux home page for pxe, currently here: . There are two serious gotchas, however, relating to details specific to the x23. First, when booting the x23, you must select F12 for the "temporary boot device" option. There will be several boot options, including the hard drive, one labelled "network boot", and one mysterious one labelled "isa iba slot 240" or whatever. You would think that "network boot" is the right one--but no, that has no effect, you have to select the mysterious one. Second, once you get the pxe boot to load in a Debian installation disk, as far as I know, you are only able to provide a kernel and a root initrd; in particular, there is no way to provide device drivers. The result is that the install kernel doesn't know how to use the built in ethernet (even though you just transferred the kernel using the ethernet). After much frustration, I managed to add the relevant driver to the root initrd. It was fairly complex: get matching linux.bin, root.bin, and drivers.tgz from the Debian disk images. By "matching", I mean that the kernel, the root initrd, and the drivers must all be from the same flavor; I used the bf2.4 flavor. (Actually, I think I used tftboot.bin for a kernel instead of linux.bin. All of the drivers are gathered together in a file called drivers.tgz somewhere, I think it was under the 2.4MB disk images. Could the Debian install method possibly be more complex?) Unpack the drivers. Find the driver for the ethernet, namely, "eepro100.o". gunzip the root.bin. (It's probably easiest to rename it "file.gz" so that gunzip will uncompress it.) Mount it ("mount -o loop file /mnt"). Copy the driver into the newly-mounted root file system ("e.g., cp eepro100.o /mnt"). Unmount the root file system ("umount /mnt"). Re-compress it. Rename it root.bin. Tell tftpd to us it as your initrd. Once you get the install kernel running on the x23, press alt f2 to get a shell. In the shell, load the driver ("insmod eepro100.o"). Then in the installation menu, selecting "configure network" should work, and you're off.

Someday installing from PXE will be effortless...

The automatic configuration of the X server chose a default color depth of 8 (256 colors), so I added the line "DefaultDepth 24" in the Screen section of the XF86Config-4 file.

Mouse: You can find a control program for Linux that will enable downward pressure on the mouse button to be translated into a button click. Annoyingly, you have to compile the program yourself (no apt-get package), which means first installing a bunch of header files for gcc and various X libraries. But once it's working, it's great--pressing on the red nubbin works like a button press!

Last updated: 17th May, 2003
eujin at