Installing DebianLinux 2.0 on an IBM ThinkPad390


Well InternetAlaska bought me a laptop and so I immediately stuck Linux on it. Mostly things went uneventfully though a couple of little things haven't been solved yet. I have been a little frustrated with the lack of documentation for the 390's (there was nothing on the Linux laptop page when I first got it, and there is only one far from complete entry there now). Also documentation for how sound works under with the 2.2 kernels is either apalling or I'm looking in the wrong places.

[Note: This page was written in early 1999 so is now quite out of date. The approximate information is still good so I'm leaving it up but information about specific releases is probably quite off by now.]

See Also: ThinkPadT20


Installing Debian

This went quite painlessly, there was only one issue which took me a while to resolve. My 390 came with it's 4GB drive pre-partitioned into two 2GB partitions which suited me well enough. I repartitioned the second partition to make a swap partition so that it looks like this in cfdisk:

    hda1        Boot        Primary   DOS FAT16 (big)  [NO NAME    ]    2047.35 
    hda2                    Primary   Linux ext2                        1898.31
    hda3                    Primary   Linux Swap                         180.42

The important thing to note here is that the boot flag is on the windows partition. It turns out that the way the power saving features work with the 390 (I don't know if it's all modern Thinkpads that work this way) requires that the boot flag is set on the partition which contains the "save to disk" file, this is a bios requirement so there's not much you can do about it. Once this was done everything else was easy. It did mean that I had to setup my lilo.conf a little differently then I was used to, but it was a simple change so wasn't to much of a hassle.

Also IBM tech support deserves a big thanks here. When I called them up out of desperation to solve this problem they were very helpful. The guy I was talking to knew nothing about Linux but was sincere and with some clear explaining about what the problem was and how I thought it was related to my Linux installation we eventually figured it out. Thanks to IBM for not refusing to help because I put Linux on my ThinkPad!!

Compiling the Kernel

Compiling the kernel was fairly straight forward and I've had sucess with everything from 2.0.34 to 2.2.9. I followed Debian's example and compiled nearly everything as a module because I wanted to see how much i could make work without kernel bloat or having to constantly recompile and reboot to change parameters. Currently the features I have enabled are APM support, IP masquarading, ethertap (for tunnel vision, a really neat and easy to implement looking VPN solution), sound and Irda (I'm still playing with it). If you're interested I'll happily mail you my current kernel config file.

APM works just great as well, even all the hot keys to suspend, hibernate and save to disk.

PCMCIA Support

The only catch to this is that cardbus support in the PCMCIA packages is relatively recent. I'm not sure exactly which version is required for cardbus cards to work. I'm using the Debian 3.0.9-3 package and it works great. So long as you are running the lastest versions and you have a supported card everything should work just peachy (I'm using a Xircom Realport with great success).

Setting up XFree86

Considering my chipset wasn't supported in the any of the standard XFree86 servers available when I first installed (version 3.3.2), getting X running was surprisingly easy. Originally I got the custom xserver (xfcom_neomagic) from precision insight. That worked perfectly first try with their XF86Config file. Since then I've started playing with VMWare (which is pretty cool btw) and I've upgraded to their hacked XFree86 server which also works great with the same XF86Config file.

If you want you can see a couple screen shots of my desktop at here and here. I'm running WindowMaker as my window manager and wterm as my terminal.


This was a major pain in the butt from the very beginning, however thanks to the help of two key people I eventually got it working. Originally I had very limited sucess (I could play cd's and occasionally cat .au files to /dev/audio with the standard Linux sound drivers, so I tried the commercial OSS drivers. They worked even worse for me (though to be fair I never asked them for help). In the end this is what I needed to do to make it work (as a side note it's working with the default bios settings for sound).

Under Debian you need to create a file called /etc/modutils/sound and add this into it (obviously you need to make sure that the settings here match your settings in bios):

alias sound opl3sa2 
pre-install sound insmod sound dmabuf=1
alias midi opl3
options opl3 io=0x388
options opl3sa2 mss_io=0x530 irq=5 dma=0 dma2=1 mpu_io=0x300 io=0x370

And now you need to run (as root) 'update-modules'. Under Redhat/Slackware I believe you simply add these settings to your /etc/conf.modules file, but doing that under Debian will mean that the next time the 'update-modules' script is run, your changes will be lost. Now to enable sound all you need to do is run 'modprobe sound', and you should be set.

What problems did I have? I had lots of problems with DMA and IRQ conflicts. I believe that most of them were due to minor errors in the above lines, but I haven't tried to narrow it down and figure out exactly what went wrong. I was also told that the Linux sound drivers didn't support IRQ 5 so for a long time I was trying to make it work with IRQ 7. It turns out that this information is blatently false. I believe the confusion was due to the fact that the Redhat 'sndconfig' tool doesn't allow IRQ 5 for your sound setup when it tries to auto-detect your sound config. I would strongly recommend against changing your sound IRQ in bios as it caused me nothing but headache. I would also recommend that in your /etc/pcmcia/config.opts file you make sure that you are excluding IRQ 5 (or whichever one you end up using) from use by your PCMCIA drivers. the last problem I had was that for some reason in all my custom compiled kernels I was missing the soundlow module. To get around this I installed the Debian 2.2.9 packages and everything sprang to life. I never got around to figuring out what I did wrong for the soundlow module not to be installed.

Here is what my setup looks like when it's working:

# tail /var/log/messages 
Jun 5 11:53:05 heyzeus kernel: ad1848/cs4248 codec driver
Copyright (C) by Hannu Savolainen 1993-1996
Jun 5 11:53:05 heyzeus kernel: Found OPL3-SAx (YMF719)

# lsmod
Module                  Size  Used by
serial_cs               3836   0  (unused)
serial                 19852   0  [serial_cs]
xirc2ps_cs             11460   1
ds                      5900   2  [serial_cs xirc2ps_cs]
i82365                 23248   2
pcmcia_core            40872   0  [serial_cs xirc2ps_cs ds i82365]
opl3sa2                 3688   0
ad1848                 15824   0  [opl3sa2]
mpu401                 18576   0  [opl3sa2]
sound                  58328   0  [opl3sa2 ad1848 mpu401]
soundlow                 300   0  [sound]
soundcore               2404   7  [sound]
nls_iso8859-1           2020   1  (autoclean)
nls_cp437               3548   1  (autoclean)
vfat                   11184   1  (autoclean)
unix                   10012  58  (autoclean)


This is something I've only made the most basic attempts to make work (eg. compiled the kernel and started collecting useful looking web pages to be read when I have spare moments). It doesn't look like it should be too hard but we'll see, sound is a more important project at the moment (I need my MP3!). My main reason for wanting this to work is so I can sync my PalmPilot via the IR port with my laptop and GSM phone (there is a cool looking utility called IRsync which will make this work on the pilot side and it would be nice to not have to carry my cradle around when travelling. It would also be useful to be able to sync my pilot while plugged into my IDSL line at home via an external TA (bye bye my only serial port).

USB Port

I haven't made any attemptes to make this work. The only USB devices which sound at all interesting to me are a quickcam and a zip drive, of which I have neither.

Tips and Tricks

While I've been using Linux for many years as servers and as a destop machine, this is the first time I've used Linux on a laptop and there have been some problems to solve which I'd never encountered before.

Links and Thanks

There are certain pages that I've found in the proces of making this all work which have been very helpfull, or look like they will be helpful soon.

CategoryHardware CategoryPublished

ThinkPad390 (last edited 2003-11-22 23:50:06 by AdamShand)