Yidao Cai Home Page
Contact me

Redhat 7.0 Linux on IBM ThinkPad A21p

Chinese Visa Service
low price, reliable service!

Special ThinkPad Notebook Offers

Linux RedHat 7.0 on Notebook:
IBM ThinkPad A21p Model 2629-HWU


This document provides a description of the installation and configuration of Linux RedHat 7.0 on an IBM ThinkPad A21p notebook computer. It is not a step by step guide --- it only highlights key issues specific to this machine or the settings I am using.

This page was based on the A20p page at http://www.zhlive.ch/zhl_contents_linux.html. There is also another A21p page at http://thinkpad.lerskov.com/.

The URL of this page is http://www.ywpw.com/cai/linux/a21p/.

Note about RedHat 7.1: It installs out of the box, see link here (from Ray Lillard).

If you have more hints or problems on installation, please drop me a note!


1. Contents

  • Introduction
  • Installation
  • PCMCIA
  • Xwindows
  • Sound
  • Modem
  • Ethernet
  • USB
  • APM
  • Floppy
  • Appendix: Files and References

2. Introduction

The ThinkPad as I ordered it came with the following specifications:

  • CPU: Intel Pentium III 850Mhz SpeedStep Technology
  • RAM: 128 MB SDRAM (upgraded to 256 MB)
  • Storage: 30.0 GB
  • Video and Display: ATI Mobility 128 AGP (16 MB) and 15.0" TFT (1600x1200)
  • CDROM: Matshita SR-8175 internal 8xDVD
  • Floppy: Internal
  • Sound: Crystal SoundFusion PCI Audio
  • Ethernet and Modem: 3Com MiniPCI 10/100/56k combo
  • Keyboard: 80-key
  • Pointer: TrackPoint w/ 3 buttons
  • PC Slot: two Type I or Type II, or one Type III
  • Interfaces: Serial, Parallel, Monitor, S-Video in/out, USB, IR
  • Size: 12.97" x 10.66" x 1.69"
  • Battery: Li-Ion 58 Wh, 10.80 V

3. Installation

The ThinkPad came with Windows 2000 Professional installed. I ordered Win2000 since it is the standard setup at our institution and some of my work has to be done on it, though my time on Linux has increased from about 30% five years ago to 90% right now. For partitioning, the good thing is that the machine comes with one big FAT32 (unlike Gateway's NTFS), so using PartitionMagic 5.0 from a rescue disk created when installing PatitionMagic did the job. I shrank the Windows partition down to 4 GB, and created some Linux ext2 (/dev/hda3, /; /dev/hda5, /home), Linux swap and FAT32/NTFS partitions.

I installed RedHat 7.0 with normal installation. If you created Linux ext2 partition with Partition Magic or by other means, you have to get an update image disk from RedHat's web site, otherwise the installation will fail at the very end. Don't forget to pick up all the RH7 updates, security patches (there are already lots of them) and turn off rhnsd (otherwise your machine will be unusable in a month).

For booting, I installed LILO on the Linux partition /dev/hda3 (do NOT install LILO on MBR, Windows 2000 does not like it). Don't forget to create a boot floppy during installation, otherwise you have no mean to boot into Linux! After booting into Linux using the boot floppy (be patient, the floppy runs very slow), I grabbed the Linux boot sector and placed it on the C: drive (mounted as /win2k):

	dd if=/dev/hda3 of=/win2k/bootsect.lnx bs=512 count=1

I then added a line at the end of the NT boot.ini file (/win2k/boot.ini) using vi editor:

	C:\bootsect.lnx="Redhat Linux 7.0"

All these are done under Linux so that there is no switching back and forth between operating systems and change file attributes. After reboot, NT loader gives me the option to boot Linux.

4. PCMCIA

This is done automatically and it is running fine.

5. X-Windows

The A21p uses the ATI Mobility 128 AGP video card. X is "auto" configured to ATI rage 128 (r128_drv.o) by Redhat 7.0 (which uses XFree86 4.0.1), but the XF86Config is a mess, the highest mode is only 1024x864. Besides, if you try to logout, the system simply freezes and you have to hit the power switch for several seconds (even when the network is down).

So, use the following XF86Config file and driver r128_drv.o. Copy the configuration file to /etc/X11/XF86Config-4 and the module to /usr/X11R6/lib/modules/drivers/r128_drv.o . Yes, I know that the XF86Config was for A20p at 1400x1050, but with no change to the XF86Config, I got 1600x1200 on my A21p, and X comes back most of the time after logout. From time to time, the X login screen did not come back. I have to kill X by using Ctrl-Alt-Backspace and wait several seconds (or switch to terminal mode by Ctrl-Alt-F1 to kill X, then use ctrl-alt-F8) to get the X login screen back. After playing with the network configuration, this problem only happens occasionally.

6. Sound

The A21p comes with a Crystal SoundFusion PCI soundcard. Redhat 7.0 automatically configures it, but it did not produce sounds. Disabling "PCI Bus Power Mgmt" in BIOS menu did the trick. Push [F1] at startup, and disable <Config> - <Power> - <PCI Bus Power Management> (last entry, scroll down!).

7. Modem

Tha A21p includes a 3Com MiniPCI 56K modem. It is a winmodem and currently there is no driver for it (see here for details).

3Com MiniPCI combo team is soliciting feedback on whether there is a need for such a driver, so ask them to write one! The email address is linmodem@new-n-used.com or Clark Steed at linmodem-3com@new-n-used.com.

8. 3Com MiniPCI Ethernet Card

Network card support

If you are using 2.4 series kernel, it should be supported automatically.

For 2.2 series kernel, Redhat does not come with the correct driver for this device. Get an updated driver from links in http://www2.neweb.ne.jp/wd/fbm/3c556/. Although it was compiled for 2.2.18, it works for 2.2.16 (Redhat 7.0).

DHCP timeout

I use DHCP at work, and assigned IP at home. By default, Redhat takes about two minutes for the DHCP to timeout. I changed the ifup script so that it takes about 22 seconds. Setting the timeout too short may interfere with normal DHCP.

In file /sbin/ifup, there are two steps involved during DHCP negotiation, one is "pump", the other is "dhcp". "dhcp" timeout can be specified as an option, but "pump" timeout must be set up using a configuration file. So put an updated version of "ifup" at /sbin/ifup and create a file /etc/pump_eth0.conf.

The change in the /sbin/ifup script are (in the DHCP section)
Old:

     if /sbin/pump ${PUMPARGS} -i ${DEVICE} ; then
     ....
     elif /sbin/dhcpcd ${DHCPCDARGS} ${DEVICE} ; then
     ....
New:
     if /sbin/pump ${PUMPARGS} -c /etc/pump_eth0.conf -i ${DEVICE} ; then
     ....
     elif /sbin/dhcpcd ${DHCPCDARGS} -t 12 ${DEVICE} ; then
     .... 
Note
1. Save a copy of your original ifup script before making any changes or overwrite with the one I provide.
2. You will need to adjust the timeout value and number of retries to your network condition.
3. Keep the original file permission.

Local network IP setup

This is done by creating a clone of eth0, using files /etc/sysconfig/network-scripts/ifcfg-eth0-cln. The modification in file /etc/rc.d/rc.local allows it to automatically detect if network is setup and, if not, brings up the local network.

In this example, I use the private network 192.168.2.0 and assign IP address 192.168.2.99 and hostname "a21p" to the A21p. Of course you need to create a routing table for the local network using linuxconf. This can be done by adding the following line to the /etc/sysconfig/static-routes file:

eth0-cln net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.99

9. APM

Apm is giving a correct load of the battery. apm -s working very well. For wakeup use [Fn] and move the mouse a little bit, and the desktop is ready again! Hibarnation with running X-Server will result in unusable X-Desktop after resume if the computer is on network, otherwise it is mostly fine.

It was suggested that adding the following code to 'ifdown eth0' and then 'ifup eth0' in /etc/sysconfig/apm-scripts/apmcontinue on suspend-resume will help to solve network problem.

case "$1"; in 
	suspend)
		ifconfig eth0 down
		;;
	resume)
		/sbin/ifconfig eth0 up
		/sbin/pump -i eth0
		;;
esac
When I tested this with DHCP running, X comes back but network does not. I added a line
 
	/sbin/dhcpcd -t 12 eth0 
in the resume) section and solved the problem. Here is my version of "apmcontinue". This approach assumes that your DHCP server will give you the same host name, otherwise forget about hibarnation under X.

Under local network configuration, it is a different story: X comes back fine but the network does not. So a better way to do it is to do different things based on whether DHCP is used.

Here is a version of "apmcontinue" that works with both DHCP and home network. Note that this apmcontinue is based on our particular network setting (hostname, IP etc), and you should modify if your situation is different.

10. USB

I have not yet had a chance to test the USB port, as I have no USB devices. If anyone has info on this, let me know and I'll update this section.

11. Floppy

The floppy drive is partially supported. By using the word "partially" I meant that when you boot from the floppy, it takes hours (actually several minutes), but access using mtools (e.g. mcopy) seems to be at normal speed. So setup LILO, otherwise be patient booting off the floppy.

12. Appendix: Files and References


Page sponsor: Chinese Visa Service, your gateway to China
This page was created on December 24, 2000, and was last modified on July 17, 2001.
(C) Copyright Yidao Cai 1995-2005