Installing Fedora Core 3 on a Fujitsu Lifebook S6231

Brian Tung <brian@isi.edu>
Last updated 2005-11-01

1. Introduction

I recently purchased a Fujitsu Lifebook S6231 to replace my functional but somewhat abused Gateway Solo 3450. Installing Red Hat 7.3 onto the Gateway had been such a breeze after struggling to install Red Hat 4.2 (and then 6.2) onto my previous portable, the Toshiba Libretto 70CT, so I anticipated that the progression would continue and Fedora Core 3 would more or less install itself onto the new laptop.

Alas, it was not to be. Although installing FC 3 was not overly difficult, there were a few wrinkles that needed attending to. (No doubt much of this is because there's a lot more features to this laptop than there were for the Gateway.) I'll cover these in the following sections.

2. Overview

First, a summary of what's on the laptop and what works.

Feature Status Notes
1.6 GHz Pentium M with SpeedStep Works CPU speed ranges automatically from 600 MHz to 1.6 GHz
80 GB hard drive at 4200 rpm Works  
512 MB memory as two 256 MB SIMMs Works Actual memory reported as 507028 kB
13-inch XGA display (1024x768) Works  
Modular DVD-ROM/CD-RW drive Works Occasional errors when burning CD-ROMs
Three USB slots Works Syncing Palm Pilot works only sporadically
Intel PRO/Wireless 2200BG 802.11 Works Requires SourceForge driver (at least for 2.6.10 and older)
Wired Ethernet Works  
Firewire (IEEE 1394) Not tested  
WinModem Not tested  
SD/Memory Stick reader Not tested I haven't heard of anyone getting this to work yet
ACPI power management Works Touchpad taps work poorly after suspend-to-RAM on 2.6.11

I'll try to fill in the "Not tested" items as I get time. Here is the lspci output for those of you who like that sort of thing.

The basic steps involved in installing FC 3 to this laptop are as follows. (I'm assuming you have the FC 3 disks in hand and are ready to install. There are notes at the end on obtaining the ISO images and burning them to CD-ROMs.)

  1. Repartition the hard disk.
  2. Install from the disks.
  3. Obtain kernel sources and build a suspend-to-disk kernel. (Optional)
  4. Download wireless driver and build to new kernel.

3. Installation Procedure

Disclaimer: The instructions in this document are not warrantied in any way. The author is not to be held liable for any damage or loss of data or equipment as a result of the use of these instructions.

I'll go into further details on each of those steps now. You should be aware that supporting suspend-to-disk requires you to build a new custom kernel each time you want to upgrade to a new kernel release, and that supporting the wireless card requires you to build the driver modules anew each time you switch to a new kernel (whether or not it's a custom job or not).

One nice thing about this laptop is that it comes with a recovery disk that absolutely returns the machine to its initial state. I found this, ahem, very useful indeed during my first attempts at installation. Any time you find yourself apparently beyond recall, just slip this disk in, and within an hour or less, you're back at Square One with a clean system. Time consuming, but well worth it.

3.1. Repartitioning the Hard Disk

The FC 3 installer has trouble reading the hard disk's geometry. The symptom is a long sequence of failed assertions after the first couple of pages during the graphical install. Red Hat has a bugzilla thread on this problem, which you may want to read.

There are a couple of ways around this. One is to use Partition Magic (or something like it) to repartition the disk; this is what I did. If you want to keep a reduced Windows partition, you'll have to do this anyway. Partition Magic rewrote the partition table in a way that was amenable to the FC 3 installer.

The other way, as described in the bugzilla thread, is to use sfdisk to adjust the partition table so that the installer doesn't reject it. Start up the graphical install, then press alt-F2 to enter the text terminal. (Alternatively, if you burned a rescue disk, start that up, and then type "linux rescue" at the prompt.) Then type

    # sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda

Note that this approach will not let Disk Druid repartition the existing NTFS partition. It will only permit the complete elimination of that partition. If you plan to have only Linux running on this laptop, of course, this won't present a problem for you.

3.2. Installing from the Disks

Assuming that you've resolved the hard drive issue, the installation ought to proceed straightforwardly. There are a couple of minor points. First, the display is not specifically supported anywhere. However, choosing a generic 1024x768 LCD display will work fine. I've had no problems with my screen (aside from a pixel that's stuck on green) with this setting. F6 and F7 are the only way to adjust the screen; they increase brightness and contrast in lockstep, but only in very coarse steps.

Secondly, at some point, the installer will test the audio. When I went through this, the audio test didn't play. The installer asks you whether you heard it or not, but it doesn't actually fix anything if you say "No." It turned out later that the audio test did play, but the volume was initialized to zero, so I didn't hear it. My advice is to just say you heard it, whether you did or not, and then test the sound yourself later.

3.3. Suspend-to-RAM and Suspend-to-Disk

The Fujitsu Lifebook S6231 supports the newer ACPI power management scheme, which supersedes the older APM scheme. You can, for instance, cat the files in /proc/acpi/battery/CMB[12] to find out information about the batteries. The main battery information is in the CMB1 directory; if you have the modular battery installed, its information is in the CMB2 directory. Unlike the APM battery status information, everything in these directories is annotated so it should be no trouble at all to interpret.

What does not work off the basic install is any kind of suspend. To be more precise, suspend-to-RAM does work, sort of, but unfortunately, resume-from-RAM doesn't work entirely. The kernel awakens, and the machine responds to the commands you type; however, you cannot see any of the results because the display doesn't return from the suspend. This tends to limit the usefulness of suspend-to-RAM.

Fortunately, there is a way to change the default set-up so that suspend-to-RAM does work. First, assuming you use grub as your boot loader, edit the kernel options line in /boot/grub/grub.conf (this is the line that starts with "kernel"). Edit this line so it looks like this:

    kernel [...] quiet pci=noacpi acpi_sleep=s3_bios

The first option tells the kernel not to use ACPI for IRQ routing or to scan the PCI; the second option tells the kernel to wake the video chip upon resuming. You can now suspend by typing (as root)

    # echo 3 > /proc/acpi/sleep

You must do this in a root shell; doing it with sudo (if you use sudo) won't work. It will work if you do a sudo su first. Note: If you have the ipw2200 module loaded (see below), it will cause a kernel panic upon resume for some reason if it's left installed at suspend. To make sure everything comes back right, you must preface the above command with

    # rmmod ipw2200

and follow it after resuming with

    # modprobe ipw2200

There is a less kludgy way to do it, using the hibernate script. Download the hibernate RPM:

    # yum install hibernate

This RPM installs a hibernation script with a reasonably easy-to-use configuration file in /etc/hibernate/hibernate.conf. If, by any chance, you don't feel confident setting it up yourself, you can try this one. When you're ready to try it out, you can just type

    # hibernate

This script can be run using sudo. It takes the machine about 5 seconds to go to sleep (it beeps twice quickly as it does so), and I close the lid. In the case of my machine, when I open the lid, it automatically wakes up again, but if it doesn't do that, you can always wake it up manually by pushing the power button. You'll probably have to revive networking manually, too, in either case.

That leaves suspend-to-disk. In 2.6 kernels, suspend-to-disk is done in a slick and clever way. (Well, at least I think it's slick and clever.) Memory is selectively written to swap, and the machine is actually entirely shut down. To resume, the machine is booted partway, but before the disk is remounted and all the services started up anew, the kernel detects that memory is living in suspended animation in the swap partition, copies it back into main memory, and goes on where it left off. (I don't know what it does if swap doesn't have enough space left to write memory to. My guess is that suspend-to-disk fails, probably in some graceless way.)

Suspend-to-disk takes about 45 seconds to suspend, and another 45 seconds to resume. Suspend-to-RAM uses about 5 seconds for each. The only advantage to suspend-to-disk is that it consumes absolutely no power; if you intend to have the machine sit unused for several days and still want to start up doing whatever you were doing when you suspended, you'll want suspend-to-disk. Otherwise, suspend-to-RAM is the better choice. Also, suspend-to-disk requires you to recompile the kernel after each new release (assuming you want the new features in each kernel release).

If you choose to employ suspend-to-disk, here's what to do. Obtain the kernel sources, and build the source tree, as follows. Type (as root)

    # up2date --get-source kernel
    # rpm -i kernel-<version>.src.rpm
    # cd /usr/src/redhat/SPECS
    # rpmbuild -bp --target=i686 kernel-<version>.spec

The kernel source will then be in /usr/src/linux (a symlink to the tree for the specific kernel version). Continue as follows:

    # cd /usr/src/linux
    # make gconfig

This starts up the graphical kernel configurator. Expand the "Processor type and features" tab; this opens up a bunch of new tabs, including the "Processor family" tab, which you should also expand. Scroll down and select the Pentium M processor. The easiest way to do this is to click on the blank in the Y column.

Next, expand the "Power management options" tab, and then the "Power Management support" tab. Click on the "Software Suspend" tab to activate it. Expand the "Software Suspend" tab to expose the default partition for saving memory. You should enter the device name for your swap partition. (For instance, my default partition is "/dev/hda3.")

I also activated two other features that may or may not be important to you. Expand "Device Drivers," then "Graphics support," then "Support for frame buffer devices." Then indicate modular support for the Intel 830M family of chips. (The actual chip in the S6231 is the Intel 855GM.) Also, the Windows XP partition is naturally an NTFS partition; to be able to read it, expand "File systems," then "DOS/FAT/NT Filesystems," and then ensure that NTFS file system support is selected. I don't recommend that you indicate support for writing; it's still unstable.

When you're done configuring the kernel, click on the Save icon and quit. Then type

    # make
    # make modules_install
    # make install

Now you're ready to try things out. (I'm assuming you're using grub, which makes adjusting configuration much easier than with lilo. If you use lilo, you must remember to run /sbin/lilo before rebooting.) When the machine boots back up, you will have an additional kernel in the menu, which will have a name like 2.6.10-prep; the "prep" indicates that the kernel is a custom build. Select this one to try out the version of the kernel that will support suspend-to-disk.

You can also use the hibernate script with suspend-to-disk (indeed, it's originally intended for it, hence the name). It should be straightforward to edit hibernate.conf to do what you want, but if you feel unsure, you can use this one. When you're ready to suspend, type (again, as root)

    # hibernate

This will go through a minute-long process to write memory to the swap. At the end of this process, the machine shuts down. To resume, push the power button, as though you were powering up from a cold start (which, in a sense, you really are doing). Again, you'll have the same boot menu, and again, make sure you select the custom kernel. This is very important. If you mess up, and select a different kernel, you must shut the machine down (press the power button, pull out the battery--anything!) before the kernel mounts the hard disk read/write. Otherwise, things may get completely fouled up.

Provided you select the custom kernel, the machine will start the initial boot-up process, and then it will detect the suspend image in the swap, and resume from there. Again, this takes a bit less than a minute. (If you don't have a lot of services running, you may find things a little faster.)

3.4. Wireless Card

The integrated wireless card in the Fujitsu Lifebook S6231 is an Intel PRO/Wireless 2200BG. I assume the BG designation means that the card will work with both 802.11b and 802.11g access points (and/or ad hoc modes, perhaps). The kernel downloads allegedly have modular support for this card, but the modules that come with kernels older than 2.6.11 don't seem to work (on my machine, at least). So I built the modules separately, from the ipw2200 SourceForge web site, here. Download the driver source, which is called ipw2200-<version>.tgz, and the firmware image, which will be called ipw2200-fw-<version>.tgz. The two versions won't typically match; my driver source version is 0.21, and the firmware image version is 2.2.

The driver module will be built to the kernel that is actually running, so if you expect to use it with a custom kernel, you must be running that custom kernel when you compile the driver. Untar the driver source and build it:

    # tar xvzf ipw2200-<version>.tgz
    # cd ipw2200-<version>
    # make
    # make install

Now, you must make sure that your kernel loads those new modules, instead of the ones it put in there originally.

    # cd /lib/modules/<kernel-version>
    # cd kernel/drivers/net/wireless
    # mv ieee80211.ko ieee80211_crypt.ko ieee80211_crypt_wep.ko ieee80211
    # mv ipw2200.ko ipw2200
    # ln -s ieee80211/ieee80211.ko
    # ln -s ieee80211/ieee80211_crypt.ko
    # ln -s ieee80211/ieee80211_crypt_wep.ko
    # ln -s ipw2200/ipw2200.ko

Things are now set on the driver end. Now, set up the firmware images. Untar the firmware tarball and install it:

    # tar xvzf ipw2200-fw-<version>.tgz

This will put the firmware files and the license in the current directory. You will need to move them to the right place. That right place can be identified by typing

    # grep FIRMWARE_DIR /etc/hotplug/firmware.agent

which on my machine yields FIRMWARE_DIR=/lib/firmware. Assuming that's also the case on your machine, now type

    # cp LICENSE *.fw /lib/firmware

Now it's time to test it out. Type

    # rmmod ipw2200
    # rmmod ieee80211
    # rmmod ieee80211_crypt_wep
    # rmmod ieee80211_crypt
    # modprobe ipw2200

which flushes out the old modules and installs the new ones. If you type

    # iwconfig

you should now see that one of your Ethernet interfaces (eth1 on mine) has wireless extensions. This can now be configured in the usual way, with parameters and keys in ifcfg-eth1 (or whichever interface is applicable). My ifcfg-eth1 has the following:

    DEVICE=eth1
    ONBOOT=no
    BOOTPROTO=dhcp
    ESSID=<essid>
    KEY=<wepkey>

where <essid> is the SSID for the access point and <wepkey> is the WEP key in hexadecimal (no colons or spaces).

Note: Occasionally, the wireless extensions will fail to reload properly coming out of hibernation. A little tinkering produced a functional workaround: first rmmod, then modprobe the ipw2200 module. I'm not sure what's happening exactly, but since memory isn't written en masse to the swap, perhaps the kernel module's footprint doesn't make it out intact.

4. Additional Configuration

I like to be able to write Chinese documents in LaTeX; the package for this is called CJK. However, I had a lot of trouble getting CJK (which stands for Chinese/Japanese/Korean) installed on my system. There are a lot of CJK RPMs out there, most of which elicit conflicts and failed dependencies without any good resolution.

Eventually, I hit upon the right place: Ling Li's repository at http://apt.ling.li/. He has packages all set for FC 3; the ones you need are cjk itself, and cjk-ttf-arphic. The former defines the LaTeX macros, and the latter provides the font metric files for the Arphic TrueType fonts. The fonts themselves have to be downloaded elsewhere as package ttfonts-zh_TW, but they are at the FC 3 RPM site. (In fact, if you installed everything during the FC 3 installation process, those fonts should already be on your system.) Download any version of the fonts at least as recent as 2.11-20. The cjk package includes example files; type

    # rpm -ql cjk

to find them. The example files themselves contain information on how to process them.

5. Obtaining and Burning CDs

The following is a sketch of the procedure involved. I'll try to explain further at a later time.

First, obtain the ISO images. Download the ISO images for Fedora Core 3 from

http://fedora.redhat.com/download/mirrors.html

You may have to navigate down some directories. Typically, single digits indicate the Fedora Core release number. You will likely also need to go down the directories for your architecture and for the ISO files. When you get to the right directory, you'll want to download the multiple ISO files (but not the source RPM ISOs) if you're burning a CD, or the single DVD ISO file if you're burning one of those.

Once you have downloaded the ISO files--this'll take a while, even if you have a fast connection--check to make sure that they have been written correctly by doing an MD5 checksum on them:

    # md5sum <ISO file name>

The output should match whatever is given in the download directory. If it doesn't, you must download that file again, possibly ensuring that the file is saved as a binary file. Once the ISO files have all been inspected, burn them to blank discs. In Linux (if you have access to another machine), you can type

    # cdrecord -v -eject speed=2 dev=ATAPI:1,0,0 <ISO file name>

The CD device indicator may be different for your system. To find out what it is, try

    # cdrecord -scanbus

and look for your CD-ROM device. Also, newer versions of cdrecord may want ATA instead of ATAPI; permission problems may result if you use the wrong prefix.

6. Conclusion

These instructions are based on my own notes. In transcribing them, I may have inadvertently left some steps out; in creating them, I may have sometimes been inefficient and missed a better way of doing things. In either case, please let me know at <brian@isi.edu>, and if your comments pan out, I'll incorporate them into this document.

More reports like this at Linux on Laptops.


Copyright (c) 2005 Brian Tung