Last modified 6 May 2001
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.
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.
Boot with RH6.2 CDROM in DVD drive English US Local CDROM Custom Disk Druid delete hda5, the 4G windows partition, leaving a 2G partition (hda1) for Windows 98. mount hda1 on /dos Add / (2000M) Linux native hda2 Add /home (500M) Linux native hda6 Add /usr/local (500M) Linux native hda7 Add /storage (970M) Linux native hda5 Add Linux swap, grow to fill (about 125M) Format: all of them Bootloader: /dev/hda let it boot Win98 Lilo: all defaults OK Hostname: whatever Mouse: Generic PS/2 Hardware clock: GMT US/Eastern Root password: whatever Accounts: add yourself Use shadow passwords and MD5 Packages: a long job Make bootdisk Monitor: LCP Panel 1024x768 probe fails do not specify clockchip 2M video RAM 1024x768, 16 bit color X -probeonly works OK Start X at boot? No
image=/boot/vmlinuz-2.2.14-5.0 label=linux read-only root=/dev/hda2 append="mem=130496k"Then run lilo
> liloAnd reboot. Now you should have all the memory you paid for. To find out how much Linux is seeing, run "top", or
> more /proc/meminfo
> cd /usr/src/linux > make mrproper > make xconfigxconfig lets you change kernel parameters. Alter the following settings in General Setup:
Parameter | Setting | |
---|---|---|
APM BIOS? | y | |
Ignore user suspend? | n | |
Enable PM at boot? | y | |
Make CPU calls when idle? | y | |
Enable console blanking by APM? | y | |
Power off on shutdown? | y | |
Ignore multiple suspend? | y | |
Ignore multiple suspend/resume cycles? | y | |
RTC time in GMT? | y | |
Allow interrupts during APM BIOS calls? | y |
> make dep > make clean # not usually necessary > make bzImage > make modules |& tee /root/make_modules_output # just to have a record > make modules_installedit lilo.conf to add the new kernel, calling it 'fresh':
---- image=/usr/src/linux/arch/i386/boot/bzImage label=fresh read-only root=/dev/hda2 append="mem=130496k" ---- > liloreboot and type 'fresh' at the lilo prompt. If it works, make the new kernel the default:
> cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.14-5.0_thinkpad include it in lilo.conf: ---- image=/boot/vmlinuz-2.2.14-5.0_thinkpad label=linux read-only root=/dev/hda2 append="mem=130496k" ---- rerun lilo > liloNow the ability to suspend and hibernate is in the kernel. We need to be able to do it on demand. For this you need TPCTL, which requires ncurses-devel. ncurses-devel-5.0-11.i386.rpm is on the RedHat CDROM.
> make all > make install > make clean > ldconfig ( Somehow tpctl fails to run ldconfig after it modifies /etc/ld.so.conf) > tpctl --help | more Now, you have commands to standby: tpctl --standby suspend: tpctl --suspend or apm --suspend hibernate: tpctl --hibernateTo allow users to suspend or hibernate the machine, all you have to do is give them write permission on /dev/thinkpad. Now you can suspend/hibernate just like in Windows by the Fn+F4 and Fn+F12 key combinations, or
> apm --suspend # hold down blue "Fn" key to un-suspend and > tpctl --hibernate # turn on power switch to un-hibernateNote 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". If your display tends to come back with lots of horizontal black and white lines, edit /etc/sysconfig/apmd and uncomment the line that says CHANGEVT="7"
/etc/isapnp.gone /etc/sysconfig/pcmcia /etc/pcmcia/ide.opts /etc/pcmcia/config.optsSince the ethernet and modem are on the same card, ethernet (eth0) is automatically brought up when you plug in the card. This can sometimes interfere with modem connections that use PPP. I found that if I connected from home via modem & PPP to places on the network that I usually connect to from the office via ethernet, I was denied access. Running /sbin/route told me that eth0 was active even when I was doing PPP via the modem. 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.
To enable Thinkpad serial port:
In windows, under thinkpad config, disable the internal modem first,
to let the serial port get COM1
Reboot in DOS mode and type
> ps2 ser on > ps2 sera enableto switch on the serial port. In linux, check that it is detected:
> setserial -g /dev/ttyS* /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 /dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3 /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4 /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3 > tpctl -rsx resource state: current serial port 1: enable 0x3f8 IRQ4 serial port 2: disable 0x0 IRQ0If you get messages like these, all is well. Connect the two serial ports with the null modem cable.
To make a ppp connection over the link:
Local machine:
> stty -F /dev/ttyS0 115200 > /usr/sbin/pppd local noauth xonxoff 10.1.1.1: /dev/ttyS0 115200 & > ifconfig ppp0 10.1.1.1 netmask 255.0.0.0Remote machine:
> stty -F /dev/ttyS0 115200 > /usr/sbin/pppd local noauth nodetach xonxoff 10.2.2.2: /dev/ttyS0 115200 & > ifconfig ppp0 10.2.2.2 netmask 255.0.0.0To ssh back and forth, you will need to have installed the ssh rpm on both machines (see Miscellaneous below).
> ps2 audio enableAnd note down the settings that it tells you. Now follow the advice given on IBM's web page "TP 600E Guide to installing Red Hat Linux". In Linux, as root,
> /usr/sbin/sndconfig --noprobe crystal 4332 Port:530, IRQ: 5, DMA1: 1, DMA2: 0, MPU IO: 330, MPU IRQ: 9(those were the settings you noted down). You should hear the test sounds OK, as long as the volume is turned up [Fn+PgUp]. 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 S83cs4232Now do a reboot, and test:
> play /usr/share/sounds/info.wav > play /usr/share/sounds/startup3.wavNow you can listen to streaming audio on the web, via Real Player.
I still see error messages in /var/log/messages:
kernel: ad1848: Interrupt test failed (IRQ5)but everything seems to be working. If sound stops working, reload the module:
> rmmod cs4232; modprobe cs4232To make this happen automatically after hibernation, which always seems to screw up the sound, edit /etc/sysconfig/apmd, and set RESTORESOUND="yes", RESTORESOUNDPROGS="no", SOUNDMODULES="cs4232" .
> mv /usr/share/mimelnk/audio/x-wav.kdelnk /usr/share/mimelnk/audio/x-wav.kdelnk.orig > rpm -ivh --force rp7_linux20_libc6_i386_cs1.rpmNow listen to something worthwhile. Try The Connection.
---- ! This file is gv_full.txt ! For filling the screen: ! gv -spartan -ad ~/gv_full.txt GV.scale: 2 GV.minimumWidth: 1090 GV.minimumHeight: 850 GV.swapLandscape: 1 ! right mouse button to move image ! CTRL downarrow to move forward ----You need to vary the slidewidth and slideheight lengths in Latex to get the slides to fill the screen exactly.
I had trouble getting the X-window system to produce output to the "external monitor" socket. The solution was to edit /etc/X11XF86Config and modify the device section to allow external displays:
---- # Device configured by Xconfigurator: Section "Device" Identifier "My Video Card" VendorName "Unknown" BoardName "Unknown" # add this: Option "extern_disp" Option "intern_disp" # end addition #VideoRam 2048 # Insert Clocks lines here if appropriate EndSection ----
---- anacron -s ----add this line to /etc/rd.d/rc.local:
---- anacron -s ----
ssh-extras-1.2.26-4TL.i386.rpm ssh-server-1.2.26-4TL.i386.rpm ssh-1.2.26-4TL.i386.rpm ssh-clients-1.2.26-4TL.i386.rpmKDE battery monitor is on Cheapbytes "packages galore" CDROM,
kcmlaptop-0.82-3.i386.rpmUpdates
gnuplot-3.7.1-5.i386.rpm transfig-3.2.3-2.i386.rpm
mkdir /usr/local/doc/tarfiles foreach file (`ls --color=never *.tar.gz`) tar zxf ${file} mv ${file} /usr/local/doc/tarfiles end foreach file (`ls --color=never *.html.gz`) gunzip ${file} mv ${file} /usr/local/doc/tarfiles end
> diff localtime /usr/share/zoneinfo/US/EasternTo change it:
> cp -f /usr/share/zoneinfo/Europe/London localtimeYou do not want a link if /usr and / are different partitions, since localtime should work even if /usr is not mounted. You can try running tzselect to get the right zone.
> cd /var/log; chmod +r messagesOn my desktop I keep a window running tail -f /var/log/messages.