OpenBSD on an IBM ThinkPad T23
ThinkPad T23 -- last updated $Date: 2009/02/05 02:38:31 $
My T20 went to my daughter when her 4 year old laptop broke. I replaced it with one of the latest in the ThinkPad T series, a T23. The IBM web pages were fuzzy regarding the built in wireless option, so I called to place the order. Calling was well worth while: IBM answered my questions, knocked over $200 off the list price, and threw in and extra 128 Meg of memory for free. The machine arrived three days later. I installed the extra memory (about 2 minutes work).
What I got was a T23, model 26478NU. That's a 1.13 GHz mobile PIII with 128 Meg of RAM (256 after I added another 128 Meg) 30 Gig of disk, DVD player, WinModem, fxp Ethernet, Prism based 802.11b, floppy, etc. The built in wireless includes an antenna and connects to my AP in places the T20 with Wavelan Gold card wouldn't. I'd guess the antenna helps. The system came with Windows XP professional. (I told IBM I wanted the cheapest OS as I was planning to blow it away to install OpenBSD).
Start-up
I've enough disk that in spite of what I told IBM I decided to keep XP on the system for the rare occasions when I want to run something that only exists in the windows world. I booted the system, filled out the various questions, entered my WEP code so the network could be found, and installed the 4 or 5 things I have that only run in the MS world. I would have loaded a few more things but discovered that my MKS toolkit and epsilon (emacs like) editor were so old that they were on 5 1/4 floppys. Oops. Anyway, I tested suspend and hibernate, then shut down the system. The next time I started it XP decided, for some reason that it wanted to convert the file system from FAT32 to NTFS. Interesting.
One thing of note is that no "recovery" CD is supplied, but at startup the BIOS gives you and option of F11 to "invoke the IBM product recovery program". Hmmm, I wonder if the recovery info is stored on the hard disk? I'll know more when the PartitionMagic I ordered arrives. Note: if ordering PartitionMagic on-line and using a sendmail.cf that checks for a valid message-id be aware that mail from the vendor will be blocked. No big-deal unless you specified on-line download for the delivery method. If you did you'll never receive the info needed to download the product.
Yep, there is a 1 GB hidden partition. OpenBSD fdisk reports it as of type ThinkPad Rec. PartitionMagic says its type IBM recovery. Whatever. In any case I'll keep it.
OpenBSD
The system would not run using an OpenBSD boot floppy (3.1-beta) without some fun and games. I booted with -c and enabled verbose output; that showed the system hanging while probing for ahc0. Booted a second time with -c and used the command "disable ahc" to get around the problem. The OpenBSD dmesg says that an intel 82801CA/CAM is used. Two aspects of this chip, SMBus and the Modem, are unsupported.
I used PartitionMagic to shrink the NTFS partition down to about 6G. That will leave 21G or so for OpenBSD. Should be enough. After copying down LBA and CHS numbers of the newly freed space I used fdisk to create a partition for OpenBSD. I did not make it the primary partition... more about that later.
When it came time for disk labeling OpenBSD shows UNIX partitions for the existing fdisk partitions. I blew them away and created my own disklabel from scratch. It looks like:
- / 512M
- swap 512M
- /var 512M
- /usr 512M
- /usr/local 1G
- /usr/src 2G
- /usr/obj 1G
- /usr1 2G
- /usr2 2G
- /usr3 4G
- /usr4 4G
- /usr5 the remainder (3.1G)
At network configuration time I used the opportunity to enter the media options to instead enter my wireless network ID and WEP key using the format:
nwid snafu nwkey 0x26hexdigitsthatmakeupmykey!!
Worked fine. I do like this recent addition to ifconfig. I loaded everything over the net from a recent snapshot I'd created. However, it seems that media opts do not appear to be saved to the generated hostname.if. I needed to add a
up nwid snafu nwkey 0x26hexdigitsthatmakeupmykey!!
entry to the generated file before dhcp is invoked.
PartitionMagic comes with BootMagic but it doesn't work on NTFS,
or at least needs one FAT partition. In any case I didn't use it.
Looking at the
OpenBSD
FAQ on Multibooting I saved the first sector of /dev/rwd0a, then
ftp'd it to another system where I could put it on a dos floppy.
I then booted XP, copied the contents of the floppy as c:openbsd.pbr
and added the line
C:\OPENBSD.PBR="OpenBSD -- Secure by default"
to the end of c:\boot.ini. Upon re-booting the
system I'm now given a choice as to which OS I want to run. Some more
tweaking of c:\boot.ini via the XP gui changed the
timeout to 5 seconds and the default OS to OpenBSD. Much better.
GENERIC dmesg. The GENERIC kernel does not have the ahc problem that the floppy kernel had. Notice there are no serial devices: the T23 was shipped with serial devices turned off in the BIOS. While in the BIOS I turned on the serial port, the IR port (so I can play), and changed the "close screen" action from "suspend the box" to nothing. The machine does have the IDE DMA issues described in the FAQ. A kernel with pciide flags set to 0x0001 boots and runs fine.
- A change to recognize the Intel 82801CAM IDE was commited to the tree on May 2nd. Kernels built from sources after that date need not set the pciide flags.
Here is another dmesg produced after enabling serial ports and using a custom kernel with the pciide flags set. The diff(1) between the two can be seen here.
APM
ThinkPads have Fn keys to blank the screen (Fn F3), suspend (Fn F4), and hibernate (Fn F12). Blank works. Suspend works... but you'll need to run apmd and have a /etc/apm/resume to set the nwid and nwkey for the wireless interface. zzz(8) does a suspend. As for hibernate: the system just beeps at me when I hit the hibernate key. Bummer. [I checked: hibernate works fine under XP.] Apparently the hibernate function requires OS support which isn't present in OpenBSD.
X Windows support
I copied my T20 XF86Config and X just started working. The current version of the file notes that it is for the T23 with its S3 SuperSavage video device. The only downside so far is that ogle doesn't work at 24 bpp on this machine. It works fine at 16 bpp.
Audio
The audio device (auich) is supported but the system comes up with output muted. This command is overkill, but ensures that audio is enabled:
mixerctl -w $(mixerctl -a | grep mute | sed -e 's/=on/=off/')
Unlike the T20, audio on this box works with the default BIOS settings for PCI power savings.
![Amateur Radio Relay League [ARRL LOGO]](/gifs/arrl-2.gif)