Fujitsu Lifebook S5582

written by Ed Falk

Executive Summary

Positives: Redhat Linux 7.2 and the Fujitsu S5582 were made for each other. I have never had a linux install go so smoothly. Other linux distros should also go smoothly.

Negatives: Linux does not support the built-in modem or the built-in sound chip. The sound chip mostly works with the commercial audio drivers ($35) and may also work with ALSA.

Contents

General comments about the laptop

The Lifebook S 5582 is a 800Mhz PIII laptop with 256M of memory, 30G of disk, and an XGA TFT screen. It is very lightweight (~4 lbs with combination DVD/CDRW installed). Floppy is a USB floppy which linux seems to understand seamlesslly (at least it did during the installation.)

The 5582 comes with a minimal number of I/O ports: V90 modem, 100-base-T ethernet, 2 USB ports, IEEE 1394, infrared, and external monitor. With the optional port extender ($145), you also get keyboard, mouse, external monitor port, parallel and serial ports.

This is a very, very sweet little machine. (I also had an S4542, so I am quite happy with the Fujitsu line.) The light weight can't be beat. If you want, you can pop out the DVD/CDRW drive and replace it with a weight saver to bring the weight down to about 3.5 lbs.

The Fujitsu's are the only very lightweight machines that come with internal CD drives.

My only complaints:


OS

I installed Redhat 7.2 on my system. This distro comes with a nice GUI install procedure, using two disks to hold all the software, another two disks to hold the source code, and three more disks to hold documentation, Star Office, and some game demos.

Initial disk layout and hardware configuration

I wish to have a dual-boot system, keeping the pre-installed Windows 95 and adding Linux to another partition.

The first thing I did was to boot from the Linux install disk and examine the existing disk layout:

	type	id	size
	fat32	0b	26.4G
	ext	0f
	fat32	0b	1.45G
The product advertized 30G of disk, but you can see that the numbers don't add up. Presumably, that's because the disk is measured in "marketing gigabytes" instead of "programmer's gigabytes" -- that is, using a base of 1000 instead of 1024.

I also went to the windoze control panel and noted down all the hardware information I could find (see below) just in case.


Installation Instructions

Turn off power management

Hold down F2 while booting to get to the BIOS setup screen. Examine settings, learn what they mean. Turn off power management so the machine won't go to sleep in the middle of the install. Note the sound chip I/O address, DMA and interrupt.

Also: change the BIOS boot order so that the CD is booted before the hard disk.

Boot Windows.

Repartition Disk

In my case, I used Partition magic to reduce the Win95 partition to 8 Gig. I left the DISE partition alone.

Problem: When I repartitioned the disk, I somehow trashed its suspend-to-disk partition or file, or whatever the BIOS uses. The system became unable to suspend itself to disk, and generated an annoying warning every time I booted the system. The on-line documentation at Fujitsu says you can repair the suspend-to-disk partition or file with the PHDISK.EXE program. One problem -- there's no such program on the machine. I called tech support and they promised to email a copy of PHDISK.EXE to me, but as of this writing, it still hasn't arrived. Another option would have been to copy PHDISK from my old S4542, but that machine runs win95 and this one runs win2k so I didn't want to take the chance.

Solution: A google search for "PHDISK" quickly turned up the Linux version of PHDISK. I was actually able to do most of this while waiting on hold to Fujitsu support. This is why I love linux. The lphdisk program requires you to manually create a suspend partition (e.g. with fdisk); it then locates the suspend partition and formats it the way the Phoenix BIOS wants it done. lphdisk can also be run with the --probeonly option which causes it to tell you how big a partition you need to reserve. I think that the modern Phoenix BIOS's can also suspend to a file in the win95 partition, so if my dos version of PHDISK.EXE ever arrives, I may revisit this issue.

Obviously, using lphdisk had to wait until after I got linux installed.

Boot from Redhat CD

Simply open the CD drive, insert disk #1, and reboot. I also attached the external floppy drive so I could make rescue disks.

At the LILO boot prompt, just hit return. This takes you to the standard GUI installation.

Proceed with install procedure

The Redhat 7.2 install procedure is easy to follow and walks you through the procedure.

Create Disk Partitions

When asked what drive to use during the install process, select "edit" to run fdisk.

I like to have seperate root, swap, and usr partitions. My new partition table looks like this:

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1          1021      3580  20563200    f  Win95 Ext'd (LBA)
/dev/hda2   *         1      1020   8193118+   b  Win95 FAT32
/dev/hda3          3581      3648    546210   a0  IBM Thinkpad hibernation
/dev/hda5          1021      1211   1534176    b  Win95 FAT32
/dev/hda6          1212      1243    257008+  83  Linux
/dev/hda7          1244      1307    514048+  82  Linux swap
/dev/hda8          1308      3580  18257841   83  Linux
Note that the partition table entries are not in disk order. I guess this is an artifact of how the disk was originally partitioned at the factory.

Continue with setup; everything works beautifully. Install process correctly recognizes all hardware, including the video hardware.

Choose desired software, tell install process to go ahead, watch some TV, insert disk #2 when requested, watch some more TV. Piece of cake.

Log in; run startx. Works perfectly. If you chose graphic login, that works perfectly too.

Problem: if the system has been suspended, shutdown hangs at "saving mixer settings". It would be nice if the scripts in /etc/init.d had timeouts in them, but there you are. I will visit this in more detail later. For now, you're better off just disabling audio in the kernel, since Linux doesn't support the i810 sound chip anyway.


Post-Install tuning

Note: the things discussed here are common to all Linux installs, but I thought the information would be helpful.

This information is specific to Redhat 7.2, but should be pretty close to correct for other variants.

Name your laptop

Every computer should have a name. You can pretty much choose any name you like, within constraints set by your network administrator. Names are lower-case. Dashes are ok. Include domain name, e.g. "myhostname.foo.com"

Edit /etc/sysconfig/network and set:

	HOSTNAME=myhostname.foo.com

Redhat's linuxconf has an interface for setting the hostname, but I just edit the file.

This is discussed in more detail below under networking.

Install Modem Driver

The modem is a Lucent winmodem. The Lucent-supplied linmodem driver worked on my S4542; it remains to be seen if it will work on my S5582.

Update /etc/fstab

Here are the items I added to my fstab. What you add to yours will depend on your disk layout. /dev/hda2 /dos vfat user,unhide 0 0 /dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0 /dev/fd0 /mnt/floppy auto onwer,user,noauto,unhide 0 0 /dev/hdc1 /mnt/flash auto owner,user,noauto 0 0 Explanations:

I have windows installed on the first partition of my drive (/dev/hda2). I mount it as "/dos"; it's a vfat file system; any user may mount it; it doesn't get dumped automatically and it doesn't get processed by fsck. I don't know what "unhide" means.

Hopefully the cdrom and floppy entries are self-obvious.

The last entry is for my flash memory card from my digital camera. You can pull the flash card out of the camera (it's about the size of a thumbnail), plug it into an adapter, plug the adapter into the pcmcia slot, and it appears as /dev/hdc. The kernel needs to be configured to support it; this is explained below.

Finally, don't forget to mkdir the /dos, /mnt/cdrom, /mnt/floppy, /mnt/flash directories and so on.

Customize console keyboard

The S5582 shares the same brain-damaged keyboard layout with the rest of the PC industry. The first thing you want to do is swap the control and caps-lock keys to where they belong.
	Edit /etc/sysconfig/keyboard and change
		KEYTABLE="us"
	to
		KEYTABLE="falk"
[obviously, you make up your own name rather than calling it "falk"]

Copy /lib/kbd/keymaps/i386/qwerty/defkeymap.map.gz to falk.map.gz

Uncompress (gunzip) falk.map.gz; edit it.

My changes:

	  44,45c48,49
	  < keycode  14 = Delete	Delete          
	  < 	control	keycode  14 = BackSpace       
	  ---
	  > keycode  14 = BackSpace	Delete
	  > 	control	keycode  14 = Delete
	  69c73
	  < keycode  29 = Control         
	  ---
	  > keycode  29 = Caps_Lock       
	  116c120
	  < keycode  58 = Caps_Lock       
	  ---
	  > keycode  58 = Control         
	  238c242
	  < keycode 111 = Remove          
	  ---
	  > keycode 111 = Delete
Recompress (gzip)

Customize X windows keyboard

Create .Xmodmap file in your home directory or in /usr/X11R6/lib/X11/xinit/.Xmodmap and add these lines:

! Swap control and caps lock remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L ! Enable use of stupid windoze keys at bottom of keyboard ! Choose two unused keysyms at random to assign to the keys. ! Also, I like the delete key to generate delete keycode 115 = F13 keycode 117 = F14 keycode 0x6b = Delete The
XKeyCaps program is very handy here.

What you do with the two windoze keys is entirely up to you. The one on the right has a menu icon on it, so you might assign it to pop up window menus. The .fvwmrc code to do this might look like:

Key F14 R A Popup "Utilities" Key F14 R S Popup "Window Ops" Key F14 R M Module "winlist" FvwmWinList I don't know anything about configuring gnome.

Configure networking

Shameless Plug: visit http://netcfg.sourceforge.net for my own network config program -- I think it's pretty snazzy and will even configure a firewall for you.

Redhat's linuxconf program comes in very handy here, but there are a few caveats:

host name

Your laptop needs a host name (see
above).

You can determine your current host name by using the hostname command.

PPP

This is easiest to do with linuxconf, but here's how to do it manually anyway.

Edit /etc/sysconfig/network-scripts/ifcfg-ppp0

PHONENUM=555-1212 PERSIST=yes DEFROUTE=yes ONBOOT=no DIALCMD=ATDT INITSTRING=ATZ MODEMPORT=/dev/modem LINESPEED=115200 ESCAPECHARS=no DEFABORT=no HARDFLOWCTL=yes DEVICE=ppp0 REMIP= IPADDR=321.654.987.11 MRU= BOOTPROTO=none PPPOPTIONS= PAPNAME= DISCONNECTTIMEOUT= RETRYTIMEOUT= USERCTL=yes MTU= Edit /etc/sysconfig/network-scripts/chat-ppp0 (linuxconf can do this for you.) '' 'ATZ' 'OK' 'ATDT555-1234' 'CONNECT' '' 'ogin:' 'falconer' 'ord:' 'xxxxxxx' set permissions on this file to rw------- (600)

Install latest ppp rpm package if not already installed.

Ethernet

This is easiest to do with linuxconf, but here's how to do it manually anyway. Edit /etc/sysconfig/network-scripts/ifcfg-eth0: # ethernet at work DEVICE=eth0 USERCTL=yes ONBOOT=yes BOOTPROTO=none NETMASK=255.255.255.0 IPADDR=123.456.789.63 BROADCAST=123.456.789.255 NETWORK=123.456.789.0

You should also add a line to your /etc/hosts file for the interface.

123.456.789.10 myhostname.mycompany.com

If you use the DHCP protocol (BOOTPROTO=dhcp), it is not necessary to specify an IP address, network address or broadcast address. It is not necessary to add an entry to /etc/hosts. This is all handled by DHCP.

Domain Name

If your computer is going to be connected to the network, it should probably have a domain name. linuxconf does not seem to set this entirely correctly.

You should have a line somewhere in /etc/hosts that has the fully qualified domain name as the first name on the line, followed by the short hostname. Something like this:

127.0.0.1 myhostname.domain.name.com myhostname localhost or 123.456.789.10 bar.eng.mycompany.com

You can determine your current dns domain by using the dnsdomainname command.

Domain Name Service

Ignore this section if you use DHCP or PPP.

DNS allows your system to find the IP address of any other system on the internet. It really beats adding entries to /etc/hosts. To enable DNS, set the dns domain name as described above and edit /etc/resolv.conf:

search my.isp.com eng.mycompany.com nameserver 321.654.987.1 nameserver 321.654.987.2

In this example, I'm configured for both my PPP connection and my ethernet connection at work. The nameserver entries are the IP addresses of your DNS servers (your network admin will give these to you.) It may be possible to specify these by name if the names occur in /etc/hosts.

Network Information Service

NIS, aka The Protocol Formally Known as YP is a somewhat more powerful, but less popular way than DNS for computers to get hostname (and other) information.

To use NIS, your system needs to have an NIS domain name. (Some systems, e.g. Solaris, use the same domain name for DNS or NIS, but Redhat Linux has seperate domains. I don't know why.)

1) Install ypbind package. It's also a good idea to have yp-tools.

2) Set the NIS domain name of your system. Edit /etc/sysconfig/network and add a line like this:

NISDOMAIN=eng.mycompany.com

3) Edit /etc/yp.conf, and add a line like this:

domain eng.mycompany.com broadcast

You can determine your current NIS domain by using the domainname command.

/etc/hosts

/etc/hosts holds a list of hostnames and IP addresses. It is used along with DNS and/or NIS to obtain hostname information.

If you don't have DNS or NIS, then this file can get pretty large, as it must contain the name of every computer you communicate with. Otherwise, it usually just holds the names of your own computer, and the few systems it needs to communicate with before DNS or NIS starts up.

Here's an example, assuming a ppp connection from home and an ethernet connection at work. My machine is named foo, and has two distinct domains. If I were to connect to my ISP and my ethernet at work simultaneously, chaos would probably result -- or at least a pretty serious firewall breach.

127.0.0.1 localhost # Work, via ethernet 123.456.789.10 foo.eng.mycompany.com # Home, via ppp. I'm lucky enough to have static IP. # This first line isn't actually necessary whether or not # I have static IP, as the PPP module will establish the IP # address. 321.654.987.11 foo.my.isp.com foo 321.654.987.1 dns.my.isp.com

NFS

NFS is the Network File System. It allows you to mount directories on other hosts directly onto your own file system. Your machine may be either an NFS client (mounts filesystems from other hosts) or an NFS host (exports filesystems for other hosts to mount.)

If you've configured your kernel for NFS client support and enabled networking, then nothing more needs to be done to be an NFS client. You simply add entries to /etc/fstab as needed. However, you may want to enable the automounter to make life easier.

To export NFS file systems for other hosts to mount, edit /etc/exports and add a line like this:

/usr *.mycompany.com This example makes my /usr directory available to all systems in the mycompany.com domain.

The automounter is a very convenient feature to have. You can refer to any system on your network simply as /net/remotehost/...

To enable NFS automounter: Install the am-utils RPM if it's not already installed. Automounter works automatically.

Enable rlogin

Since I was transferring files from my old laptop to my new one, I wanted them networked together. Edit /etc/xinitd.d/rlogin and enable rlogin. If you're using firewalls, you need to open that port. netcfg can do that for you.

Firewall

Linux implements firewalls with the Ip Chains package.

This worked right out of the box with the Redhat-supplied kernel.

Devices

Sound

By default, Linux does not support the sound chip very well; only 48-khz stereo works. I will revisit this. The Alsa drivers probably work better, but as far as I can tell, both the free OSS project and the Alsa project have been dead for quite some time. The commercial OSS web page sells a driver for $35 that supports the i810 reasonably well, but I needed to reboot after every hour or so of use in order to un-wedge the drivers.

For now, consider this laptop to have no sound capabilities. I use an Edirol UA-20 USB audio device for my serious work anyway.

CD Writer

Works right out of the box with Redhat-supplied kernel. If you want to configure a new kernel (e.g. 2.4.20) set these settings in the kernel config: ATA/IDE/MFM/RLL support IDE, ATA, and ATAPI Block Devices Y Include IDE/ATAPI/ CDROM support Y SCSI emulation support SCSI support: Y SCSI support Y SCSI CD-ROM support Y SCSI generic support Make sure that /dev/cdrom is a symlink to /dev/scd0 Add append = "hdb=ide-scsi" to /etc/lilo.conf. That should do it. Cdrecord works with the arguments: cdrecord -v speed=8 dev=0,0,0 -data

Ethernet

Works right out of the box with Redhat-supplied kernel. To configure your own kernel: Network device support: Ethernet (10 or 100Mbit): Y RealTek RTL-8139 PCI Fast Ethernet Adapter support

Loopback

The loopback file system is used to (for instance) preview a CD-ROM ISO 9660 image before burning the disks. In a nutshell, it allows you to put a file system into an ordinary file, and then mount that file like a disk partition. Works right out of the box with Redhat-supplied kernel. To configure your own kernel: Block devices: Y Loopback device support

PCMCIA

Pcmcia drivers for linux can be found at the Linux PCMCIA Information Page

The current pcmcia-cs packages have been partly, but not completely integrated into the linux kernel. There are still some incompatibilities. For the most up-to-date drivers, always go to the Linux PCMCIA Information Page. I look forward to the day when these are properly integrated.

For PCMCIA to work, you need to set these in the kernel config:

General setup PCMCIA/CardBus support Y PCMCIA/CardBus support Y CardBus

Here are some devices I've been able to make work:

SCSI

I use an Adaptec SCSI pcmcia card. Model 1401 (double-check this.) It works perfectly with external SCSI disks, 8mm SCSI tape, SCSI zip drive, and UMAX SCSI flat-bed scanner.

The SCSI card came with a mail-in card for a free DB-25 cable. If you plan to connect really cheap hardware (e.g. zip drive) with non-standard connectors, you want to get this.

Earlier, I had tried a model called the New Media Basics SCSI. It did not work Linux (Redhat 4.2) so I sent it back. It may be supported with newer kernels.

The Adaptec worked perfectly right out of the box using the Redhat-supplied kernel; recognizing both external hard disk and CD writer. To configure your own kernel:

SCSI support: Y SCSI support Y SCSI tape support Y SCSI CD-ROM support Y SCSI generic support SCSI low-level drivers: All N (my scsi card is handled by pcmcia-cs package) PCMCIA SCSI adapter support Y PCMCIA SCSI adapter support M Adaptec AHA152X PCMCIA support

ZIP Drive

I obtained a refurbished SCSI zip drive and connected it up. The ZIP drive came with an envelope stuffed with documentation and software. Ignore it. Don't even bother breaking the seal. There's nothing in there you need or want for Linux. Assuming that the kernel is configured properly, it should just plug and play. Since the SCSI drive was the only thing connected to my SCSI card, the drive came up as /dev/sda. This will vary, depending on what other devices you have.

I executed these commands (as root):

mkdir /mnt/zip mount /dev/sda1 /mnt/zip and it worked perfectly. The system even auto-detected the file-system type on the disk.

Wireless Ethernet

I have the Lucent/Orinoco "gold" wireless lan card. Other cards will work too, but not all. Check the Linux PCMCIA Information Page for compatibility before buying a card.

The Lucent/Orinoco card works right out of the box with the Redhat-supplied kernel. To configure your own kernel:

The Lucent/Orinoco card requires the wvlan_cs.o driver which is not included with the 2.4.18 kernel. You can grab it from the Linux PCMCIA Information Page.

Configure the kernel like so:

Wireless LAN (non-hamradio): M Wireless LAN (non-hamradio) M AT&T WaveLAN M Hermes chipset M Hermes PCMCIA card support M Cisco/Aironet PCMCIA cards Then steal the wvlan_cs driver from the pcmcia-cs package: cd /usr/src/pcmcia-cs-3.1.31/ make config cd /usr/src/pcmcia-cs-3.1.31/wireless make wvlan_cs.o cp wvlan_cs.o /lib/modules/2.4.18/kernel/drivers/net

Modem Card

I have an old 14.4 modem card. It worked right out of the box with the Redhat-supplied kernel and with the default configuration for the 2.4.20 kernel.

Flash Card

My digital camera uses little "SmartMedia" flash cards to store images. For about $15 you can get an adapter that plugs these little cards into the pcmcia slot on the laptop. The cards then look like little IDE disks. (I actually use my camera's memory card to transfer files between laptops.)

The SmartMedia card looks like /dev/hdc to the computer. You can mount it by either adding this entry to /etc/fstab

/dev/hdc1 /mnt/flash auto noauto,owner,user 0 0 or (if you're using autofs) by adding this line to /etc/auto.misc flash -fstype=vfat,nodev :/dev/hdc1

I prefer the /etc/fstab method, since it sets the file ownerships on the flash card to the user that mounted it. Otherwise, it gets owned by root, meaning you can't delete files.

Actually, you can enable both methods if you like; they don't interfere with each other, although it's probably not a good idea to mount the card both ways simultaneously.

I had trouble using the card; I got error messages about not being able to find the ide_cs driver. This may be an artifact of my fooling around with the pcmcia-cs package above. I was able to fix the problem by editing /etc/pcmcia/config and changing all intances of "ide_cs" to "ide-cs".

To configure the 2.4.20 kernel:

ATA/IDE/MFM/RLL support IDE,ATA and ATAPI Block devices Y PCMCIA IDE support

1394 Firewire

Linux supports 1394 firewire fairly well. To enable it in the kernel: Enable experimental drivers Enable firewire modules The modules seem to need to be manually loaded. Edit /etc/rc5.d/S99local and add these lines: # 1394 driver, required for firewire disk, etc. modprobe ohci1394 My 1394 firewire disk drive is recognized automatically when plugged into the computer. It appears as /dev/sda to the system (apparently the firewire drivers do scsi emulation.)

I've found that I sometimes need to reboot my system to make it recognize firewire devices. Perhaps the firewire interface is powered down during a suspend and not restored?


Reconfigure kernel

Redhat 7.2 ships with the version 2.4.7 kernel

More on this later.


Nits and Picks

Add yourself to the "floppy" group in /etc/group so you can write floppy disks.

Default power management settings disable the ethernet interface when AC power is not plugged in. This often requires rebooting if you want to use ethernet. This feature can be disabled in the BIOS settings.

If the ethernet interface is disabled due to power management, the Kudzu package will try to uninstall the ethernet drivers from the system on boot-up. Since you won't be adding hardware to your laptop anyway, you don't need Kudzu. Disable it with this command:

/sbin/chkconfig --level 0123456 kudzu off

If you install the enhanced version of vim, you will discover that there's some fool at Redhat who thinks his own personal working environment is the be-all and end-all of productivity, and he's turned on every single bell and whistle that vim supports. This makes vim pretty much unusable to those who are used to the normal behavior. To turn this stupidity off, remove (or rename) the file /usr/share/vim/vim58/macros.


Final Problems

Appendices


Hardware profile

	Hardware:
	  what				IO		IRQ	DMA
	  Disk
	    Toshiba MK3018GAP
	  Display
	    ATI Rage Mobility		1800-18FF	09
	      FD000000-FDFFFFFF		03B0-03BB
	      FC004000-FC004FFF		03C0-03DF
	      000A0000-000BFFFF
	  SMC IR port			118-11f		03	03
					2e8-2ef
	  CD: SONY CD-RW CRX800E
	  IDE: Intel 82440MX		1C90-1C9F
	    primary IDE			01F0-01F7	14
	  IEEE 1394:
	    TI OHCI Compliant
	    FC005000-FC0057FF				09
	    FC000000-FC003FFF
	  Keyboard: standard 101/102
	  Mouse: Alps Electic Co ltd			12
	  Modem:
	    Lucent Soft Modem AMR	1400-14FF	09
					1C00-1C7F
	  Monitors:
	    Default
	  PCMCIA Adapters:
	    O2Micro OZ6933		FC00-FCFF	09
	    EFFFF000-EFFFFFFF		FB00-FBFF
	    FFEFF000-FFEFFFFF
	    FFC00000-FFDFFFFF
	    000DF000-000DFFFF
	  COM1				03F8-03FF	04
	  LPT1				0378-037F
					0778-077B
	  Sound:			1000-10FF	09
	    YAMAHA AC-XG		0CC0-1CFF
	  System:
	    Intel 82440MX PCI-ISA Bridge
			  Power management controller
			  Processor to I/O controller
	    Speaker			0061-0061
	  USB: Intel 82440MX USB Universal Host Controller
					1CA0-1CBF	11