You will be pleased to know that Linux works quite happily on most of IBM's ThinkPad series of notebook and sub-notebook computers, including all modern ones. Most mainstream distributions (Debian, SuSE, RedHat) install from the box. Consequently, this web page isn't really necessary any more; but it remains here partly as a record of the efforts we went to in the mid-1990s to get Linux running, and partly in case anyone acquires a really old ThinkPad and wants to get Linux up on it.
The author still has his working 750C, based around a 33MHz 486 processor! However, he no longer uses it seriously and won't answer any questions you may send him now. (His current laptop? An Apple PowerBook.)
This document is available on the World-Wide Web via the URL
http://peipa.essex.ac.uk/tp-linux/
This document is, to the best of the author's knowledge, correct. He does not take any responsibility if you trash your machine on the basis of this information; nor do any of the people who supplied it! Please notify him of any corrections or additions. General comments are also welcomed.
The ThinkPad models
Docking stations
PCMCIA support
Preparing to install Linux
Installing Slackware Linux
ThinkPad support in Linux
Using lilo
Configuring X
Other goodies
In conclusion
Contributors
WWW pages describing linux on other laptops
There are several ThinkPad models, each of which has a slightly
different architecture. Several of the models are not suited for
running Linux. The ones you are most likely to meet are:
Chris Hanson says:
Several PCMCIA cards are known to work on the ThinkPads, generally
via David Hinds'
excellent card services driver. This driver has the advantage that
it is loaded into the kernel at boot-time, rather than being
permanently linked in, and that it supports hot-swapping of cards.
Specific combinations that have been reported are:
Please let the author know of any other cards that work.
The general advice given in documents describing Linux installation
obviously apply to the ThinkPad too -- for example, be sure to back up
files you have created under DOS and Windows, as well as DOS and
Windows themselves. It is unfortunate that IBM don't supply
distributions for these on floppies, as backing them up can take as
long as the Linux installation! The first step in installing Linux is to partition the hard disk,
usually by adding two new primary partitions for Linux and its swap
file. If you are lucky, you may be able to use the FIPS utility to
re-partition the disk non-destructively; FIPS is available from the
usual Linux archives. If you are unlucky --- for example, because you
have been running DOS and Windows on the machine for a while --- the
disk is probably too badly fragmented and you will have to do a
complete backup of the system, re-initialize it, and then set about
installing Linux. This is covered well in the standard Linux
installation guides.
Providing you're using a version of Slackware later than 2.0, it
should install "from the box" on the ThinkPad. The last version I
installed personally was 2.3, and this certainly worked. The only
thing to remember is to type
This section contains details of the quirks people have discovered
in the ThinkPads as they affect Linux. Most of the code presented in
this section has now been merged in with the main Linux sources: they
are retained here principally as a record of what was done and by
whom. You are not expected to have to patch the kernel sources
yourself in order to install Linux!
Most ThinkPad models have a 2.88 Mb floppy drive with a quirky
disk-changed sensor. Older Linux kernels did not support either the
higher density or the inverted bit; however, the floppy driver
underwent a major revision for Linux 1.1.72, these changes being
carried out by Alain Knaff.
To enable the support for the inverted bit, one must give the
following option to lilo at the boot prompt:
Brad Pepers discovered that
the oft-mentioned problem in locating the disk geometry of ThinkPad --
and, come to that, ValuePoint -- machines is not, as had previously
been thought, due to a problem in the BIOS: what is actually failing
is the code that determines the number of drives from the CMOS.
A one-line patch to routine hd_geninit of the hard disk
driver corrects the problem. The hard disk driver is in the file:
/usr/src/linux/drivers/block/hd.c and the modification simply
increments the number of hard disks if the number of cylinders of a
particular drive is non-zero. The region of code concerned is
An alternative approach (which is what the author uses) is to
specify the disk geometry via lilo. For example, on the author's
machine, which has the 340 Mb hard disk, the line to add to the LILO
configuration file would be:
Perhaps the best way to show a possible LILO configuration for the
ThinkPad is to describe my own. I have configured my machine to have
three partitions:
The LILO configuration file, /etc/lilo.conf, is as follows:
The following configuration file was produced by Anders Odgaard when
installing Linux on his ThinkPad 370.
The following X configuration file works fine on the LCD screen of
the author's 750C running the X that comes with Slackware 2.3; he
hasn't tried it on an external monitor. (Some of its content is due
to Juha Heinanen.)
It is said that, to be able to drive an external monitor via the VGA
port on the back of the ThinkPad, you must switch to it from DOS
before booting Linux. If this is done, it is said that the 1024x768
mode works; again, he hasn't tried it.
(Note that the following refers to XFree version 2: things have
probably changed for XFree 3.)
Michael Steiner has done some
work on getting X to work on the 750cs, with some success. The
standard X86_SVGA X server does not work on the 750Cs:
everything comes out double! He has found some of the reasons and
fixed them; here are the patches. Note that DUAL_SCAN must
also be defined, either via a #define in driver.c or
via -DDUAL_SCAN in the Makefile.
However, some problems still remain: for example, when switching to
or from other virtual terminals, the screen is occasionally messed up.
Typing Fn-F7 (refresh screen) should fix it. The vanilla
XF86_VGA16 driver apparently suffers from the same problem.
Craig Vosburgh has
donated his XF86Config file for XFree 3.1 for the model 755C.
Michael Steiner reports that
the APM
package works "if you just ignore the reply." He also reports
that the ThinkPad 750's built-in suspend/hibernate stuff works anyway
(if you created a suitable file to hold the memory contents under DOS
or OS/2).
Inevitably, the APM driver needs patching.
Although Linux works perfectly on many of the ThinkPad range, and X
is happy on at least some of the machines, there are some things that
are tricky or not supported in software that is publically-available:
for example, sound support on the 750. If you have solutions to ---
or just further information concerning --- any of the ThinkPad quirks,
please let the author know and he will incorporate details into this
document.
Many people have contributed to the information in this page. In
particular, information from the following people has been used in the
construction of this document:
Erol Basturk
There are WWW pages concerned with bringing up Linux on a few other
laptops:
The ThinkPad Models
ramdisk floppy=thinkpad
at the bootdisk prompt gets around the problem.
mount floppy=thinkpad
/dev/hda1 1 521 262552 6 DOS 16-bit >=32M
/dev/hda2 522 826 153720 83 Linux native
/dev/hda3 827 859 16632 82 Linux swap
/dev/hda4 860 1047 94752 83 Linux native
loadlin c:\loadlin\vmlinuz floppy=thinkpad root=/dev/hda2 ro
boots Linux and allows normal usage of the floppy drive. The
other disk series were then installed to /dev/hda2.
The sound capability on these machines is based on a different chip to
the sound on the 750 series. The CD and CE models may have built-in
fax modem cards (I'd advise you to check this.) Linux runs on these
machines too.
Gregory Wright has found a quirk
for the 755CD: "In Linux versions before 1.3.0, there is a bug in the
IDE ATAPI CD-ROM driver that causes errors with the ThinkPad 755CD's
CD-ROM. The errors show up as `buffer botch' messages in
/var/adm/messages, but the most prominent symptoms are read
errors and directory listings that have files missing. I built and
installed 1.3.3 and the problem went away."
Note that there is a separate WWW page
dedicated to this machine.
The Docking Stations
There are docking stations ("Dock 1" and "Dock 2") for at least the
360, 750, and 755 machines. Gerard
A. Robinson informs us
"I have had success in building a 1.2.1 linux kernel (from the
InfoMagic Mar. '95 CD-ROM) that boots from a floppy with root set to
a SCSI drive attached to the Dock I. The SCSI controller is a
TMC-950 chip. One can build a kernel by defining an OVERRIDE
address, the CONTROLLER as FD, and the IRQ as whatever is set, plus
making the change recommened in 4.12.1.6 of the v2.15 SCSI-HOWTO
file. The controller will be recognized if you put the ID string
into seagate.c for the Dock I, which is "IBM F1 BIOS
V1.2009/23/93" (I'm typing this from work, so the 23/93 part is a
little suspect). It still needs the "Common Problems" #6 fix,
mentioned above, to work successfully. Now if I could just get it
to recognize the floppy after I boot! This is with a TP360E."
"I have patched the aha152x driver to recognize the Dock
II, and I thought you might like to include the patch on your page.
I've submitted it to the developers, so hopefully it will be
available in newer kernels."
The patch is:
*** /usr/src/linux-1.2.9/drivers/scsi/aha152x.c. 1 Tue May 2 00:31:26 1995
--- /usr/src/linux-1.2.9/drivers/scsi/aha152x.c Mon Jun 12 03:03:44 1995
***************
*** 396,401 ****
--- 396,402 ----
{ "Adaptec BIOS:AIC-6360", 0xc, 21 }, /* on-board controller */
{ "ScsiPro SP-360 BIOS", 0x2873, 19 }, /* ScsiPro-Controller with AIC-6360 */
{ "GA-400 LOCAL BUS SCSI BIOS", 0x102e, 26 }, /* Gigabyte Local-Bus-SCSI */
+ { "Adaptec BIOS:AHA-1532P", 0x1c, 22 }, /* IBM ThinkPad Dock II */
};
#define SIGNATURE_COUNT (sizeof( signatures ) / sizeof( struct signature ))
#endif
PCMCIA Support
Combinations using drivers other than David Hinds' are:
Preparing to Install Linux
Installing the Slackware Linux
floppy=thinkpad
on the lilo prompt (in addition to any other things you have
to type). If Linux doesn't auto-sense your hard disk geometry, you
may also have to specify that to lilo. You can find the disk
geometry from, for example, the DOS FDISK program.
ThinkPad Support in Linux: The details
The floppy driver
floppy=thinkpad
The hard disk driver
if (!NR_HD) {
for (drive=0 ; drive<2 ; drive++) {
hd_info[drive].cyl = *(unsigned short *) BIOS;
hd_info[drive].head = *(2+BIOS);
hd_info[drive].wpcom = *(unsigned short *) (5+BIOS);
hd_info[drive].ctl = *(8+BIOS);
hd_info[drive].lzone = *(unsigned short *) (12+BIOS);
hd_info[drive].sect = *(14+BIOS);
if (hd_info[drive].cyl) NR_HD++; /* ThinkPad mod */
BIOS += 16;
}
The additional line is clearly indicated by a comment. This
modification is in the source code of more modern kernels,
though one must
#define does_not_work_for_everybody_with_scsi_but_helps_ibm_vp
(say at the beginning of linux/drivers/block/hd.h) to enable it.
APPEND = "HD=914,15,49"
Using LILO
boot=/dev/hda
image = /zImage
label = lin-hd
ramdisk = 0
root=/dev/hda3
vga = normal
other = /dev/hda1
label = dos
table=/dev/hda
since I use a disk driver with the patch to recognize the hard disk
geometry. Note that Linux is booted from the hard disk by default
but, by holding the shift key down while booting, one can elect to
boot DOS by typing `dos' at the resulting prompt.
Configuring X
X Config for the 370
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
Section "ServerFlags"
EndSection
Section "Keyboard"
Protocol "Standard"
AutoRepeat 500 5
LeftAlt Meta
RightAlt ModeShift
RightCtl Compose
ScrollLock ModeLock
EndSection
Section "Pointer"
Protocol "ps/2"
Device "/dev/psaux"
Emulate3Buttons
EndSection
Section "Monitor"
Identifier "Generic Monitor"
VendorName "Unknown"
ModelName "370C"
Bandwidth 80
HorizSync 35.38
VertRefresh 67.38
ModeLine "640x480" 28.3 640 672 768 800 480 490 492 525
EndSection
Section "Device"
Identifier "Generic SVGA"
VendorName "IBM"
BoardName "Unknown"
Chipset "wd90c30"
EndSection
Section "Screen"
Driver "svga"
Device "Generic SVGA"
Monitor "Generic Monitor"
Subsection "Display"
Depth 8
Modes "640x480"
ViewPort 0 0
Virtual 800 600
EndSubsection
EndSection
X11R6 Configuration for the 500
Peter T. Breuer has passed on the
following configuration file, which is what he uses on his TP500.
# $XFree86: xc/programs/Xserver/hw/xfree86/XF86Conf.cpp,v 3.6 1994/09/26 15:30:19 dawes Exp $
#
# Copyright (c) 1994 by The XFree86 Project, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# Except as contained in this notice, the name of the XFree86 Project shall
# not be used in advertising or otherwise to promote the sale, use or other
# dealings in this Software without prior written authorization from the
# XFree86 Project.
#
# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of
# this file. This man page is installed as /usr/X11R6/man/man5/XF86Config.5x
# **********************************************************************
# Modified by ptb@dit.upm.es for a thinkpad 500 monochrome VGA. Dec 1994.
# **********************************************************************
# Files section. This allows default font and rgb paths to be set
# **********************************************************************
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
# XCOMM FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
# XCOMM FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
# XCOMM FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
# XCOMM FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
# **********************************************************************
# Server flags section.
# **********************************************************************
Section "ServerFlags"
# Uncomment this to cause a core dump at the spot where a signal is
# received. This may leave the console in an unusable state, but may
# provide a better stack trace in the core dump to aid in debugging
# NoTrapSignals
# Uncomment this to disable the
XF86 Configuration for the 750C
# Refer to the XF86Config(4/5) man page for a description of the format
Section "Files"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
RGBPath "/usr/X11R6/lib/X11/rgb"
EndSection
Section "ServerFlags"
EndSection
Section "Keyboard"
Protocol "Standard"
AutoRepeat 500 5
ServerNumLock
LeftAlt Meta
EndSection
Section "Pointer"
Protocol "ps/2"
Device "/dev/bmouseps2"
Emulate3Buttons
EndSection
Section "Monitor"
Identifier "TP Monitor"
VendorName "IBM"
ModelName "TP750C"
BandWidth 80 # this may not be correct
HorizSync 35.38
VertRefresh 67.38
ModeLine "640x480" 28.3 640 672 768 800 480 490 492 525
EndSection
Section "Device"
Identifier "IBM Device"
VendorName "Unknown"
BoardName "Unknown"
Chipset "wd90c30"
EndSection
Section "Screen"
Driver "vga256"
Device "IBM Device"
Monitor "TP Monitor"
Subsection "Display"
Modes "640x480"
ViewPort 0 0
Virtual 800 600
EndSubsection
EndSection
X for the 750Cs
*** lib/Server/drivers/vga256/pvga1/driver.c Wed Jun 22 15:49:40 1994
--- lib/Server/drivers/vga256/pvga1/driver.c.orig Tue Jun 7 23:03:36 1994
***************
*** 134,142 ****
#define IS_WD90C3X(x) (((x) == WD90C30) || ((x) == WD90C31))
! /*!! commented by sti */
! /* #undef DO_WD90C20 */
! #define DO_WD90C20
static unsigned PVGA1_ExtPorts[] = { /* extra ports for WD90C31 */
0x23C0, 0x23C1, 0x23C2, 0x23C3, 0x23C4, 0x23C5 };
--- 134,140 ----
#define IS_WD90C3X(x) (((x) == WD90C30) || ((x) == WD90C31))
! #undef DO_WD90C20
static unsigned PVGA1_ExtPorts[] = { /* extra ports for WD90C31 */
0x23C0, 0x23C1, 0x23C2, 0x23C3, 0x23C4, 0x23C5 };
***************
*** 383,400 ****
if (!vga256InfoRec.videoRam) {
unsigned char config;
! #ifdef DUAL_SCAN
! /* check if we have a dual-scan LCD */
! outb(vgaIOBase + 4, 0x31);
! if ((inb(vgaIOBase + 5) & 0x3) == 0) {
! /* clear bit 6 to disable upper 512k The remaining 512Kbytes
! of video memory are not disabled by clearing the bit, but it
! is actually used as a shadow of first 512Kbyte */
! outb(0x3CE, 0x0B); config = inb(0x3CF);
! outb(0x3CE, 0x0B); outb(0x3CF, config & 0xAF);
! outb(0x3CE, 0x0B); config = inb(0x3CF);
! }
! #endif
switch(config & 0xC0) {
case 0x00:
case 0x40:
--- 381,388 ----
if (!vga256InfoRec.videoRam) {
unsigned char config;
! outb(0x3CE, 0x0B); config = inb(0x3CF);
!
switch(config & 0xC0) {
case 0x00:
case 0x40:
XF86Config for the 755C
# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of
# this file. This man page is installed as /usr/X11R6/man/man5/XF86Config.5x
# **********************************************************************
# **********************************************************************
# Files section. This allows default font and rgb paths to be set
# **********************************************************************
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
# XCOMM FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
# XCOMM FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
# XCOMM FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
# XCOMM FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
# **********************************************************************
# Server flags section.
# **********************************************************************
Section "ServerFlags"
# Uncomment this to cause a core dump at the spot where a signal is
# received. This may leave the console in an unusable state, but may
# provide a better stack trace in the core dump to aid in debugging
# NoTrapSignals
# Uncomment this to disable the
Other Goodies
APM Support for the 750
*** ../apmd.c Wed Apr 13 17:52:17 1994
--- ../old/apmd.c Tue Dec 7 18:37:54 1993
***************
*** 8,30 ****
#include
In Conclusion
The Good Guys
Peter T. Breuer
Bobby Fleming
David Gerstl
Chris Hanson
Juha Heinanen
Jerome Kaidor
Michael Lachmann
Robb Masters
Anders Odgaard
Gerard A. Robinson
Richard Soderberg
Michael Steiner
Takao Moriyama
Akira Terao
David N Turner
Craig Vosburgh
Tim Wicinski
Gregory Wright
James Yee
Linux on Other Laptops
Please feel free to comment on
this page.
Creator: Adrian F. Clark <alien@essex.ac.uk
>
Keywords: linux thinkpad
Date: 3 vii 1997