Sunday, September 18, 2005

Linux on a Toshiba Satellite M35-S359


Partitioning

Before even installing linux or any other operational system, you'll have to split the huge 60GB single NTFS partition into other partitions. The recovery DVD will rewrite the entire 60GB disk if you don't abort it and fdisk/format a smaller ntfs partition on the beginning of the drive. To do so, i followed the following steps: (You could also take a different approach, by resizing the NTFS partition, using http://linux-ntfs.sourceforge.net/)

  1. Boot knoppix, or any other linux rescue system. To choose the boot medium, you will have to press F12 during boot.
  2. Use fdisk, cfdisk, or the partition editor of your choice to create a smaller NTFS partition and the other desired linux/windows partitions. In my case, i decided to create the following:
Device Boot      Start         End      Blocks   Id  System
/dev/hda1 * 1 2433 19543041 7 HPFS/NTFS
/dev/hda2 2434 2444 88357+ 82 Linux swap
/dev/hda3 2445 5363 23446867+ 83 Linux
/dev/hda4 5364 7296 15526822+ c W95 FAT32 (LBA)

That is: a 20 GB partition for WinXP, a 20 GB partition for Linux and another 20 GB FAT32 partition to share data (mp3, movies, etc) between linux and windows. (NTFS is mounted as read-only on linux)

You may probably want a smaller linux partition, or a separate partition for /home. I just wanted to keep things simple.

  1. Boot with the recovery dvd this time.
  2. On the screen prompting you to confirm the recovery procecure, you just abort.
  3. You will be then dropped into a win98 "shell". On this environment, i made sure the first ntfs partition was active and formated. To do so, i used fdisk to make this partition active, and then, after another reboot (as recommended by DOS' fdisk) with the recovery dvd (aborting once again) I used DOS' format.com to properly format C:. (This formatting step may not be needed, i haven't confirmed so. But it is safe to do it anyway). As reported on http://www.fnal.gov/projects/ckm/ckm_cluster/toshiba-1805/ you should change to the recovery virtual drive and run the proper win98 fdisk. There is also a .bat for resuming the recovery process. More details on where to find fdisk and how to resume the recovery process can be found on http://www.fuw.edu.pl/~pliszka/hints/notebooks/.
  4. Locate a .bat file on the recovery dvd or virtual ram drive, that should resume the recovery process. So you then wait patientely as it transfers the entire winxp home system image with all the pre-installed software. Notice that on the progress screen, it will show that the target partition or disk has only 20GB.
  5. Boot windows normally, just to make sure you have your winxp home system working again.
  6. Boot your favourite linux install iso this time, and proceed with the installation as you would on a normal desktop pc.

My distribution of choice was knoppix, as it gives me a fully working Debian unstable/testing system in less than 10 minutes. So the following instructions may only appply to debian-based systems. (But well, you should easily figure out how to do them on your distribution)

Installing knoppix

  1. Boot the knoppix live cd. I used the latest 3.3 release.
  2. Make sure everything is working fine. Right out of this boot, i had ethernet and audio (not ALSA) working. X11 resolution will be at 1024x768, since knoppix doesn't seem to install nvidia drivers for you. Don't worry, you will have 1280x800 real soon.
  3. Open a root knoppix console (there is an icon on the kde panel for that i guess). Run the knoppix-installer script. (the one for installing knoppix into a hdd)
  4. Follow through the normal questions you'd expect on any linux install, and you should end up with a working knoppix system on the 20GB linux partition you defined on the 1st section. I decided to use ext3 as the filesystem for /.

Improving support

kernel

I compiled the latest 2.6.1 kernel available from www.kernel.org, and applied the -mm4 patch availble on this same page. Instructions for applying this patch is available at http://kerneltrap.org/node/view/875. You could take a look at my config file (there are instructions on the official kernel package on how to use old .config files when compiling your kernel. Mostly all you may need is a "make oldconfig") for this kernel.

Please notice that a lot of unnecessary modules are still included on this config, and should probably be removed. But all necessary ones for this toshiba model are there. Please email me with any suggestions.

At the time of this writing, the acpi extensions found on the phoenix bios of this M35 were not supported by the toshiba_acpi kernel module included on 2.6.1, but this patch will make it work. Download the patch and follow these instructions (assuming you have the mentioned kernel sources extracted to /usr/src and /usr/src/linux pointing with a symlink to the extracted kernel source tree).:

cd /usr/src/linux
cd drivers/acpi
patch -p0 < /home/rnc/downloads/toshiba_acpi_0.17-test1.patch

The patch above is now available on kernel 2.6.3-rc2.

Also take a look at the "X11, usb, mouse" section below for some other kernel fixes before building it.

Now compile your kernel with the usual "make bzImage modules modules_install", and don't forget to copy the resulting bzImage (/usr/src/linux/arch/i386/boot/) to /boot and re-run lilo.

Reboot the new kernel, and make sure you have a toshiba dir on /proc/acpi. Also keep in mind that you need to reinstall the nvidia driver everytime you compile a kernel.

toshiba utils

There are some toshiba utilities you should install from http://fnfx.sourceforge.net, in order to change the lcd brightness for example. All I did was download/install the debian package for fnfx, and make sure the fnfx daemon (fnfxd) runs automatically:

dpkg -i fnfx-0.2-1.deb

speedstep support

The .config file above would give you a kernel supporting intel's speedstep technology, but you'll need a daemon running on background collecting system load info and adjusting the processor speed as needed. And "powernowd" is the one responsible for that. What you should do:

apt-get install powernowd
mkdir /sys
echo "sysfs /sys sysfs defaults 0 0" >> /etc/fstab
mount /sys

wireless support

I haven't tested it yet. All i know is that linux won't support it natively, and INTEL will take a long time to release closed or opensource drivers. So you should try ndiswrapper (http://ndiswrapper.sourceforge.net/).

X11, usb and touchpad mouse support

Get the latest synaptics driver for X11 at http://w1.894.telia.com/~u89404340/touchpad/ . It should be a synaptics-version.tar.bz2 file. Uncompress and install it.

Take a look at my XF86Config-4 file. With this config, USB and touchpad with synaptics support will work simultaneously. There are some hacks on the net that will switch between 2 diferrent XF86Config files if you boot with the USB mouse plugged in or not. Google should assist you there.

This config should also contain a modeline for 1280x800 and truecolor, but i guess it will only work with nvidia drivers.

There are some issues with the touchpad: the keyboard will hang or delay when you press keys right after using the touchscreen. Follow the instructions on http://www.marcsaric.de/m30_linux1.html (search for "psmouse-base") to fix it. So note that you need to change psmouse-base.c as described on Marc Saric's howto before building your kernel.

nvidia driver

For kernel 2.6.1, i had to use the nvidia drivers from http://www.minion.de/ . After downloading the latest binary nvidia driver for 2.6.1, all i did was "sh NVIDIA-something.run", and an NVIDIA installer compiled/installed everything necessary. Latest official drivers from nvidia.com seems to support 2.6 kernels, so you are probably better off with official drivers.

Also, don't forget to set the proper driver on your XF86Config file. (Again, my config linked above does that for you)

missing serial port errors

Due to a bug on knoppix 3.3, or other Linux distros, a message (ttyS0: LSR Safety Check Engaged) would appear every few seconds on all terminals. To make that go away, as suggested by Karl Tallen (K.Tallen at gmx dot de), I had to remove /var/lib/setserial/autoserial.conf and run (as root) /etc/init.d/setserial. You should also remove the brtty package, because there is still a single error message (something like "device not found").

Further resources

No comments: