Here is how I got Linux (RedHat 7.2) running on an IBM Thinkpad X22. Or,
rather, two Thinkpads. The first A is a 2662-92G:
12.1" screen, 20GB ATA-100 disk, 128MB memory, 800MHz mobile PIII. The second
B is a 2662-9DG, which is the same apart from having
built-in Ethernet (Intel PRO/100) and Wireless (PRISM MiniPCI Combo).
I gleaned much useful information from the Linux on Laptops page, in particular the other Thinkpad X22 pages. The following describes what I did: I was successful, but I guarantee nothing, and accept no liability for lost data, damaged hardware or any other untoward happening in your life. |
I couldn't find a free tool to resize the partition (FIPS, etc., complained about the strangeness of the way IBM lays things out on disk) so I took the destructive route. I am led to believe commercial partition managers will shrink the W2K partition correctly.
A few choices on the way:
bootpart 2 BOOTLINX.BIN LinuxHere, the "2" is the number of the Linux /boot partition, which you can confirm by bootpart list. The "Linux" is some suitably descriptive name.
Then
System -> Advanced -> Setup and RecoverySet default as Linux. You might want to reduce the wait time, too, while you are here.
Reboot. Up comes Linux! If you use F11 to reinstall W2K you will need to repeat this step.
VideoRam 8192in to the Device section.
X now starts properly. You might want to change /etc/inittab to boot directly into X (set initdefault to 5) if you like that kind of thing.
The sound driver doesn't like APM suspend/resume, and you must edit /etc/sysconfig/apmd to prevent hangs after a resume.
Set RESTORESOUND="yes" and SOUNDMODULES="i810_audio ac97_codec soundcore".
After a resume it doesn't restore the mixer volume setting, though this can be fixed by using aumix -L in /etc/sysconfig/apm-scripts/apmcontinue
In any case, running gmix will reset things.
This also means that if you compile a new kernel, you must configure the sound as a module, not built-in. The sound driver in the kernel that comes with RH7.2 is a bit buggy, and it is a good idea to upgrade the kernel anyway.
Note that the keyboard mute is not a toggle: press volume up or down to un-mute.
The hibernate (save to disk) Fn-F12 works after a bit of jiggling. Instructions on how to do this were stolen from here.
IBM supply a program uttpvhib to create a hibernation file. Download this file to C:\WINNT. Running it (under W2K) creates a bootable floppy disk. Boot from this disk, and follow the instructions (create the hibernation file on the C partition). This takes at least 10 minutes and makes a (hidden in Windows) file save2dsk.bin. Reboot to Linux, and hibernation now works. If you add more memory, you need to re-run to enlarge the hibernation save file.
On another identical machine adding memory then installing the hibernation file caused the machine to pause for 2 minutes early in the the boot sequence. Removing the hibernation file got rid of the pause. This remains an unresoved problem.
If you find that suspend/hibernate takes a long time (hanging maybe 3 minutes or so before activating) this could be due to a feature in the apmscript. Try this: in /etc/sysconfig/apm-scripts/apmscript replace the lsof by lsof -n to prevent it trying to do IP name lookups.
A Has a Lucent modem, and might be supported.
B Has an AMR modem, probably not supported.
B The internal Ethernet (Intel Pro/100) is detected and works correctly.
Put
alias eth1 orinoco_pciin /etc/modules.conf
This is configured in /etc/sysconfig/network-scripts just like any other network card. I have something like this in ifcg-eth1:
DEVICE=eth1 BOOTPROTO=static BROADCAST=172.16.255.255 IPADDR=172.16.0.2 NETMASK=255.255.0.0 NETWORK=172.16.0.0 ONBOOT=yes # ESSID="Home Network" MODE="Ad-Hoc" RATE=11M CHANNEL=1 KEY="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xx restricted"As an alternative, you might want to try a separate package from the Linux-Wlan Project. Get and install. The prism2_pci module is what we need. This package is not so convenient to use as the standard PCMCIA stuff, but it seems to work.
The drivers don't survive a suspend/restore, so you must use /etc/sysconfig/apmd to remove and restore prism2_pci.
alias block-major-2 usb-storagein /etc/modules.conf. This enables the USB floppy drive, though it appears as /dev/sda (or possibly sdb, etc., if other USB devices are plugged in) rather than the more familiar /dev/fd0. Update /etc/mtools.conf to reflect this if you use mtools:
drive a: file="/dev/sda" exclusive mformat_only drive a: file="/dev/sdb" exclusive mformat_onlyThis will find the floppy whether it is currently sda or sdb.
NB. This means you need to include both USB and SCSI emulation support if you make a new kernel.
USB CD. Works. As if by magic, a symbolic link for /dev/cdrom appears when you plug in the CD drive.
The default BIOS settings try to save power by turning everything off when your back is turned. I prefer to keep things running:
Config -> Power.
The picture at the top of the page was taken using a Canon S10, loaded using the compact flash slot (see the section on PCMCIA ATA/IDE card drives in the PCMCIA-HOWTO), and edited with the gimp.
Unusually, the X22 doesn't have the double height PCMCIA slot you see on most machines, but a single height PCMCIA slot and a single height compact flash slot. Presumably the argument is that with built-in Ether, Wireless and Modem you won't need a PCMCIA card so often. On the other hand it does mean you can't use the thicker PCMCIA and compact flash cards.
I wanted to keep the W2K and rescue partitions, while you could delete the rescue partition and boot directly from LILO or GRUB. But then you need to get a rescue CD from IBM if you trash W2K. Of course, better would be to dispense with Windows completely.
Adding Linux kernels: just run lilo as normal, don't touch the W2K boot manager. Probably GRUB works just as well as LILO, but I've not tried.
X works well in 24 bit mode: perhaps should try 32 bits.
The Euro (€) key is easily supported.
Russell Bradford, March/April 2002.