Mark Alford's Red Hat 7.1 GNU/Linux on an IBM Thinkpad 600E (2645-5AU)

Last modified 28 Dec 2001

Earlier version for Red Hat 6.2 is available. This includes some extra info, eg how to install Thomas Hood's TPCTL package, and how to make a serial PPP connection between two computers using a null model cable.

I am not very happy with RH7.1. The main change from RH6.2 is that the X server hangs regularly, and I am forced to reboot because CTRL+Backspace has no effect. And RedHat has decided to stick to old versions of important components like Python, so there is no real advantage to upgrading.
I have found that filesystem problems are minimized if I hit Fn+F4 (hibernate) after it hangs, as this seems to flush some buffers. Then I reboot.

  1. Installation
  2. Power Management: suspension and hibernation
  3. PCMCIA Ethernet/modem card (Linksys)
  4. Getting the sound card working
  5. Streaming web audio
  6. TeX/LaTeX: Japanese characters, laptop presentations, search paths
  7. Miscellany: system logs, HOWTO docs, proper job scheduling, proper TeX search paths.

I found much of what I needed to know on the Linux on laptops page, especially the amazing Thomas Hood's Thinkpad page

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.

    It will make future reinstallations much easier if you create /home and /usr/local partitions, separate from the root partition / and/or /usr. That way you can reinstall the operating system, while leaving users unmolested and keeping most the special customizations you have introduced.

    I had previously done this when I installed Red Hat 6.2, so installation of Red Hat 7.1 on top of it was straightforward.

    Boot with RH7.1 CDROM in DVD drive
    English
    Generic 101 Key PC
    US English
    Disable dead keys
    Generic 2-button mouse
    Install
    Custom
    Manual partition-Disk Druid
      /           hda2  2000 M    
      /dos        hda1  2000 M
      /import     hda5  980 M
      /home       hda6  500 M
      /usr/local  hda7  500 M
    Format /dev/hda2 only
      (leave /home,/import,/usr/local alone, they contain the stuff we want
       to keep from Red Hat 6.2)
    LILO: on /dev/hda MBR, not linear
    Medium security, default rules
    English, USA
    Europe/London, sys clock on UTC
    Add user accounts corresponding to previous users.
      (maybe good to add a fresh acct too, in case of problems caused
       by old crap in existing account's .cshrc, .xinitrc etc.)
    MD5 and shadow passwords, no NIS, LDAP, Kerberos
    X Config: Neomagic 256, 2MB
    Monitor: unprobed, 31.5-48 kHz, 50-70 Hz
      16 bit color, 1024x768
    Login: text
    select packages:
      exclude lm-sensors, since it can damage thinkpad 600
    
    I got Some funny error messages from X about the "dead keys". I regenerated XF86Config-4 using Xconfigurator, and all was well. Since I switched from using KDE to Gnome, I also had to remove some old KDE-related stuff from the .Xclients files of the users.

  2. Power management
    Recompile the kernel:
    > cd /usr/src/linux
    > make mrproper
    > make xconfig
    
    xconfig lets you change kernel parameters. First, get the options that (presumably) were used for the current RedHat default kernel:
    load -> configs/kernel-2.4.2-i686.config
    
    Alter the following settings in General Setup:
    Parameter Setting
    Advanced power management y
    Ignore user suspend? n
    Enable PM at boot? y
    Make CPU calls when idle? y
    Enable console blanking by APM? y
    RTC time in GMT? y
    Allow interrupts during APM BIOS calls? y
    Save the config as as apm_kernel_config, just in case.
    > make dep
    > make clean  
    > make bzImage |& tee /root/make_bzImage_output
    > cp /usr/src/linux-2.4.2/arch/i386/boot/bzImage /boot/vmlinuz_fresh
    
    
    Since I am using the kernel that came with RedHat 7.1, I don't need to make the modules. Edit lilo.conf to add the new kernel, calling it 'fresh':
    ----
    image=/boot/vmlinuz_fresh
    	label=fresh
    	read-only
    	root=/dev/hda2
    ----
    > lilo
    
    reboot and type 'fresh' at the lilo prompt. If it works, make the new kernel the default:
    > cp /boot/vmlinuz_fresh /boot/vmlinuz_thinkpad
    
    include it in lilo.conf:
    ----
    boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    prompt
    timeout=50
    message=/boot/message
    default=linux_thinkpad
    
    image=/boot/vmlinuz_thinkpad
    	label=linux_thinkpad
    	read-only
    	root=/dev/hda2
    
    other=/dev/hda1
    	optional
    	label=dos
    
    image=/boot/vmlinuz-2.4.2-2
    	label=linux_original
    	read-only
    	root=/dev/hda2
    ----
    > lilo
    
    Now the ability to suspend and hibernate is in the kernel. Use Fn+F4 to suspend and Fn+F12 to hibernate, just like in Microsoft Windows. Hold down blue Fn key to unsuspend. Use on/off switch to unhibernate. Note that hibernate will fail reporting a BIOS error if the AC power cord is plugged in and there is a PCMCIA card in.

    To make PCMCIA card come back to life after hibernation, edit /etc/sysconfig/apmd, and set

    ----
    PCMCIARESTART="yes" 
    PCMCIABIOSBUG="yes"
    
    RESTORESOUND="yes"
    RESTORESOUNDPROGS="no"
    SOUNDMODULES="cs4232"
    
    ANACRON_ON_BATTERY="yes"
    ----
    

  3. Linksys PCMCIA ethernet/modem card
    I have a PCMLM56. This works straightforwardly under Red Hat 7.1. Since the ethernet and modem are on the same card, ethernet (eth0) is automatically brought up when you plug in the card. If you then use it as a modem and make a PPP connection, the presence of the active ethernet interface can cause "access denied" problems.

    The solution is to create /etc/ppp/ip-up.local, containing

    ----
    /sbin/ifconfig eth0 down
    ----
    
    And make it executable. This kills eth0 when PPP starts. You could create a similar /etc/ppp/ip-down.local to bring eth0 back up again when PPP disconnects.

  4. Sound
    No need to download anything. The kernel can do it.
    In DOS,
    > ps2 audio enable
    
    To /etc/modules.conf, add:
    ----
    alias sound-slot-0 cs4232
    options sound dmabuf=1
    alias midi opl3
    options opl3 io=0x388
    options cs4232 io=0x530 irq=5 dma=1 dma2=0 mpuio=0x330 mpuirq=9
    ----
    
    Create /etc/isapnp.gone:
    ----
    # COM1
    # MGA: you can comment out COM1, not much diff
    IO 0x3f8,8
    IRQ 4
    #
    # COM2
    IO 0x2f8,8
    IRQ 3
    #
    # Parallel
    IO 0x378,2
    IRQ 7
    #
    # PS2 mouse
    IRQ 12
    #
    # Sound
    ##IO 0x220,16
    IO 0x530,4
    IO 0x538,4
    IO 0x388,4
    IO 0x220,4
    IRQ 5
    IRQ 9
    DMA 1
    DMA 0
    ----
    
    Create the following file, as /etc/rc.d/init.d/cs4232
    ----
    #!/bin/bash 
    # chkconfig: 345 84 16 
    # description: Starts/stops the CS4232 driver at boot time and shutdown 
    HOME=/etc 
    case "$1" in 
    start) 
    echo "Starting CS4232 driver" 
    rmmod cs4232 
    modprobe cs4232 
    ;; 
    stop) 
    echo "Stopping CS4232 driver" 
    rmmod cs4232 
    ;; 
    restart) 
    $0 stop 
    $0 start 
    ;; 
    status) 
    echo "Status (NO-OP)" 
    ;; 
    *) 
    echo "Usage: cs4232 {start|stop|status|restart}"
    exit 1 
    esac 
     
    exit 0 
    ----
    
    Create some links to this file, to run it when runlevel changes:
    > cd /etc/rc.d/rc3.d/ 
    > ln -s /etc/rc.d/init.d/cs4232 S83cs4232
    > cd /etc/rc.d/rc5.d/ 
    > ln -s /etc/rc.d/init.d/cs4232 S83cs4232
    
    Now do a reboot, and test:
    > play /usr/share/sounds/info.wav
    > play /usr/share/sounds/startup3.wav
    
    I still see error messages in /var/log/messages:
      kernel: ad1848: Interrupt test failed (IRQ5)  
    
    but everything seems to be working. Now you can listen to streaming audio on the web, via Real Player.

    If sound stops working, reload the module:

    > /sbin/rmmod cs4232; /sbin/modprobe cs4232
    

  5. Real Player (streaming audio from the web)
    There is an RPM file made available by the generosity of Real Networks. If you have KDE you may find it conflicts with /usr/share/mimelnk/audio/x-wav.kdelnk from kdebase-1.1.2-33. If so, move that file out of the way, and force the install
    > mv /usr/share/mimelnk/audio/x-wav.kdelnk /usr/share/mimelnk/audio/x-wav.kdelnk.orig 
    > rpm -ivh --force rp7_linux20_libc6_i386_cs1.rpm
    
    I told the dialog box that I have a 28.8k modem.

    Now listen to something worthwhile. Try The Connection.

    If the sound skips, you need to reactivate the sound module,

    > /sbin/rmmod cs4232; /sbin/modprobe cs4232
    

    TeX tips and tricks

    Using TeX/LaTeX you can create LaTeX documents that include Japanese characters, and use LaTeX to make laptop presentations. It is helpful to set up the TeX search paths in a sensible way.

  6. Miscellany

    Proper job scheduling with anacron

    Since a laptop is typically switched off overnight, you want to have anacron controlling your job scheduling. Just follow the instructions in /usr/doc/anacron:
    comment out daily, weekly, and monthly entries in /etc/crontab
    in /etc/cron.daily create an executable file called anacron, containing
    ----
    anacron -s
    ----
    
    add this line to /etc/rd.d/rc.local:
    ----
    anacron -s
    ----
    

    HOWTO documentation

    Download it from Linux Documentation project:
    find the link for multiple pages, all howtos
    download and untar in /usr/local/doc/HOWTO/.

    Make system logs readable

    > cd /var/log; chmod +r messages
    
    On my desktop I keep a window running tail -f /var/log/messages. It is very useful, but needs to be restarted after logrotate runs.


Mark Alford's home page

alford(at)physics.wustl.edu

Valid HTML 4.0!

revalidate