Linux on the Toshiba Satellite 335CDS

Author: Michael Minn (see www.michaelminn.com for current contact info)

February 14, 2004


Describes how to set up a Red Hat 6.2 Linux system on a Toshiba Satellite 335CDS notebook computer.


1. Introduction

2. Splitting Your Windoze Partition

3. PCMCIA Problems

4. Installing Red Hat Linux

5. Sound

7. Internet Connection

8. Accessing the Windoze Partition

9. True Type Fonts

10. System Specifications


1. Introduction

The following document describes how I installed Red Hat 6.2 (2.2.14 kernel) on a Toshiba Satellite 335CDS notebook computer. I am providing this information to help others avoid the problems I encountered when installing Linux on a 335CDS or similar Toshiba notebooks.

The Toshiba 335CDS is a mid-range laptop built in late 1998 running an Intel 200Mhz Pentium II. It has a 4 GB hard drive and built-in CD-ROM drive. It comes with the standard 32 MB of RAM which I subsequently upgraded to 64 MB. Upgrades to the maximum of 162 MB are no longer commercially available.

While Red Hat 6.2 dates from 2001, the limited resources on this machine provide an incentive to use older distributions. As the Linux kernel and XFree86 have grown the performance of this machine has dropped to a point where it is not viable with contemporary, generic distributions of linux.

The following instructions assume some rudamentary knowledge of Linux and/or Unix systems, although installation on this particular machine is relatively simple. You will need to know how to edit a text file - vi is an old standard console editor, although it's rather confusing to learn.

I provide no guarantees for any procedures stated in this document. You're more than welcome to e-mail me if you've got a problem, but I can't guarantee a prompt or helpful reply. Like many things in the Linux world...you're on your own. I would, however, appreciate any errata that you can point out so I don't mislead anyone else.

The definitive source for Linux laptop information is the Linux on Laptops Page.

For installation of other versions of Linux, see my Red Hat 8.0 or Red Hat 7.2 or Red Hat 7.0 or Corel Linux (version 1) pages.


2. BIOS Settings

As initially installed, the PCMCIA services will cause an unrecoverable kernel fault both on installation and when booting. During installation, the installer will freeze at the "Initializing PC Card Devices" screen. The OS will issue the following message at boot time before crashing:

	PCI: No IRQ known for interrupt pin A of device 00:13.0.
	Please try using pci=biosirq
	PCI: No IRQ known for interrupt pin B of device 00:13.0.
	Please try using pci=biosirq

This problem can be fixed by changing the BIOS setting for the PC Card. AS THE COMPUTER IS BEING REBOOTED OR TURNED ON, hold the <ESC> key down. The computer will prompt you to press the F1 key - do so. This will bring up the System Setup utility.

Press the <PgDn> key to go to page 2/2 of values. Press the Down Arrow key to advance the cursor to the "PC CARD" Controller Mode value. It probably will be set to "Auto-Selected". Press the space bar until it reads "CardBus/16-bit".

Then press the <End> button to exit the utility and respond "Y" when asked "Are you sure?". The system will reboot and you should have no problems with PCMCIA services.

While you're in the BIOS configuration screen, you should also make sure the boot order puts the CD-ROM drive before the Hard Drive.

Many thanks to Chad Wood for providing this fix.


3. Splitting Your Windoze Partition

The Toshiba 335CDS came with Windoze 98 preinstalled on a single partition. As such, FDISK can't be used to create a partition for Linux. However, Red Hat (and most other distributions) ship with FIPS (a DOS utility) that permits you to split your single partition into two partitions.

Linux Only? Since the hard drive on the 335CDS is only 4GB, you may want to consider making your system a Linux only system, as opposed to a dual-boot system that allows you to use Windoze or Linux. Linux keeps getting more bloated with each release and a reasonable installation will take up around 2GB of disk space. With around 1GB needed for Windoze and some space for Windoze user files, that leaves you only 1GB of space for Linux user files. Not much.

Backup: Make sure to perform a backup of any important files on your Windoze system. Although this partitioning process should leave your Windoze files intact, it's better to be safe than Republican. To conserve precious disk space, you should then delete any files you don't need and remove any programs you don't plan to use in the future.

Fonts: If you are creating a Linux-only system, you may want to include the c:\Windows\fonts directory in your backup so you have a selection of TrueType fonts to install later. For copyright reasons, Red Hat does not include any TrueType fonts with the distribution.

Cleanup: Empty the recycle bin before starting the partitioning process. You may also want to consider completely reinstalling Windoze 98 from the recovery disk so your Windoze size is as small and clean as possible. You should also delete any unnecessary programs and clean off your desktop.

Turn off Virtual Memory: The first trick is getting all of your Windoze files on the lower part of the partition so it can be split. Start your computer and allow it to boot into Windoze. Disable virtual memory from the Windoze control panel. I believe the Windoze swap file is kept on the high part of the partition and that's the section that's going to be moved to Linux

	control panel->system properties->performance tab->virtual memory

Defrag/Scandisk Run the Windoze defrag and scandisk utilities from an M$-DO$ prompt (so you can use the command line options). This will move everything down to the lower part of the partition. When the defrag window comes up, click the SETTINGS button and uncheck the buttons so you DO NOT rearrange so programs start faster and DO NOT check drive for errors. Using these command line options speeds up the process: a full defrag normally takes a few hours, but this one only takes around ten minutes.

	defrag /p /q
	scandisk

Boot Floppy: Before you leave the M$-DO$ window, you need to create a boot floppy and copy the FIPS program to that floppy. This must be done with a floppy since M$-DO$ does not mount the CD-ROM drive. Insert a blank floppy and create a bootable floppy:

	sys a:

FIPS copy: Insert your Red Hat distribution CD # 1. From the MS-DOS prompt or the Windoze Explorer copy the following files from d:/dosutils/fips20/ to your floppy:

	RESTORRB.EXE
	FIPS.EXE
	ERRORS.TXT

Start FIPS: Remove the Red Hat distribution CD, but leave the FIPS floppy in the drive and restart your system. The computer will boot to a DOS prompt. Type FIPS to start the FIPS utility. You will pass through a Welcome screen to a Partition screen. You will get a warning about physical start/end sector not matching logical start/end sector. This is okay, press any key to accept.

Table Adjustment: You will be told Partition table adapted to current drive geometry. Press any key to accept. This will take about five minutes. At this point, the first time I ran FIPS, I got an Error...last cylinder not free message. After I turned off virtual memory and reran defrag, this problem was solved. Hopefully it won't happen to you. Obviously, if it does, FIPS stops here and doesn't split your partition. There is a help file in the d:/dosutils/fips20/ directory on the distribution disk that may be of help. There is also a program called "Partition Magic" that supposedly you can use to create disk partitions. But if FIPS works, you can save yourself $60.

Backup Root Sector: Provided you don't have the last cylinder problem, you will be asked to make backup of root & boot sector. Type 'Y' to accept. Also type 'Y' when asked if you have a bootable floppy in the drive.

Partition Split You will then be asked to enter start cylinder. You can use the left and right arrow keys to move the partition split around. I chose to give Windoze 756MB, about 200MB over the 500MB consumed by Windoze:

	old: 756.0 MB, cylinder 192, new 3153.9 MB

Accept: FIPS will gives you new partition table. Type 'c' to continue.

Commit: Ready to write new partition scheme to disk: Do you want to proceed:. Type 'y'.

ScandiskAs befits a DOS application, FIPS will crash with a memory allocation error. You can ignore it. Remove the FIPS boot floppy and press ctrl-alt-delete to reboot. Run scandisk (from DOS or the program launcher) and turn your virtual memory back on.

You now have two partitons on your disk and you can start the installation of Linux.

References:


4. Installing Red Hat Linux

Backup: Prior to Linux installation be sure to backup any files on the hard drive that you may need later. You might also consider making a backup of your Windoze fonts directory (c:\Windows\fonts) so you can use those TrueType fonts with you Linux system.

Boot: The installer should boot from the first installation CD. I would suggest choosing text installation, since the graphical installer doesn't correctly recognize the video chip in this machine and the installer can be hard to read

Language Selection: English (default)

Keyboard Configuration: U.S. English (default)

Installation Type: Custom

Disk Partitioning Setup: Automatic Partitioning will not work if you are keeping a Windoze Partition (dual-boot system). Use Disk Druid and edit the existing partitions.

The Windozs partition is /dev/hda1. Edit it and make the mount point "/windoze". Obviously, you should leave the data unchanged.

Delete the new partition you created with FIPS (/dev/hda2). You should then add the following new new partitions. The "hdax" may come up as different numbers, but the size and configurations should be the same.

	/boot (98MB) - becomes /dev/hda2. You should probably check for bad blocks

	Linux Swap (197MB - Linux swap) - becomes /dev/hda4 and /dev/hda5

	/ (root - 2859MB - ext3 - Select "Use Remaining Space")

Choose Partitions to Format: accept defaults. You may want to "Check for bad blocks during format"

LILO Configuration: Use linear mode (default)

LILO Configuration: Install bootloader on /dev/hda MBR (default)

Hostname Configuration: Choose something simple

Mouse Selection: Click emulate 3 buttons and accept Generic 3-button mouse

Time Zone Selection: Choose the appropriate one for your area. Hardware clock NOT set to GMT

Root Password: Choose something you can remember

Add User

User Account Setup

Authentication Configuration: accept defaults

Package Group Selection: make your choices

X probe results: Chips & Technologies CT65520 (default)

Installation starts: Runs around 30 minutes. Installed packages listed to /tmp/install.log

Custom boot disk: you probably won't need one

Monitor Setup: Choose Generic Monitor LCD Panel 800x600 (listed after Generic Monitor)

Screen Configuration: Don't probe

Video memory: 2048KB

Clockchip: No Clockchip Setting (default)

Probe for Clocks: Skip

Select Video Modes: Choose anything you want, this will be changed later

You now have a Red Hat Linux box. Reboot.


5. X Configuration

Although this distribution ships with the correct drivers for the video chip in this machine, the Installer does not correctly configure XFree86 for 800x600 SVGA operation. The prompts are almost identical to those given above.

Run the configuration program xf86config.

Horizontal sync: "31.5 - 37.9"

Vertical sync: "40-70"

Video card: Chips & Technologies CT65520

Driver is XF86_SVGA

2048K video memory (default)

No clockchip

THE IMPORTANT STEP: Change the modes for 8bpp, 16bpp, etc so 800x600 is only mode. Leaving other modes will cause XWindows to use those modes...which is not what you want.

When xf86config completes, you should be able to type startx and get a full color XWindows session.

As a regular Linux user that likes to avoid using the mouse, I have avoided the KDE/Gnome war by not using either. I use mwm, a simple Motif window manager that provides the ability to manipulate windows but has no desktop (or the associated performance hit). You can make mwm your default by placing the following lines in your /root/.xinitrc and (home_directory)/.xinitrc files. These files probably won't exist until you create them.

	xclock -d -update 1 -geometry +819+710 &
	xterm &
	xsetroot -solid navy
	exec mw
When you startx, this will give you a clock, a single terminal window and a blue background. You can pop up additional terminal windows by right clicking on the desktop. XWindows applications can be started from the terminals by typing their specific executable names (i.e. gimp, netscape, etc.)

6. Sound

The Yamaha OPL3-SA sound chip in this machine has always been a problem with Linux because the chip cannot be auto-detected and the documentation for OSS really sucks. The driver for this chip is shipped with the distribution, but the sound configuration files must be modified by hand, which is easier than some of the old configuration programs that used to be out there. Oddly enough, audio doesn't work with the opl3 module but instead with the cs4232 module. /etc/modules.conf contains the parameters needed to use this module and specifies to the Linux sound system (OSS-Free) what modules to load for specific sound devices. Edit the /etc/modules.conf file and add the following lines

        alias midi opl3
	alias sound cs4232
	alias sound-slot-0 cs4232
	alias sound-slot-1   off
	alias sound-slot-2   off
	alias sound-slot-3   off

	alias sound-service-0-0  cs4232 # /dev/mixer
	alias sound-service-0-1  opl3 # /dev/sequencer
	alias sound-service-0-2  opl3 # /dev/midi
	alias sound-service-0-3  cs4232 # /dev/dsp
	alias sound-service-0-8  cs4232 # /dev/music
	alias sound-service-0-12 cs4232 # /dev/adsp

        options opl3 io=0x388
        options cs4232 io=0x534 irq=5 dma=1 dma2=0 mpuio=0x330 mpuirq=5

Note that with this configuration, only the PCM (audio) channel on the volume control (mixer) works. CD playback volume can be controlled with the volume control slider on the CD player.

Thanks to Thomas Hood for his info on sound module configuration.

A Real Player 7 is available for Linux. You have to register to get it, and you download a RPM file that can be installed with RPM. Note that you have to use the --force option because the Real Player will take over as the default application for WAV files and there is a conflict in MIME types.

	$ rpm -i --force rp7_linux20_libc6.i386.cs1.rpm

As of this writing, Real Player 9 (i.e. RealONE Player) is available for Linux as an alpha test. I haven't actually tried installing it on this machine.


7. Internet Connection

The Toshiba Satellite 335CDS shipped with a Xircom CreditCard Modem CM-56T, a 56K PCMCIA modem that is no longer manufactured or supported by Xircom. The installation program will automatically detect this modem.

GNOME provides an internet connection setup utility under System Tools->Internet-Configuration Wizard

After starting the utility, you will be prompted for the superuser password. Enter it.

Select Device Type: Modem connection

The utility will scan all normal modem device files and should find the Xircom Credit Card modem on device /dev/ttyS3.

You will then be prompted for a Phone Number, user name and password as provided by your internet service provider.

Apply the profile and you're ready to go.

To connect to the internet, use the System Tools->Network Device Control and chose to activate the connection.

On previous versions the modem worked, but very slowly. With Red Hat 8.0, everything is so slow on this box it's hard to tell where the bottlenecks are. Dave Looney has some experience with the CM-56T and sent me the following tip to configure the modem port to a higher speed. As SUPERUSER execute the following console commands. You also should edit the /etc/rc.local file (as SUPERUSER) and add this command to the bottom of the file.

	$ setserial /dev/ttyS3 spd_vhi

He also suggested that there may be a problem related to inetd. I've never had time to investigate.

The browser given on the start menu under Internet is is Mozilla. The e-mail program is Ximian. Both take forever to load.


8. Accessing the Windoze Partition

The Windoze partition can be read seamlessly from Linux. In the partitioning setup given above, the disk is mounted on the mount point "/windoze". However, the default mounting mode will only allow the superuser to modify it.

You can manually edit the /etc/fstab file and modify the mounting parameters to make the /windoze partition more accessible. If you open the file (as superuser) you will see six columns that should be more or less self-explanatory.

You should find the line with a mount point of /windoze. In the fourth column you should add the following parameters so the line looks something like the following:

/dev/hda1   /windoze   vfat   exec,dev,suid,rw,uid=500,gid=500,umask=0  0  0

The uid and gid should be set to the user that you want to own the partition. You can find a user ID (a three digit number) by typing "id" from a console when logged in as that user. You should then unmount and remount the partition and everything should be accessable:

	umount /windoze
	mount /windoze

Frank Wilson notified me that there are a couple of utilities that permit access to the Linux partitions from Windoze...a terrifying thought. I have not tried either of the two schemes he mentioned and I can not endorse or reject them.

fsdext2 is a utility that will mount the Linux partition read-only on the next available Win95 drive letter (D:, E:, etc).

explore2fs (no URL given) will let you both read and write to your Linux filesystem from DOS/Windoze. However, this is certainly less safe than read-only access.


9. True Type Fonts

Linux is notorious for it's ugly fonts. One of the things Micro$oft actually has done well (and there are a few things) is true type fonts. Linux includes support for true type fonts in the font server XFS. However, true-type font files are proprietary so they can't be distributed with the Linux CDs. Since you are making a system configuration change, you must be SUPERUSER to perform these commands.

Paths to font files are specified in the configuration file, /etc/X11/fs/config. The easiest place to find True Type fonts is the Windoze partition of your hard drive. You will need to modify the "catalogue" section of this file to point to your Windoze fonts directory. Your modified "catalogue" section should look something like this. The only change to the file should be the last line and the comma separator on the next-to-last line.

	catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
		/usr/X11R6/lib/X11/fonts/75dpi:unscaled,
		/usr/X11R6/lib/X11/fonts/misc,
		/usr/X11R6/lib/X11/fonts/Type1,
		/usr/X11R6/lib/X11/fonts/Speedo,
		/usr/X11R6/lib/X11/fonts/75dpi,
		/usr/share/fonts/default/Type1,
		/windoze/windows/fonts

Run the TTMKFDIR & MKFONTDIR utilities to build the fonts.dir and fonts.scale files used by XFS:

	cd /windoze/windows/fonts
	ttmkfdir > fonts.scale
	mkfontdir

You should then kill your X Windows session (CTRL-ALT-BACKSPACE) and restart the X font server:

	killall xfs
	startx

If you want to add new true type fonts, you can copy the .ttf files to the /windoze/windows/fonts directory and rerun the ttmkfdir/mkfontdir sequence above.


10. System Specifications

CD-ROM: TEAC CD-220EA
FLOPPY: Generic NEC Floppy Disk
Hard Drive: Generic IDE Disk Type 01 (Acculogic IDE Controller)
Display: Chips and Tech. 65555 PCI (Toshiba)

PCMCIA: Toshiba ToPIC97 CardBus Controller IRQ 11, Memory 04080000-04080FFF
Toshiba ToPIC97 CardBus Controller IRQ 11, Memory 04082000-04080FFF
Xircom CreditCard Modem CM-56T: I/O 02E8-02EF, IRQ 3

USB: NEC PCI to USB Open Host Controller: IRQ 11, Memory Range FCFFF000-FCFFFFFF
Video Capture: Nogatech-Nogavision
Sound: Yamaha OPL3-SAx Sound System
	I/O Ranges: 0220-022F, 0539-0537, 0388-038F, 0330-0331, 0370-0371
	IRQ 05
	DMA 01, 00
COM1: I/O=03F8-03FF, IRQ 04
LPT1 (printer): I/O 0378-037A, IRQ 07

Partitions: 64M Swap, 16M /boot, 1000M /(root - grow to disk)
Monitor: Generic LCD Panel
X Configuration: Chips & Technologies CT65555