Fedora Core 3 on IBM X31
Z. Rahman
zia@zort.org
This document basically states my personal experience on installing Fedora Core 3 in an IBM Thinkpad X31. I will just cronologically state the difficulties I faced while installing FC3 in X31. If my experience comes handy to anyone, then it's my pleasure.
This document is also available in the following format: 
•	Plain text: fc3.txt
•	PDF : fc3.pdf
•	Post Script : fc3.ps
•	Rich Text : fc3.rtf
•	DVI : fc3.dvi
Table of Contents
1. Cronological Installation Experience	000
1.1. Backup! Backup!! Backup!!!	000
1.2. First PAIN of installation	000
1.3. Second PAIN of installation	000
1.4. Third Pain - First BOOT - Blank screen	000
1.5. Finally no more Pain	000
2. Shoot the Trouble...	000
2.1. First thing first - get a better resolution.	000
2.2. Setting up wireless is [no] madness... (TM)	000
2.3. Suspend/Hibernate on lid close - ACPI/APM?	000
2.4. Enabling the Thinkpad Buttons.	000
2.5. Belkin Bluetooth USB Adapter & Nokia 6230.	000
3. Itsy Bitsy Howtos...	000
3.1. Setting KDE as the default desktop manager.	000
3.2. Getting 'shutdown' and 'restart' option when logging out of KDE.	000
3.3. How to login as root with KDE as default desktop manager.	000
4. The art of decoration...	000
1. Cronological Installation Experience
Here I will be documenting my walkthrough on installing the Fedora Core 3 in my IBM Notebook X31. First, the reason why I chose to switch to Linux. The reason is simple. Everybody knows about it. So, I won't repeat it. :)
1.1. Backup! Backup!! Backup!!!
BACKUP: if you haven't done this yet, do it now! Trust me you gonna thank me if you do backup now. I made 200% sure that I have enough backup. Keeping single point of failure while backing up is one of our oldest habits. So, first I backed up my data in an external notebook HD (borrowed from my colleague) at my office. Came home, backed it up in my home PC, just in case. This could not give me enough peace thinking that how am I going to transfer the data from the external USB HD if it doesnt get detected by FC3 at all. So, I decided to create an Extended partition and keep all my data there, so that I get access to my mails and everything as soon as I am finished with FC3 setup.
1.2. First PAIN of installation
Ok, so I have done the "super duper" backup for myself. Now that I feel completely safe, lets start the main process.
Hit the "blue button". The "blue button". Ok, so we want to boot from the CDROM. I just love IBM's "Access IBM" blue button. They have done a splendid job there. Anyways, once you boot the Fedora CD from the CDROM, the rest is at your CDROM's hand. Just kidding! :)
Ok, no kidding now, the first blunder hit me when I went to partition the disk. I chose to parttion manually, as I prefer some liberty to know what's being done to my computer. So, according to standard practice, I tried to create the following partions: 
•	/boot : 100 MB
•	swap : 1024 MB (double my memory)
•	/ : Rest of the maximum allowable size.
 But, 'anaconda' won't let me part my disk. :( It was throwing an error message about "unable to create partition..." or something like that (that's all my memory can tell me).
Ok, so just when I am about loose hope, I found that there is another primary partition created by IBM recovery system apart from my extended FAT32 partition. That's when I realised, linux cannot handle more than 4 primary partition. But, there was only three (3) primary partitions (if I consider swap as another primary partition). Well, when I deleted the recovery partition (keeping my fingers crosesed), the root ('/') partion just got created nicely. Phewww... now who cares about the IBM_SERVICE partition. :p I was too happy to know that the partitioning went through.
1.3. Second PAIN of installation
Never ever skip checking the md4sum of your downloaded ISOs before you can burn them. Yes!!! I have made the mistake. :(
The first CD went very well after I selected all my custom packages to suit my need. I was idling and watching tv after putting the third CD, when I came back, I saw that it cannot read one file from the CD. I immediately knew what was wrong. Still, keeping my fingered crossed, I tried again. Failed! This is the result of not double checking the downloaded ISOs agains the md5sums. I deserve it!
It's been two hours since the failure, my download of the third ISO still 11 minutes to go. Hope all goes when I get this ISO downloaded. Yes, yes. I am going to check the MD5SUM after I download it. In fact, I am checking twice, cause I downloaded in my server first to accelerte download at home. And, I checked the MD5SUM there too.
1.4. Third Pain - First BOOT - Blank screen
Burning the downloaded ISO (FC3[3]) and finishing rest of the installation was "sweeeeeeet".So, I am happy to Fedora booting. As part of my habitual behavior, I am observing the details of the bootup process. Everything going fine. There's pleasant smile about to come on my face. Then came 'the curse of a grey screen with a pointy mouse'. It just woudn't go forward form there. I see no disk activity, numlock & caps lock working fine. So, its not hung. At that part of night, I was completely exhausted to keep my head straight. I started to hit the evil keys: CTL-ALT-DEL. Nothing happened. Ok, that's it. That's enough. I tried switching to console by hitting CTL-ALT-SHIFT-F1. But all it gave me is a lonely underscore blinking its life away. Hit the evil keys there again. Now I saw some activity. It started to reboot.
Ok, rebooting didn't help in anyways. Its stuck at the same point of dumbness. What I could understand is it is either trying to find some hardware or stuck trying to detect one. As I can't acheive anything now, I decided to give it a rest. Its way past bed time. I have a office to catch tomorrow.
1.5. Finally no more Pain
Came to office, turned on the notebook, went staraight to 'single user mode'. Following tip will give the basic steps of going 'single user mode'. 
	 If you are using GRUB (default): 
•	while in the grub menu, presuming the default lavel is highlighted, hit the 'e' key.
•	it will bring you to a editor window with the kernel parameters for the highlighted kernel.
•	it will bring you to a editor window with the kernel parameters for the highlighted kernel.
•	move to the end og the line, and press 'space' and type 'single' (without interveted commas) and press 'enter'.
•	move to the end og the line, and press 'space' and type 'single' (without interveted commas) and press 'enter'.
•	press 'b' to boot now.
 If you are using LILO (who uses it now?): 
•	type 'linux single' (or whatever the label is instead of 'linux').
•	that's about it.
 
 Just plugged in the ethernet cable and restarted the network: 

                # /etc/init.d/network restart
                Shutting down interface eth0:                              [  OK  ]
                Shutting down loopback interface:                          [  OK  ]
                Setting network parameters:                                [  OK  ]
                Bringing up loopback interface:                            [  OK  ]
                Bringing up interface eth0:                                [  OK  ]
                
 and, then switched to init 3.
Finally, I can see some pretty graphics. :) I have no idea what went wrong the other time, but now it seems all smoothie. So, I decided to forget about the pain of the installation and start another daunting task of troubleshooting.
2. Shoot the Trouble...
Trouble comes with every goddam thing under this Earth... (Earth! What is that! Answer me PINK SKIN!! - Star Trek)
Troubleshooting linux is an exciting era. I do that everyday. Its part of my job. But, the funny thing is I never really used Linux GUI that much. I always install my linux server without X. So, this is the first time I am going to be using X(.org) with a vengeance.
2.1. First thing first - get a better resolution.
Stock installation of Fedora Core 3 seems not to set the correct monitor type for my laptop. It was set to 'none'. So all I had to do is change to "LCD Panel 1024 x 768" in Application->System Settings->Display(->Hardware).
Voila! I have a decent looking desktop now. :)
	 I updated the system with yum immediately after I finished fixing the resolution. 

[root@lappy ~]# yum -y update
Setting up Update Process
Setting up Repo:  base
repomd.xml                100% |=========================| 1.1 kB    00:00
Setting up Repo:  updates-released
repomd.xml                100% |=========================|  951 B    00:00

[snipped]
        
 I don't like to use the up2date GUI interface, although that would do also just fine. I find yum more interactively freindly. 
	 Updating to the latest update from Fedora repository breaks the 'eggcups' and 'gnome-volume-manager' (and/or more applications) due to this bug:Bug ID#140081 (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=140081). To fix this right now, you can enable yum test repository from fedora. Just edit the file /etc/yum.repos.d/fedora-updates-testing.repo and change enable=0 to enable=1 and gpgcheck=0 to gpgcheck=1. Test repository should be disabled once the problem is solved. It should only be used when there are unexpected problems right after an update and/or there fixes available in the test repo. 
 
2.2. Setting up wireless is [no] madness... (TM)
Ok, when is the last time you had wires all around you? Not so long ago, right? No matter what, nobody can take away the good old wires. But, I gotta go wireless!
Stock FC3 cannot configure the wireless card. It install some drivers but, it doesn't work. So, I had to download the open source driver for Intel PRO/Wireless 2100: IPW2100 (http://ipw2100.sourceforge.net/) driver and install it manually, for the wireless card to work.
So, here are the steps to install the driver: 
	 1. Gotta get the kernel source from kernel.org (http://www.kernel.org) as the driver need the kernel source. 

[root@lappy ~]# cd /usr/src
[root@lappy src]# mkdir linux;cd linux
[root@lappy linux]#wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.bz2
--17:02:06--  http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.bz2
           => `linux-2.6.9.tar.bz2'
Resolving www.kernel.org... 204.152.189.116
Connecting to www.kernel.org[204.152.189.116]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36,261,440 [application/x-bzip2]

 5% [>                                    ] 1,832,744    268.95K/s    ETA 02:34
.
[snip]
.

2. Untar the kernel source. 

[root@lappy linux]#tar -jxvf linux-2.6.9.tar.bz2
linux-2.6.9/
linux-2.6.9/drivers/
linux-2.6.9/drivers/s390/
linux-2.6.9/drivers/s390/cio/
linux-2.6.9/drivers/s390/cio/device_id.c
linux-2.6.9/drivers/s390/cio/Makefile
linux-2.6.9/drivers/s390/cio/cmf.c
linux-2.6.9/drivers/s390/cio/cio.h
linux-2.6.9/drivers/s390/cio/qdio.h
linux-2.6.9/drivers/s390/cio/blacklist.c
linux-2.6.9/drivers/s390/cio/device_status.c
linux-2.6.9/drivers/s390/cio/device_fsm.c
linux-2.6.9/drivers/s390/cio/device_pgid.c
linux-2.6.9/drivers/s390/cio/chsc.c
linux-2.6.9/drivers/s390/cio/ccwgroup.c
.
[snip]
.
                
3. Download the ipw2100 driver from sourceforge.net. 

[root@lappy linux]#wget http://unc.dl.sourceforge.net/sourceforge/ipw2100/ipw2100-1.0.1.tgz
--17:19:26--  http://unc.dl.sourceforge.net/sourceforge/ipw2100/ipw2100-1.0.1.tgz
           => `ipw2100-1.0.1.tgz'
Resolving unc.dl.sourceforge.net... 152.2.210.121
Connecting to unc.dl.sourceforge.net[152.2.210.121]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 137,602 [application/x-tar-gz]

100%[====================================>] 137,602       66.15K/s

17:19:29 (66.00 KB/s) - `ipw2100-1.0.1.tgz' saved [137,602/137,602]
[root@lappy linux]#cd ipw2100-1.0.1
[root@lappy ipw2100-1.0.1]#
                
	 The latest update of the kernel from the redhat update sie has the wireless support built-in. You can check that by following the instrictions below: 
You can check if your kernel is configured with CONFIG_NET_RADIO by running: 

# grep CONFIG_NET_RADIO \
        /lib/modules/`uname -r`/build/include/linux/autoconf.h
                
You should see the line: #define CONFIG_NET_RADIO 1 If you have to turn on CONFIG_NET_RADIO in your kernel configuration, make sure you also rebuild, install, and reboot to the new kernel image. Howto build a kernel is out of the scope of this document.
4. Make and install the ipw2100 driver. 

[root@lappy ipw2100-1.0.1]# make;make install
make -C /lib/modules/2.6.9-1.681_FC3/build SUBDIRS=/usr/src/linux/ipw2100-1.0.1 MODVERDIR=/usr/src/linux/ipw2100-1.0.1 modules
make[1]: Entering directory `/lib/modules/2.6.9-1.681_FC3/build'
                
5. Now download the latest firmware from ipw2100.sourceforge.net (http://ipw2100.sourceforge.net/firmware.php), and place the contents under /etc/firmware directory. My /etc/firmware looks like this: 

[root@lappy firmware]# l
total 1.3M
drwxr-xr-x   2 root root 4.0K Nov 23 18:30 .
drwxr-xr-x  84 root root  12K Nov 25 14:20 ..
-rw-rw-r--   1 zia  zia  205K Sep 27 23:26 ipw2100-1.3.fw
-rw-rw-r--   1 zia  zia  197K Sep 27 23:26 ipw2100-1.3-i.fw
-rw-rw-r--   1 zia  zia  192K Sep 27 23:26 ipw2100-1.3-p.fw
-rw-r--r--   1 zia  zia   12K Mar  4  2004 LICENSE
-rw-r--r--   1 root root 597K Oct 20 23:22 microcode.dat
                
6. Check whether the driver is installed properly or not. 

[root@lappy ipw2100-1.0.1]# modprobe ipw2100
                
 If you are in X terminal, then this command should not show anything. And, if it doesn't then the driver is installed.
Now, you can go ahead and configure your wireless card at Application->System Settings->Network (Gnome) or System Settings->Network (KDE).
 
	 The hotplug utility (http://linux-hotplug.sourceforge.net (http://linux-hotplug.sourceforge.net/)) that loads the firmware is installed by Fedora installation. The only thing that conflicts with the documentation above is the firmware stays at /lib/firmware instead of /etc/firmware. So, please make sure you copy the ipw2100 firmware to /lib/firmware if you want hotplug to load them. 
2.3. Suspend/Hibernate on lid close - ACPI/APM?
"Suspend on lid close" - this has haunted me for sometime before I could really figure how to get it right. First I thought that enabling ACPI would just give me the convenient of closing the lid and walk towards home. :) But, alas, that never happened. So, I decided to get it done in any cost. Since then I tried almost all the ways possible that I could google out, but failed some was half successfull, some semi-successfull, some completely thumbs down. I will start by listing out what failed for me and then I will describe the one that was "successfull" enough to make me happy.
	 The following were semi/half successfull for me (I wouldn't call them failure though): 
[ 1. Michael Moller's ACPID scripts. ]
URL: http://csd.informatik.uni-oldenburg.de/~eagle/acpid.html
First I tried these scripts to make the X31 goto sleep mode (S3) when I close the lid. I got the script working fine. So, I closed the lid and went home. After I reached home, I found my laptop so hot that the heat was evaporating the moment I opened my laptop bag. I thought, *SHUCKs*, I burnt my lappy! Somehow, the sleep mode didn't work properly.
This is what I did to install the scripts: 

[root@lappy ~]# cd /usr/local/src/
[root@lappy src]# mkdir acpi-conf-lidbtn
[root@lappy src]# cd acpi-conf-lidbtn/
[root@lappy acpi-conf-lidbtn]# wget http://csd.informatik.uni-oldenburg.de/~eagle/acpid/my.acpid-conf.tar.gz
--17:00:32--  http://csd.informatik.uni-oldenburg.de/%7Eeagle/acpid/my.acpid-conf.tar.gz
           => `my.acpid-conf.tar.gz'
Resolving csd.informatik.uni-oldenburg.de... 134.106.29.90
Connecting to csd.informatik.uni-oldenburg.de[134.106.29.90]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,438 [application/x-tar]

100%[================================================================================>] 1,438         --.--K/s

17:00:33 (13.71 MB/s) - `my.acpid-conf.tar.gz' saved [1,438/1,438]

[root@lappy acpi-conf-lidbtn]# tar -zxvf my.acpid-conf.tar.gz
/etc/acpi/events/ac_adapter
tar: Removing leading `/' from member names
/etc/acpi/events/lidbtn
/etc/acpi/events/powerbtn
/etc/acpi/ac_adapter.sh
/etc/acpi/lidbtn.sh
/etc/acpi/powerbtn.sh
[root@lappy acpi-conf-lidbtn]# cd etc/
[root@lappy etc]# ls
acpi
[root@lappy etc]# cd acpi/
[root@lappy acpi]# ls
ac_adapter.sh  events  lidbtn.sh  powerbtn.sh
[root@lappy acpi]#
                
 After that, I just edited the lidbtn.sh file and changed "echo -n 1 > /proc/acpi/sleep" to "echo -n 3 > /proc/acpi/sleep" on line 53. Then I copied the contents of current directory to /etc/acpi/: 

[root@lappy acpi]# cp -r * /etc/acpi/
                
 But, unfortunately, as this almost fried my lappy, I don't really recommend anyone to use it. :p
<br>
[ 2. Borislav Deianov Linux ACPI Driver ]
URL: http://ibm-acpi.sourceforge.net/
README: http://ibm-acpi.sourceforge.net/README
As the above method (scripts) failed to serve my purpose, I decided to give this one a try.
This is what I did:

[root@lappy ~]# cd /usr/local/src/
[root@lappy src]#
[root@lappy src]# wget http://voxel.dl.sourceforge.net/sourceforge/ibm-acpi/ibm-acpi-0.8.tar.gz
--00:10:31--  http://voxel.dl.sourceforge.net/sourceforge/ibm-acpi/ibm-acpi-0.8.tar.gz
           => `ibm-acpi-0.8.tar.gz'
Resolving voxel.dl.sourceforge.net... 69.9.164.2
Connecting to voxel.dl.sourceforge.net[69.9.164.2]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25,979 [application/x-tar]

100%[====================================>] 25,979        20.67K/s

00:10:33 (20.65 KB/s) - `ibm-acpi-0.8.tar.gz' saved [25,979/25,979]
[root@lappy src]# tar -zxvf ibm-acpi-0.8.tar.gz
ibm-acpi-0.8/
ibm-acpi-0.8/Makefile
ibm-acpi-0.8/README
ibm-acpi-0.8/config/
ibm-acpi-0.8/config/sbin/
ibm-acpi-0.8/config/sbin/service
ibm-acpi-0.8/config/usr/
ibm-acpi-0.8/config/usr/local/
ibm-acpi-0.8/config/usr/local/sbin/
ibm-acpi-0.8/config/usr/local/sbin/idectl
ibm-acpi-0.8/config/usr/local/sbin/laptop_mode
ibm-acpi-0.8/config/usr/sbin/
ibm-acpi-0.8/config/usr/sbin/ibm_hotkeys_X20
ibm-acpi-0.8/config/etc/
ibm-acpi-0.8/config/etc/acpi/
ibm-acpi-0.8/config/etc/acpi/actions/
ibm-acpi-0.8/config/etc/acpi/actions/blank.sh
ibm-acpi-0.8/config/etc/acpi/actions/eject.sh
ibm-acpi-0.8/config/etc/acpi/actions/video.sh
ibm-acpi-0.8/config/etc/acpi/actions/radio.sh
ibm-acpi-0.8/config/etc/acpi/actions/hibernate.sh
ibm-acpi-0.8/config/etc/acpi/actions/blank-debian.sh
ibm-acpi-0.8/config/etc/acpi/actions/undock.sh
ibm-acpi-0.8/config/etc/acpi/actions/battery.sh
ibm-acpi-0.8/config/etc/acpi/actions/sleep.sh
ibm-acpi-0.8/config/etc/acpi/actions/dock.sh
ibm-acpi-0.8/config/etc/acpi/actions/rescan.sh
ibm-acpi-0.8/config/etc/acpi/events/
ibm-acpi-0.8/config/etc/acpi/events/dock
ibm-acpi-0.8/config/etc/acpi/events/radio
ibm-acpi-0.8/config/etc/acpi/events/blank
ibm-acpi-0.8/config/etc/acpi/events/sleep
ibm-acpi-0.8/config/etc/acpi/events/undock
ibm-acpi-0.8/config/etc/acpi/events/eject
ibm-acpi-0.8/config/etc/acpi/events/hibernate
ibm-acpi-0.8/config/etc/acpi/events/rescan
ibm-acpi-0.8/config/etc/acpi/events/video
ibm-acpi-0.8/config/etc/acpi/events/ac
ibm-acpi-0.8/LICENSE
ibm-acpi-0.8/ibm_acpi.c
[root@lappy src]# cd ibm-acpi-0.8
[root@lappy ibm-acpi-0.8]# make
make -C /lib/modules/2.6.9-1.681_FC3/build SUBDIRS=/usr/local/src/ibm-acpi-0.8 modules
make[1]: Entering directory `/lib/modules/2.6.9-1.681_FC3/build'
  CC [M]  /usr/local/src/ibm-acpi-0.8/ibm_acpi.o
  Building modules, stage 2.
  MODPOST
  CC      /usr/local/src/ibm-acpi-0.8/ibm_acpi.mod.o
  LD [M]  /usr/local/src/ibm-acpi-0.8/ibm_acpi.ko
make[1]: Leaving directory `/lib/modules/2.6.9-1.681_FC3/build'
[root@lappy ibm-acpi-0.8]# make install
install -d /lib/modules/2.6.9-1.681_FC3/acpi/
install -m 644 -c ibm_acpi.ko /lib/modules/2.6.9-1.681_FC3/acpi/
depmod -a
[root@lappy ibm-acpi-0.8]# modprobe ibm_acpi
                
Following showed up in my /var/log/messages about ibm_acpi: 

        ibm_acpi: IBM ThinkPad ACPI Extras v0.8
        ibm_acpi: http://ibm-acpi.sf.net/
        ibm_acpi: dock device not present
        ibm_acpi: bay device not present
                
	 The following things I encountered when I installed ibm_acpi: 
1. Unfortunately, 'make install' above does not install all config files and some of the bash script that is vital for ibm_acpi to work. They are all in 'config/' directory. Just copy them to the corresponding directories.
2. Also, the 'modprobe ibm_acpi' command does not configure the system to start the module at boot time. So, just add '/sbin/modprobe ibm_acpi' in /etc/rc.local for it to load at boot time.
2.4. Enabling the Thinkpad Buttons.
2.5. Belkin Bluetooth USB Adapter & Nokia 6230.
3. Itsy Bitsy Howtos...
There are so many small other tweaking that I I had to do before I could fully start to use my Thinkpad peacefully. These tweaks do not fall under troubleshooting, so I am including them here. There will small howtos on various subjects.
This section maybe everchanging as new fixes and tweaks comes along my mind.
3.1. Setting KDE as the default desktop manager.
It's simple. Just edit the /etc/sysconfig/desktop and replace GNOME with KDE. Voila!
3.2. Getting 'shutdown' and 'restart' option when logging out of KDE.
Just edit /etc/sysconfig/desktop and put the following:
DISPLAYMANAGER="KDE"
	 This will replace the 'good looking' blue curve login screen with a sucky looking KDE login screen. 
3.3. How to login as root with KDE as default desktop manager.
	 Although, I do not advice everybody to login as root, but I must mention I find it really inconvenient entering root password whenever I am opening a system configuration application. There should really be a mechanism to save the root password when I enter it once as another user (it signifies me as a authorized super user anyways), so that next time when I open a configuration application, it doesn't ask me for the password again. But, thats my point of view. I beleive the gurus had some "solid" reasons behind doing this. Perhaps, the GUI for linux is targetted mainly to new users of linux. 
 Now that I warned everybody _not_ to practice logging in as root and work, this is how you enable root login for KDE for those bravehearts: just edit /usr/share/config/kdm/kdmrc and make all "AllowRootLogin" to true. :) That's all.
4. The art of decoration...
Decorating your desktop is like tidying up you working area. If you are one those who likes to keep their working area untidy, then you can "safely" skip this section. :)
I will be adding all sorts of decoration techniques here as I go along. I even have plans to try out several nice and nifty looking desktop manager such as Fluxbox, Desklets and even Enlightenment DR16 [may be E17 when it comes out :)].