Mark Alford's Red Hat 7.3 GNU/Linux on an IBM Thinkpad T23

Last modified 22 Aug 2004

My experiences with other thinkpads and older versions of RedHat are available here.

I learned a lot from Chad Remesch's T23 page.

  1. Installation
  2. Power Management: suspension, hibernation
  3. Ethernet/modem network connection
  4. Getting the sound card working
  5. TeX/LaTeX tips and tricks: Japanese characters, laptop presentations, search paths

Notation: I use '----' to mark the beginning and end of bits of text that go in files.

  1. Installation
    Red Hat Linux CD-ROMs are available from many sources. I have used Cheapbytes in the USA, and Cheeplinux in the U.K.

    Preparation: Preserve important parts of previous installation:

    > cd /
    > tar zcf /storage/root/RH72_etc.tgz etc
    > tar zcf /storage/root/RH72_root.tgz \
      --exclude root/.mozilla --exclude root/.wastebasket    root
    
    I am keeping my separate /home and /usr/local and /storage partitions untouched by the reinstallation.

    No need to worry about cylinder 1024 limitations for linux, we will use GRUB which is above such things. So no separate /boot partition.

    Boot with RH7.3 CDROM in DVD drive
    English
    Generic 101 Key PC
    UK English
    Disable dead keys
    Generic 3 button mouse (PS/2)
    Install
    Custom
    Manual partition-Disk Druid, all ext3 except the swap. Note all linux
    partitions are logical, ie in the extended partition, leaving all
    primary partitions free for DOS, Windows etc.
      mount point       size     format
      /           hda5  4000 M   Y
      /storage    hda6  3780 M   N
      /home       hda7  2997 M   N
      /usr/local  hda8  1499 M   N
      swap        hda9   524 M   Y
    Format hda5 only  (leave /home,/storage,/usr/local alone)
    
    boot loader: GRUB, installed in /dev/hda MBR
    let it boot /dev/hda1 as Windows
    Network: DHCP, not activated on root
    Medium security, allow incoming ssh
    Time zone: Europe/London, sys clock on UTC
      UTC offset: leave it alone
    Add user accounts
    MD5 and shadow paswords, no NIS, LDAP, Kerberos
    X Config: S3 Savage4, 8MB
    Monitor: unprobed, 31.5-48 kHz, 50-70 Hz
      16 bit color, 1024x768
    Login: text
    select packages.
    
    On first boot, login as root and set hostname by editing /etc/sysconfig/network.

  2. Power management: hibernation
    No need to recompile the kernel, suspend (Fn+F4) works great. But hibernation does not work out of the box because my T23 came with Windows 2000 installed, so there was no FAT16 partition to hold a hibernation file.

    The radical solution is to wipe out the Windows 2000 partition and put a FAT16 partition of the right size at the beginning of the disk. I was then able to reinstall a generic Windows 2000 (not the one that came with the Thinkpad). [This was probably not necessary: you can put a hibernation file onto a FAT32 partition too, see the Fedora Core 2 notes.]

    A quick note on disaster scenarios. If you create the hibernation file and the computer hangs on reboot, and it won't even go to BIOS setup if you press F1, then all is not lost. Wait for a long time (> 5 mins). It will eventually give up its search for the hibernation file and allow you to continue. Use the hibernation utility diskette to delete the corrupt hibernation file. My procedure (see below) worked for me, but there are risks in this process, and it may be possible to render your machine really unbootable.

    Here is the procedure I followed. I needed a machine running Windows, and a DOS 6.2 boot disk with DOS FDISK on it. I also used DOS 6.2 installation disks, but they were probably not necessary. I strongly suggest making a boot disk for Linux and a copy of the hard disk's master boot record.

    1. Create the "IBM hibernation utility diskette II". To do this, download the self-unpacking file stndalhd.exe from this IBM website.
      [If you have trouble downloading it, here is the version I used, but it may not be the most recent version.] Run the executable under windows on any machine, and let it create the utility diskette.
    2. Boot off a DOS floppy and use DOS FDISK to delete the windows partition.
      I tried to avoid this, by shrinking the Windows partition and making a little FAT16 partition in the resultant space, but it didn't work. I think the hibernation file needs to be in the first partition, perhaps at a preordained place.
    3. Boot off DOS 6.2 install disk 1, and install DOS on the unused disk space. You need to create a partition bigger than your RAM. I let DOS take the full 2GB it can address (for now). For some reason DOS does not touch the master boot record, so GRUB still works, and can happily boot Linux or (if you suitably edit /boot/grub/grub.conf, see below) your new DOS.
      This installation may not have been necessary: perhaps it would have been good enough to boot off the DOS floppy and use FDISK to create a FAT16 bootable partition, and format it with FORMAT/S. Send me your experiences.
    4. Boot off the "IBM hibernation utility diskette II". Select option "2", "create hibernation file", and accept the default size. Reboot. Now it works! You can hibernate by Fn+F12 in both DOS and Linux!
    5. In linux, shrink the DOS partition to be just big enough to hold your newly created hibernation file. Eg,
      > umount /dos   (the new DOS partition, hda1)
      > parted
        resize 1 0.031 500
        [do do not convert to FAT32]
      
    Now there is a big hole in your disk where Windows 2000 used to be, between the new DOS FAT16 partition and the Linux extended partition. I created a Win95 FAT32 partition in that hole using GNU fdisk, and installed Windows 2000 in that (see below). For me, that partition is hda3, because all my linux partitions live in the extended partition hda4.

    Here is how I set up grub to boot DOS on hda1 or Windows (soon to be installed) on hda3. My /boot/grub/grub.conf looks like this

    ----
    #boot=/dev/hda
    default=0
    timeout=10
    splashimage=(hd0,4)/boot/grub/splash.xpm.gz
    title Red Hat Linux (2.4.18-3)
    	root (hd0,4)
    	kernel /boot/vmlinuz-2.4.18-3 ro root=/dev/hda5
    	initrd /boot/initrd-2.4.18-3.img
    # DOS/HIB is hda1 = (hd0,0)
    title DOS/HIB
    	unhide (hd0,0)
    	rootnoverify (hd0,0)
    	chainloader +1
    	makeactive
    # Windows will live on hda3 = (hd0,2).
    title Windows
    	hide (hd0,0)
    	unhide (hd0,2)
    	rootnoverify (hd0,2)
    	chainloader +1
    	makeactive
    ----
    

    Installing a fresh Win2k on /dev/hda3

    1. Make a GRUB floppy
      Configure grub as described above. Install grub on a floppy:
      > grub-install '(fd0)'
      
      Check that you can boot linux from this floppy: this will be crucial when Windows soils the master boot record.
    2. Hide the DOS/Hibernation partition from Win2k, and prepare the future Win2k partition
      We want Win2k to think that hda3 is "C", the only DOS-type partition. Do this by setting partition type of hda1 to 83, ie Linux, and partition type of hda3 to Win95-FAT32
      fdisk
        t   # set type
        1   # hda1
        83  # linux
      
        t   # set type
        3   # hda3
        b   # Win95-FAT32
      
        p   # check it all looks right
        w
      
      Reboot and use fdisk to check it all worked.
    3. Install Win2k
      Reboot with Win2k CD in the drive. It identifies hda3 as the only DOS/Win partition, as we hoped, and labels it "C", as we hoped. Go ahead and install Win2k there. Allow Win2k to format C as FAT32

      When system reboots, it goes straight to Win2k: Windows has obliterated GRUB from the hda master boot record. We will now fix that.

    4. Restore GRUB to the hda  master boot record
      Boot from the GRUB floppy. Check that you can boot Linux or Win2k. Once that works, restore GRUB to the hda master boot record by booting in Linux and typing
      > grub-install /dev/hda
      
      Finally, return the DOS/Hib partition to its former status:
      fdisk
       t
       1
       6
       w
      
      Hibernate should work via Fn-F12 as it did before.

  3. Networking: ethernet and modem
    Ethernet worked immediately.

    For the modem, get ltmodem-kv_2.4.18_3-8.22a3-1.i686.rpm from www.heby.de/ltmodem/ or this HTTP URL.

    > rpm -ivh ltmodem-kv_2.4.18_3-8.22a3-1.i686.rpm
    > chmod a+r /dev/ttyLT0
    > chmod a+w /dev/ttyLT0
    
    note that it makes /dev/modem a link to /dev/ttyLT0.
    To check ltmodem,
    > cd /usr/share/doc/ltmodem-kv_2.4.18_3-8.22a3/utils
    > ./checkout
    
    Make sure that minicom uses /dev/modem (minicom -s), and check modem works, by firing up minicom and typing "ATZ". It should echo "OK".

    Sometimes it complains that there is "no such device" as /dev/modem. In that case,

    > modprobe lt_modem
    > echo atz > /dev/modem
    
    and the driver will be reloaded.

  4. Sound
    > sndconfig
    
    it detects the card, plays a sample, which comes out rather quiet, and puts appropriate lines in /etc/modules.conf


Mark Alford's home page

alford(at)physics.wustl.edu

Valid HTML 4.0!

revalidate