Installing Ubuntu 5.04 on a ThinkPad T43 (1875)

From ThinkWiki
Jump to: navigation, search

I installed Ubuntu 5.04 "Hoary Hedgehog" on a IBM T43 1875-E5U.

Before starting the installation, make a copy of the IBM system restore CD's. You can do this in Windows by going to the Access IBM Start Menu option, and clicking on Create Rescue Cd's. This is extremely important!!! In case you erase your IBM system rescue partition, or remove the BootLoader, these CD's are the only way you can restore your machine to Factory settings. You'll need six blank CD's, or one blank CD and one blank DVD, if you have a DVD-Writer.

Once this is done, install as usual. The only gotcha is the installation of the Boot-loader. There is a method by which you can save your current MBR, so that you don't lose the Access IBM button's functionaltiy, but I don't know it. Please update this page if you know (Note: See section on Partitioning at the bottom of this page). (Additional note: As of Ubuntu 5.10, if one chooses to resize existing partitions during installation without making other changes, both the factory-installed Windows and IBM recovery partitions are preserved.)

I installed grub in the MBR of my hard disk. After rebooting, the Access IBM button was not working anymore. My rescue partition would not boot. After the text based installation ended, Ubuntu said that it starting X. Then I got a blank screen.

(See below for an alternative means of booting the rescue partition if this happens to you.)

My machine has the Intel Graphics Media Accelerator 900 installed. To get X working, I had to edit the file. I did this in the following manner:

  • Press CtrlAltF2 to get a Virtual Terminal
  • Login as the user you made while installing
  • $ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup (keep a backup)
  • $ sudo vi /etc/X11/xorg.conf
  • scroll down to this section
Section "Device"
       Identifier  "Intel Corporation Intel Default Card "
       Driver      "i810"
       BusID       "PCI:0:2:0"
  • Change Driver "i810" to Driver "vesa"
  • save and exit

After this, I used CtrlAltF7 to come back to the X terminal, then CtrlALtBackspace to restart it. X started successfully.

The next thing to do was use the excellent Unofficial Ubuntu Guide to set up various things.

After hunting around on the net, I came across two excellent guides. These are Edward Mendelson's guide to Ubuntu on a T42 and Ubuntu Guide

I have reproduced sections from these two guides. The authors have been notified of this.

Install a kernel for your Pentium 4 CPU

Use the Gnome menu System | Administration | Synaptic Package Manager, and search and install the two packages linux-686 and (while you are here) build-essential. The first of these installs the version of the kernel that specifically supports Pentium 4; the second provides essential files for “building” other programs if necessary. Reboot. The 686 kernel should be at the top of the list of boot options. Boot into it.

Enable sleep and hibernation

Open a terminal and enter these commands:

$ sudo cp /etc/default/acpi-support /etc/default/acpi-support-backup
$ sudo gedit /etc/default/acpi-support

Edit the file by removing the # character at the beginning of the line that will look like this when the character is removed:


Save the file. Next, in the terminal, enter:

$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst-backup2
$ sudo gedit /boot/grub/menu.lst

and go to the line starting with #kopt. Add the following at the end of the existing line (replace /dev/hda5 with your swap partition, which you can identify by entering the command # fdisk -l in the terminal

resume=/dev/hda5 vga=0x318

The vga=0x318 string forces the text-mode display during boot-up and shutdown to display in 50-line mode instead of the ugly 25-line mode. This string is perfect for a 1024x768 screen, but you might want something different. You might want to consult this full list of VGA modes for Linux. The #kopt line should look something like this (if you do not find the strings pci=noacpi and acpi_sleep=s3_bios then add them also)

# kopt=root=/dev/hda1 ro pci=noacpi acpi_sleep=s3_bios resume=/dev/hda5 vga=0x318

If you intend to run the command $ sudo update-grub after you save the file, then save the file now. If you do not intend to run that command, then add these strings by hand to the kernel line that launches Ubuntu and reboot.

To suspend to RAM (sleep), press the ThinkPad’s sleep button (FnF4); to wake up the system, press the Fn key, wait a few seconds, and press CtrlAltBackspace to restart the Xwindow graphic system.

To suspend to disk (hibernate), press the ThinkPad's hibernate button (FnF12), or use the option to hibernate the computer on the logout menu. Press the power button to wake the system; the desktop should reappear automatically.

kubuntu 6.10: Suspend and hibernate functioned out of the box, maybe I had to set resume=... though

Install on-screen confirmation of the ThinkPad buttons

The program tpb (ThinkPad Buttons) makes all the ThinkPad-specific buttons and Fn-key combinations work as expected (some buttons, such as the ones that control screen brightness, are hardware-controlled and work under any operating system). As explained by Michael R Head in his post in this thread , the Ubuntu Hoary version of tpb does not support on-screen display (OSD) of the results of your actions. To correct this, download the latest Debian version of the program from the site (scroll down to the box under the heading "Download tpb").

Open a terminal, use the cd command to navigate to the directory in which you downloaded the package and enter:

sudo dpkg -i tpb*

On the Gnome menu, use System | Preferences | Sessions | Startup Programs and use the Add button to add the following command:

tpb -d

If you want the Access IBM button to start your screensaver, open a terminal and enter these commands:

sudo cp /etc/tpbrc /etc/tpbrc-backup
sudo gedit /etc/tpbrc

Edit the file by adding this line below the line that begins #THINKPAD /usr/bin, etc.:

THINKPAD /usr/bin/xscreensaver-command -activate

For KDE, start screensaver and lock so you have to log in again to unlock:

THINKPAD /usr/bin/dcop kdesktop KScreensaverIface lock

Save the file. In the terminal, run man tpb to learn about other ways to use the Access IBM button.

I believe some of the following steps may have performed automagically during installation (I simply don't remember whether they were or not), but you should perform all the steps anyway to make certain that everything is set up correctly.

First, in a terminal, enter the commands (replacing [username] with your username):

echo nvram | sudo tee -a /etc/modules
sudo addgroup nvram
sudo adduser [username] nvram

I don't pretend to understand exactly what this does, but the first line adds the string "nvram" at the end of the file /etc/modules; the next two lines create a group called nvram and add yourself to the group. Next, enter these commands in the terminal:

cd /etc/udev/permissions.d
sudo cp udev.permissions udev.permissions-backup
sudo gedit udev.permissions

Edit the file to make sure these lines are present (add them if necessary, perhaps to the top of the second set of lines under the heading # character devices:


Save the file and reboot.

Note: the tpb program does not provide visual confirmation for the Fn+F5 button that toggles the wireless radio, but the button does toggle the radio on and off, exactly as it does in Windows. The indicator light works as well.

Enable TrackPoint middle-button scrolling

Since the T43 has no scroll wheel, you can use the blue middle TrackPoint button to simulate one. To scroll, just hold it down and push the TrackPoint stick in the direction you wish to scroll. Note that you can still middle-click by tapping the middle button, or by pressing the left and right buttons simultaneously. To set it up, do the following. In a terminal, enter these commands:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf-backup
sudo gedit /etc/X11/xorg.conf

In the editor, find the section headed Section “InputDevice” / Identifier “Configured Mouse” and the following lines above the “EndSection” line:

Option    "EmulateWheel"        "true"
Option    "EmulateWheelButton"  "2"

You may also need to add the following to enable horizontal scrolling:

       Option          "XAxisMapping"  "6 7"
       Option          "YAxisMapping"  "4 5"

Save the file. Logout, restart X with Ctrl-Alt-Backspace, and log in again.

Note: In Mozilla-based browsers (like Firefox), the Mouse-6 and Mouse-7 events are overridden, interfering with horizontal scrolling. To override this, do the following:

   * Type "about:config" in the URL-bar.
   * Type "mousewheel.horizscroll.withnokey.action" in the filter and change the value from 2 to 0 via double-click.
   * Type "mousewheel.horizscroll.withnokey.numlines" in the filter and change the value from -1 to 1 via double-click.

Don't slow down boot-up by synchronizing with network time

Ubuntu pauses during boot-up while attempting to synchronize the system clock with a remote time server, but you probably aren't connected to the internet when you boot with a ThinkPad, so this attempt accomplishes nothing. Eliminate this delay by opening a terminal and entering:

sudo gedit /etc/init.d/ntpdate

Change the line 20 from

/usr/sbin/ntpdate -b -s $NTPOPTIONS $NTPSERVERS


/usr/sbin/ntpdate -b -s $NTPOPTIONS $NTPSERVERS &

Now the ntp process is detached and boot-up can continue while the clock is been synchronized.

Don't slow down boot-up when no Ethernet cable is attached

In Synaptic find and install the ifplugd package. After installing it, open a terminal and run this command

sudo gedit /etc/default/ifplugd

Edit the file by modify the lines INTERFACES="" and HOTPLUG_INTERFACES="" if no interfaces are listed or if the wrong interfaces are listed. You probably only want to test the hotplug status of the wired Ethernet connection, so the lines should read:


I don't pretend to understand these options fully, so please post corrections if I'm wrong. I've also modified the ARGS= line to add the string -b which silences the otherwise excessive beeping when you plug or unplug the cable. Save the file and reboot.

Getting Access IBM to Work 1


This is for readers with T40 or T41 notebooks, which try to have all: Windows, working Access IBM and linux.

What is described below this note will work only in case that your IBM PreDesktop Area is in a system partition. (Visible "ordinary" partition of usually 3 - 5GB size, with type ID 0x12.)

Older Thinkpads like T40(p) or T41(p) use a HPA (Hidden Protected Area) instead of this system partition for this PreDesktop Area. Unfortunately the linux kernel disables this area (every time non preventable?) at boot time and if you later choose "Use largest unpartitioned space" during ubuntu installation, you will destroy the HPA. Additionally GRUB will write this "altered" geometry (with disabled HPA) into the MBR. This leads to a totally broken system. After reboot windows will boot to bluescreen (Unmountable Volume) and Access IBM will not work as well. It seems that the special IBM MBR has to be there for accessing the hidden partitions in the HPA. So far, I could not yet install ubuntu (preserving winxp (with security chip on) and preserving IBM PreDesktop Area, with success. Any ideas very welcome. (I will try to partition manually and install GRUB or LILO NOT to MBR and report the results.)


The great thing about the Ubuntu installer is that it is able to resize NTFS partitions. Just choose the manual partitioning option, select the XP partition and change it's size. The partition should not be fragmented as this may cause problems during resizing. Doesn't hurt to run the XP drive defragmentation tool before shrinking the partition this way.

The 80GB disk of my T42 had two partitions on it: -Windows XP taking up around 75 GB -5GB IBM Rescue system you can boot into by pressing the blue Access IBM key during startup. Interesting thing, seems to contain a complete OS including Opera browser, somehow looks like Win 3.11 or 95.

As the disk is large enough, I decided to keep both systems. I changed the size of the windows partition to around 20 GB and created my new partitions in the now free space between xp and ibm rescue partition:

 Disk /dev/hda: 80.0 GB, 80026361856 bytes
 16 heads, 63 sectors/track, 155061 cylinders
 Units = cylinders of 1008 * 512 = 516096 bytes
    Device Boot      Start         End      Blocks   Id  System
 /dev/hda1   *           1       38760    19535008+   7  HPFS/NTFS
 /dev/hda2          145411      155055     4861080   12  Compaq diagnostics
 /dev/hda3           38761       43127     2200905   82  Linux swap / Solaris
 /dev/hda4           43127      145398    51544552+   5  Extended
 /dev/hda5           43127       81887    19535008+  83  Linux
 /dev/hda6           81887      145398    32009481   83  Linux

hda5 will become the root fs, hda6 my /home partition.

Grub installation

I told the Ubuntu installer to install Grub into the MBR. The following entries in /boot/grub/menu.lst allow to boot Windows and the IBM rescue system:

 # IBM rescue partition on /dev/hda2
 title           IBM Rescue
 root            (hd0,1)
 # savedefault
 chainloader     +1

 # Win XP on /dev/hda1   
 title           Microsoft Windows XP Professional
 root            (hd0,0)
 chainloader     +1

I don't remember if the installer added those automatically, or if I did so, anymore. Just make sure they are there. Check if everything works

You should now be able to boot into all three systems without problems.

  1. The above excerpt has been taken from which describes installing Ubuntu on an IBM T42. The same steps should be applicable to the T43 as well. If you encounter problems getting Access IBM working please describe them here.
  2. The following link describes how to set-up dual boot while still being able to use the access key [1]

An Additional Note about Booting to the IBM Recovery Partition

During installation I also installed GRUB to the MBR, thus wiping out the original one from IBM (which their tech support people then confirmed could not be recovered except by completely restoring to factory-shipped state). The installation program did successfully auto-detect the IBM Recovery partition, and added it to the GRUB menu. However, when I tried booting into it, the sequence only just began, then went to a blue error screen unable to complete the process. I later discovered that this partition was set to type 0x12 ("Compaq Diagnostics"), when in fact it should be 0x0b ("W95 FAT32"). I ran fdisk -l to find which partition was the IBM Recovery one. Then, fdisk /dev/sda (or hda, etc., depending on your system), command t (type), partition number 2 (whichever one you determine to be the recovery), changed to type 0b. Relist to double-check; it should now read W95 FAT32 for the partition in the partition table. Then, remember to use the command w to write the changes to the disk (without this it does nothing of course). I rebooted the system, choose the IBM Recovery partition from the GRUB menu, and now it worked just fine.

One Extra Additional Note

XP-install sets the recovery partition to a hidden Compaq Diagnostic type. The reason is that XP-users shall not have access to this partition. However, Grub will not boot a hidden partition correctly, so we have to unhide it by setting the partition type to 0b. The problem now is that the rescue partition will be accessible for XP-users.

But we can configure Grub to hide the rescue partition when booting XP. Edit the Windows part of the grub configuration file /boot/grub/menu.lst like so (this is taken from Bill Cattey's page ):

title           Microsoft Windows XP Professional (/dev/hda1)
hide (hd0,1)
rootnoverify            (hd0,0)
chainloader     +1

title           Windows Rescue/Service (dev/hda2)
unhide (hd0,1)
rootnoverify            (hd0,1)
chainloader     +1


In the end, Ubuntu turned out to be a beautiful distro to install. Most of it "just worked", and with a little tweaking, I have reached a level of functionality that eluded me with Suse.

Here's a quick summary.

Worked out of the Box: Sound, Networking (wired and wireless), Power Management, Hibernate, ThinkPad Buttons (without OSD)

Worked after little tweaking: Sleep, Middle button scrolling, ThinkPad Buttons OSD.

Did not Work:

IBM Rescue and Recovery Partition. Don't forget to make the Rescue CD's