"Linux Gazette...making Linux just a little more fun!"


Installing Linux on an IBM ThinkPad 365XD Notebook

By Sam Trenholme, [email protected]


My latest roadstop in the quest for the perfect affordable portable computer stops with the IBM ThinkPad 365XD notebook. Hawked from Egghead for only $1000, and with successful reports of sticking X on this thing form the 'net, I proceeded to install Linux on this beast. The install was one of the more difficult Linux installs I have had, with a number of problems:

First problem:

*Booting directly in to the RedHat install from the CD-ROM, the install could not see the CD-ROM.

The CD-ROM in a ThinkPad 365xd is a standard IDE CD-ROM. For unknown reasons this CD-ROM was invisible when I booted into the install directly from the CD-ROM. Making a RedHat install boot disk and booting from that resolved the concern. The CD-ROM was visible, and I was able to install normally.

Second problem 2:

* RedHat crashed in the middle of the install.

RedHat seems to do that sometimes, for very mysterious reasons. On the first install, RedHat crashed. I had to go back to square one and completely reinstalled. The second install of RedHat 4.2 went without incident, resulting in a functional RedHat system.

Third problem:

* After installing LILO, the ThinkPad refuses to boot from the hard disk.

After mutch futzing, I discovered that the BIOS refused to boot from the hard disk if it saw more than one primary partition. I configured fdisk thusly:

I made one primary partition the Linux partition, then made the swap partition the extended partition. I did this as follows:

My fdisk session went like this:

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-789): 1
Last cylinder or +size or +sizeM or +sizeK ([1]-789): 741

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
e
Partition number (1-4): 2
First cylinder (742-789): 742
Last cylinder or +size or +sizeM or +sizeK ([742]-789): 789

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (742-789): 742
Last cylinder or +size or +sizeM or +sizeK ([742]-789): 789

Command (m for help): t
Partition number (1-5): 1
Hex code (type L to list codes): 83

Command (m for help): t
Partition number (1-5): 5
Hex code (type L to list codes): 82
Changed system type of partition 5 to 82 (Linux swap)

Command (m for help): a
Partition number (1-5): 1

Command (m for help): p

Disk /dev/hda: 32 heads, 63 sectors, 789 cylinders
Units = cylinders of 2016 * 512 bytes

   Device Boot   Begin    Start      End   Blocks   Id  System
/dev/hda1   *        1        1      741   746896+  83  Linux native
/dev/hda2          742      742      789    48384    5  Extended
/dev/hda5          742      742      789    48352+  82  Linux swap

Command (m for help): w

[It wrote the information to the hard disk, then exited.]

When I installed LILO, I placed LILO on the boot sector of the first (bootable) partition (/dev/hda1) instead of the master boot record (/dev/hda).

Fourth Problem:

* After installing X, as per the XF86 configurations on the Linux ThinkPad survey, I was unable to start X. X would just cause the screen to become blank.

X has to be "Kicked in", so to speak, by hand. After X starts, hit Fn+F7 (the Fn and the F7 keys at te same time) to get the X display to function.

Fifth Problem:

* After starting X, one can not exit X and return to a normal text display.

One can not leave X after entering it on the ThinkPad. The best workaround this problem is to edit /etc/inittab to make the default runlevel 5. This enables a mode where you can log in and log out without leaving X, using a program known as xdm.

In order to make the default runlevel 5, look for a line like this in /etc/inittab:

id:3:initdefault:

Change the line to look like this:

id:5:initdefault:

Note the number 5 instead of 3.

You may also wish to disable most of the virtual terminals in runlevel 5, since you won't be using them [1]. There are a series of lines that look like this in /etc/inittab:

1:12345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

Change the lines to look like this:

1:12345:respawn:/sbin/mingetty tty1
2:234:respawn:/sbin/mingetty tty2
3:234:respawn:/sbin/mingetty tty3
4:234:respawn:/sbin/mingetty tty4
5:234:respawn:/sbin/mingetty tty5
6:234:respawn:/sbin/mingetty tty6

Note that most of the above lines no longer have a '5' in them. For various reasons, it's a good idea to have an emergency virtual terminal. Linux does (or, at least, used to do) funny things without at least one virtual terminal.

Sixth problem:

* I was unable to have the kernel see a parallel port zip drive

The I/O base of the parallel port is at 0x3bc instead of 0x378. To have Linux see a parallel zip drive on the ThinkPad 365xd:

insmod ppa.o ppa_base=0x3bc

instead of simply:

insmod ppa.o

Note that the I/O base of the parallel port was determined with the MSD program on a MS-DOS boot disk.

Seventh problem:

* After entering 'suspend mode' on the ThinkPad (Fn+F4), the system would crash when I tired to exit from suspend mode.

The kernel needs to be recompiled with APM support on the ThinkPad 365xd. To do this, make sure the kernel source is installed on your system.

You can install the kernel source from the RedHat CD, as in the following example Linux session:

[root@localhost /]# mount /mnt/cdrom
[root@localhost /]# cd /mnt/cdrom/RedHat/RPMS/
[root@localhost RPMS]# rpm --install kernel-source-2.0.30-2.i386.rpm 

If you do not have a RedHat CD, do the procedure most appropriate for your RedHat system to install the above RPM package.

I then went to the directory /usr/src/linux, ran 'make menuconfig' and went to 'Character Devices --->', then enabled 'Advanced Power Management BIOS support' without enabling any of the other features ('Ignore USER SUSPEND', etc.).

I then made a kernel image with 'make zImage' (and waited a while, hitting the space bar every 5-10 minutes so the machine would not crash), and copied the kernel image (located in the directory '/usr/src/linux-2.0.30/arch/i386/boot' as the file 'zImage') over to /boot.

I then edited my /etc/lilo.conf so that the boot line which looked like this: image=/boot/vmlinuz looked like this: image=/boot/zImage and re-ran Lilo thusly: /sbin/lilo

** Be very careful with changing Lilo. Doing things incrrectly can make it difficult to re-enter Linux**

Once I did all this, I had a functional Linux system on my ThinkPad 365xd, which I am currently using to type this in (on the streets of Santa Cruz, no less)

Speaking of being on the streets, I find the DTSN display almost unreadable in direct sunlight, and only somewhat readable in the shade on a sunny day (fortunatly, the Pacific coast fog is strong tonight). I hear that TFT displays are a lot better in this regard. [1] The virtual terminals is something you can use to multitask in text mode with Linux. To change virtual terminals, simply hit alt and a function key between F1 and F6.


Copyright © 1997, Sam Trenholme
Published in Issue 21 of the Linux Gazette, September 1997


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next