Difference between revisions of "Installing Fedora Core 4 on a ThinkPad T42p (2373-HBU)"

From ThinkWiki
Jump to: navigation, search
m (wpa_supplicant)
Line 364: Line 364:
Now to get the system to work I setup in /etc/rc.d/rc.local
Now to get the system to work I setup in /etc/rc.d/rc.local
  /usr/local/sbin/wpa_supplicant -B -w -ieth0 -c/etc/wpa_supplicant.conf -Dwext
  /usr/local/sbin/wpa_supplicant -B -w -ieth0 -c/etc/wpa_supplicant.conf -Dwext
  #It takes a moment for wpa_supplicant to come up.
  #It takes a moment for wpa_supplicant to come up.
Line 377: Line 378:
  # chkconfig: 35 98 10
  # chkconfig: 35 98 10
  . /etc/rc.d/init.d/functions
  . /etc/rc.d/init.d/functions
  start() {
  start() {
         echo $"Starting wpa_supplicant"
         echo $"Starting wpa_supplicant"
Line 392: Line 393:
         return $ret
         return $ret

Revision as of 19:01, 16 December 2005

Success Chart

Item Working Notes
Installation DVD Installation Yes
Network Installation Not Tested
USB Installation Not Tested
Display Laptop Screen Yes fglrx and raedon
CRT / Projector Not Tested
TV Out Not Tested
3D Yes fglrx
Power Management Software Suspend (hibernate) Yes Software Suspend 2 (using custom kernel for modem AND suspend2)
Suspend to Memory (ACPI sleep) Yes Software Suspend 2 and plain ACPI Tested on 2.6.13
Audio Yes ALSA intel8x0 driver
Wireless 802.11b/g Yes ipw2200 driver
Bluetooth (BMDC-2) Not tested
Wired 1000 Ethernet Yes e1000 driver
Modem (BMDC-2) Yes Linuxant HSF (using custom kernel for modem AND suspend2)
Extra Buttons Keyboard Section Yes ibm-acpi (in kernel 2.6.14)
Fingerprint Scanner Yes with PAM See Integrated Fingerprint Reader.
Harddisk Active Protection Not Tested in kernel 2.6.14 .
Battery Yes can be done with ultra slim battery and having the DVD out at boot

Basic Install

After loading the Fedora Core 4 i686 CD here is the basic lay of the land.

  • Video (FireGL) - Unaccelered default setup, but it worked
  • Ethernet (10/1000) - Working
  • Sound (AD1981B) - Working
  • Basic Function Keys - Brightness,Keyboard light,Bluetooth on/off
  • Bluetooh (BMDC-2) - Untested (I do see the drivers loaded)
  • Modem (BMDC-2) - Untested (I do not see drivers loaded)
  • Wireless (ipw2200) - Not Working
  • DVD-RW - Working
  • Fingerprint reader - Not Working
  • Suspend Memory - Not Working
  • Suspend Disk - Not Working
  • IBM Active Protection System (HDAPS) - Not working

Basic Hardware


I really needed this first so I could have the easy freedom to work on the machine throughout my house. All you really need here is the firmware loaded in to the right spot. This is an old version of the driver and firmware and it will not run Kismet. Later, I will show how to get this working.

Goto http://ipw2200.sourceforge.net/firmware.php. Download and install the version 2.2 in /lib/firmware. Reboot and your wireless should work. Go here for some more tips: ipw2200


At this point I setup my system to get all of the current updates for Fedora Core 4. I just ran the up2date program and let it do it's thing.


I am currently using the default raedon driver. I am looking a later loading the fglrx driver.

xorg driver

I read Additional options for the radeon driver page to come up with what I have. Here is the radeon device section from my xorg.conf

Section "Device"
        Identifier  "Videocard0"
        Driver      "radeon"
        VendorName  "Videocard vendor"
        BoardName   "ATI FireGL Mobility T2"
# accelration
        Option          "backingstore" "on"
        Option          "AGPFastWrite" "on"
        #may need to turn of enablepageflip
        Option          "EnablePageFlip" "on"
        Option          "AGPMode" "4"
        Option          "EnablePageFlip" "on"
        Option          "RenderAccel" "on"
        # enable PowerPlay features
        Option          "DynamicClocks" "on"
        # use bios hot keys on thinkpad (aka fn+f7)
        Option          "BIOSHotkeys" "on"
        Option          "XvMCSurfaces" "7"

ATI driver

I just downloaded the driver from ATI (https://support.ati.com/ics/support/default.asp?deptID=894&task=knowledge&folderID=356) I downloaded the big 60MB installer and let it do a general install.

Do not setup the second monitor unless you use it. Programs that use the xv overlay will reboot X when the second screen is not available. (This means xine and mplayer will crash your machine.

I have not gotten fireglcontrolpanel to work yet. It needs libstdc++.so.5.

To fix this I had to do: yum install compat-libstdc++-33

This driver does seem really fast. I have not really tested the opengl parts, though using the opengl drivers for xine and mplayer where very slow.

Fingerprint Reader

I followed for the most part the instructions given at according HOWTO. the only thing that I changed was the /etc/pam.d/system-auth. Mine looks like:

# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required      /lib/security/$ISA/pam_env.so
auth        sufficient    /lib/security/pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi1.10/pam/
auth        sufficient    /lib/security/$ISA/pam_unix.so likeauth nullok
auth        required      /lib/security/$ISA/pam_deny.so
account     required      /lib/security/$ISA/pam_unix.so
account     sufficient    /lib/security/$ISA/pam_succeed_if.so uid < 100 quiet
account     required      /lib/security/$ISA/pam_permit.so
password    requisite     /lib/security/$ISA/pam_cracklib.so retry=3
password    sufficient    /lib/security/pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi1.10/pam/
password    sufficient    /lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow
password    required      /lib/security/$ISA/pam_deny.so
session     required      /lib/security/$ISA/pam_limits.so
session     required      /lib/security/$ISA/pam_unix.so

I just try to find the correct place in the list for the pam_bioapi line. I am currently looking for ways to have the scan graphic come up faster. Also note that with the KDE screen saver that the fingerprint reader does not quite work correctly, and it also has some error when comming out of suspend. I will be working on this and hopefully creating a patch and submitting it.


BIOS Setup

IRDA Service


Install BWidget

  • Download
  • Copy to tcl library location
    • cp -r BWidget /usr/share/tcl8.4/.

Modem/Swsups2 Kernel

Ok you are asking yourself why lump these two together? Well, it seems you can download a kernel for one or the other but not both. So I hacked a solution. There may be a more eloquent way, if so, help me out and edit this section.

The modem requires 16K program stacks. (If you don't want suspend to disk, just download the kernel from Lunixant and goto the modem section.) The Swsups2 requires kernel modifications. (If you don't want to use the modem, just download the kernel from http://mhensler.de/swsusp/download_en.php)

OK here is a quick outline of what I did, I hope to flesh it out later:

  1. Downloaded the two kernal sources.
  2. Found the patch requred to do 16k status
  3. unarchived the swsups2 into a directory
  4. copied the 16k stacks patch into the directory
  5. cleaned out my /usr/src/redhat/BUILD , SOURCES , SPEC
  6. moved all of the files that I have in the tmp dir to SOURCES
  7. copied the spec files to SPEC
  8. make a new 16K spec file
  9. edited it
    1. Added distags i686
    2. Added define at the top (need some more work here to really understand what is going on.)
    3. Added source line: Source3: kernel-2.6.14-1.1653_%{swsuspbuild}_16k.rhfc4.cubbi_swsusp2.spec
    4. Added patch line: Patch1000003: linux-2.6.14-16kstacks.patch
    5. Added section to set configs
    6. for 16KSTACKS
%if %{_with_16k}
for file in *i[56]86*.config; do
       grep -Ev 'CONFIG_4KSTACKS[= ]' $file > $file.tmp
       echo -e "CONFIG_4KSTACKS=n\nCONFIG_16KSTACKS=y\nCONFIG_IRQSTACKS=y" >> $file.tmp
       mv -f $file.tmp $file
       grep -Ev 'CONFIG_DEBUG_PREEMPT[= ]' $file > $file.tmp
       echo -e "CONFIG_DEBUG_PREEMPT=n\n" >> $file.tmp
       mv -f $file.tmp $file
       grep -Ev 'CONFIG_PREEMPT_NONE[= ]' $file > $file.tmp
       echo -e "CONFIG_PREEMPT=y\nCONFIG_PREEMPT_BKL=y\n" >> $file.tmp
       mv -f $file.tmp $file
  1. copied the spec files back to SOURCES
  2. Then ran rpmbuild -ba kernel-2.6.14-1.1653_1_16k.rhfc4.cubbi_swsusp2.spec --target i686 -vv
  3. Then downloaded and installed hibernate (see swsups website)
  4. Downloaded and installed swsusp2-mkinitrd-5.0.8-1.cubbi1.noarch.rpm
  5. Downloaded and installed swsusp2-userui-0.6.1-0.fc4.cubbi1.i386.rpm
  6. ran rpm -ivh on created kernel-2.6.14-1.1653_1_16k.i686.cubbi_swsusp2.i686.rpm
  7. see install instructions on swsups site to complete
    1. edit grub
    2. initrd
      1. I checked and this is aready taken care of in the version that I am using.
    3. Remeber to reinstall ipw2200
    4. Remeber to reinstall fglrx for the new kernel

Ok, for the next step you need to edit your /etc/hibernate.conf file. Here is what mine looks like:

UseSuspend2 yes
Reboot no
EnableEscape yes
DefaultConsoleLevel 1
Compressor lzf
Encryptor none

Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1

### clock
SaveClock restore-only

### modules
UnloadModules usb-ohci hsfmc97ich hsfserial hsfengine hsfosspec hsfsoar ipw2200 e1000 button battery ibm_acpi
UnloadBlacklistedModules yes
LoadModules auto

### services
#I have create a service init.d file for wpa_supplicant.
StopServices wpa
StartServices wpa

### xhacks
SwitchToTextMode yes
UseDummyXServer yes

This file takes care if you run the hibernate to shutdown the system. {NOTE|For testing I set the system to runlevel 3 to do my basic testing (telinit 3). Then I worry about adding the complexity of X} I edited my /etc/acpi/actions/powerbtn.sh to:

# Initiates a shutdown when the power putton has been
# pressed. 
/usr/sbin/hibernate --config-file=/etc/hibernate/hiberante.conf

OK you should have suspend to disk running. Now for suspend-to-RAM. Edit or create the file /etc/hibernate/ram.conf

### sysfs_power_state
UseSysfsPowerState mem

Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1

### clock
SaveClock restore-only
### modules
UnloadModules usb-ohci hsfmc97ich hsfserial hsfengine hsfosspec hsfsoar ipw2200 e1000 button battery ibm_acpi
UnloadBlacklistedModules yes
LoadModules auto

### xhacks
SwitchToTextMode yes
UseDummyXServer yes

Then I changed my /etc/acpi/actions/lm_lid.sh

# lid button pressed/released event handler
/usr/sbin/hibernate --config-file=/etc/hibernate/ram.conf

Try it now. It should all be working.





I got Kismet running with some ado. Their where some got'cha which I hope to document through them here.


You may want to backup your current modules and firmware so you can restore them if something goes wrong.
  • Get the module software
    • Download the lastest IPW200 source and firmware.
    • Download the lastest IEEE-80211
  • Build the modules
    • Build IEEE 80211
      • Untar IEEE
      • Run sh remove-old (as root)
      • make; make install
    • Build the IWP2200 modules
      • Untar IPW2200 source
      • Read in the instructions Goto throught section 5. KERNEL REQUIREMENTS - Configuration and check the things that can not be enabled.
      • Edit the Makefile
#ifndef CONFIG_IPW2200
I had to comment out the #ifndef and #endif to make mine compile right. I did infact remove the CONFIG_IP2200 from the .config file as suggested in the INSTALL file.
      • sh remove-old
      • make;makeinstall
  • Install the Firmware
    • make a new directory for the firmware, extract the firmware into that directory
    • Remove Old Firmware
      • Remove old firmware files from /lib/firmware (rm /lib/firmware/ipw*)
      • Remove links for firmware in /usr/lib/hotplug/firmware (rm /usr/lib/hotplug/firmware/ipw*)
    • Copy firmware and create links
      • From the directory that has the downloaded firmware
      • cp ipw* /lib/firmware/.
      • ln -s /lib/firmware/ipw* /usr/lib/hotplug/firmware/.

That sets up the new driver. Reboot and test that the driver works.


I got the Kismet program from the dag site (http://dag.wieers.com/home-made/apt/) as source and did rpmbuild --rebuild <kismet.src.rpm> (as root). I then loaded the resulting rpm file.

There was only two things that I setup in the /etc/kismet.conf file.

  1. suiduser -- I set the to my normal login
  2. source=ipw2200,eth0,ipw2200 -- this worked for me.
Because I choise to use the suiduser I have to run kismet from a directory that my normal login can write to, aka like my home directory or you can create a directory for it. This, I believe is to limit any hack attempts through kismet itself.


I needed to setup wpa_supplicant because some of the wireless AP I connect to use WPA. The standard stuff in Fedora does not handle that so here you go.

  • Download the current version of wpa_supplicant
  • Untar
  • Create a new .config file
The got'chas here where adding the the CONFIG_WIRELESS_EXTENSION and CONFIG_CTRL_IFACE. CTRL_IFACE is need for the WPA_CLI and the WPA_GUI, which I use.
  • make;make install
  • make make_gui -- This make a nice GUI interface to use from X
  • Then copy wpa_gui to /usr/local/bin -- it must be run as root

I created the following file /sbin/wpa_actions.sh. This sets up the networks seen to use dhcp automatically. You can setup an embeded in using the SSID.



if [ "$CMD" == "CONNECTED" ]; then
    SSID=`wpa_cli -i$IFNAME status | grep ^ssid= | cut -f2- -d=`
    # configure network, signal DHCP client, etc.
    /bin/sleep 2
    /sbin/dhclient $IFNAME

if [ "$CMD" == "DISCONNECTED" ]; then
    # remove network configuration, if needed
    /sbin/dhclient -r $IFNAME

Now to get the system to work I setup in /etc/rc.d/rc.local

/usr/local/sbin/wpa_supplicant -B -w -ieth0 -c/etc/wpa_supplicant.conf -Dwext
#It takes a moment for wpa_supplicant to come up.
/bin/sleep 2
/usr/local/sbin/wpa_cli -a/sbin/wpa_action.sh -B
The interface to use is west NOT iwp. This finally worked for me.

I have now setup a wpa service to make it easy to start and stop. Here is the /etc/init.d/wpa file that I created:

# wpa   
# chkconfig: 35 98 10
. /etc/rc.d/init.d/functions
start() {
       echo $"Starting wpa_supplicant"
       /usr/local/sbin/wpa_supplicant -B -w -ieth0 -c/etc/wpa_supplicant.conf -Dwext
       /bin/sleep 1
       /usr/local/sbin/wpa_cli -a/sbin/wpa_action.sh -B
       /sbin/iwconfig eth0 power on
       /sbin/iwconfig eth0 power timeout 300u all
       /sbin/iwconfig eth0 power period 2
       return $ret

stop() {
        echo $"Stopping wpa_supplicant"
        /usr/bin/killall wpa_supplicant
        return $ret

reload() {
        /bin/sleep 3

case "$1" in
               echo $"Usage: $prog {start|stop|restart}"
               exit 1
exit $RETVAL