Installing Debian on an IBM ThinkPad 390 by Adam Shand


Well Internet Alaska 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.

See Also: ThinkPadT20


  • Model: IBM ThinkPad390 [2626-70u]
  • Screen: 14.1" TFT [1024x768x24bpp]
  • CPU: Mobile Pentium-II 233 MHz
  • RAM: 128 MB RAM
  • Disk: 4.1 gb hard drive
  • Periferals: Built-in floppy and cdrom drive
  • Irda: Irda support (untested)
  • Sound: Neomagic nma2 chipset
  • Video: Neomagic nmg5 with 2.5 mb vram
  • PCMCIA: Two type 2 cardbus slots
  • Modem: LT winmodem

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.

  • The first one was that if I had any network sockets open I couldn't stop my PCMCIA drivers (eg. /etc/init.d/pcmcia stop) because I would get an error that the module was in use. I found that the best way to get rid of this was to run:

    # ifconfig eth0 down
    # /etc/init.d/pcmcia stop

  • Dummy interfaces are your friend. I use ethernet at work, PPP at home. The problem I had was when I wasn't connected at all. If I tried to send mail so that it would be queued and sendmail could send it when I was back on line it would hang indefinately because the main interface it was looking for was dead. This seemed to greatly piss things off, the solution i found for this was the dummy module. You need to compile support for it in your kernel (I believe Debian kernels come with it by default), you can do this by answering y or m to CONFIG_DUMMY=m. To bring up a dummy interface you do this:

    # ifconfig dummy0
    # ifconfig dummy0
    # ifconfig dummy0 down The only catch I've found is that even after you turn down the dummy interface you can still ping the interface. This is kind of annoying but can be easily enough fixed by simply removing the module like this:

    # rmmod dummy I haven't checked to see how this behaves if dummy support is compiled directly into the kernel rather then as a module.

  • One of my initial annoyances was the smaller screen and lower resolution. I don't mind running in 16 bit color (in fact that's what i normally run in) but dropping from 1200x1024 to 1024x768 was horrible. My main complaint with it was that I couldn't fit four xterms on the screen without them overlapping. When I tried to reduce their size (ctrl-right click for xterm) they got really ugly and didn't stay in proportion. So I messed around and eventually found a font that looked nice, was large enough to be readable and small enough that I could fit six wterms on my screen with minimal overlap. I did this by changing my ~/.Xdefaults file. A similar thing should work for the term of your choice (eterm, rxvt or xterm).

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.

  • A huge vote of thanks to Kenneth Harker for putting the Linux laptop Page together. Without this resource getting Linux to work as nicely as it is would have really sucked.
  • Although they didn't have anything on my ThinkPad390 the Linux on Thinkpads page deserves to be mentioned. Hopefully they'll link this page in soon.
  • Thanks to David Hinds for writing pcmcia support for Linux and maintaining the Linux PCMCIA information page. There is also the PCMCIA howto which helps explain some of the issues involved.
  • The Linux Mobile Guide howto looks useful as well as the official homepage of the Linux Irda project. I'm slowly disgesting what's at these sites for a future attempt to get my my IR port to work. Maybe the howto will help some as well.
  • Thanks to everyone who has helped me get this working along the way, I hope making this page available makes up for your time in some small way. Special thanks to Tyger Sunshine-Hill for setting me straight on how the sound stuff should work and in general being helpful and educating me, and to Ari Gordon-Schlosberg for being the one to finally help me get this working, his help was invaluable.
  • You might want to check out my more recent page about getting Debian Linux installed and working on my new ThinkPadT20.
  • And of course a final thanks to all the hard working Linux volunteers who made all this fun possible!
tutorial posted on 11 Feb 1999

Copyheart 1994–2024 Adam Shand. Sharing is an act of love.