|Debian's Sarge gnu/linux on Toshiba M40X-317|
This document, mostly written in November 2005, intends to describe the installation of Debian Sarge onto a Toshiba M40X-317 laptop.
I focused on details that were tricky or unusual ; this document isn't a step by step installation guide for beginners, rather it should help people having matching hardware to tune their debian (or most linux) setup.
The M40X family at Toshiba's is fairly rich and spread : at almost the same price and same time, when trying to choose the best one, I met some with Celeron others with Pentium-M, some with i915 video chipset, others with ATI Radeon X200 (PCI express ?).
So, at first here's the lspci output (after updating the lspci database with (8) update-pciids) matching my machine :
I must say that aiming for stability, I choosed the i915 machine, that also had 1Gb memory and also an Intel(R) Pentium(R) M processor 1.60GHz, rather than the ATI that was (is ?) not yet supported, even by the close-source drivers supplied by the manufacturer.
My plan was to set a 5Gb partition for the original windows settled on the machine, and everything else for Sarge. If you intent to have only linux on the machine, you can simply partition the disk at your will and skip this step.
The only fast way I found, since I had nothing to preserve on the disk, was to first divide it with the proper sized partitions and to restore the window partition by using the restore disk supplied. The main trick was that the supplied restauration-disk kept erasing the partition table if the first partition wasn't for window, so finally the only attempt that worked was :
Now, we have a laptop that boots the Windows correctly, and free partitions on which to install Debian. Later-on I'll have to update c:\boot.ini in order to dual boot with Sarge.
Nothing particular to say about installation, every needed hardware was detected and useable during the installation simply, do not miss the next step if you're sharing the machine winth windows, before the reboot at the end of installation.
I couldn't install grub or lilo onto the master boot record -it belongs to windows- so I installed it on the second partition
boot sector. In order to boot back on Debian after installation, before rebooting the machine, I saved that boot sector on another
machine via the network. To generate that small file I simply used dd :
I couldn't manage to read or write on a usb key at this step of installation. Maybe with more knowledge about kernel usb modules I could perform it ? For people who don't have another network machine, it might be wise to have a small regular fat32 partition in order to share the content of that file, since there is no floppy with the laptop.
The next step is to tell windows' boot to offer us a chance to reach the linux loader :
The Toshiba has a nice wide screen, but the default X11 in debian needs some tuning in order to use it.
Aiming to get the nominal 1280x800 resolution of the screen I fisrt installed the vesa driver for X11. By
using dpkg-reconfigured xserver-xfree86, I re-configure the XFree86 server, I choosed vesa,
auto-detected the mouse, enabled the third button emulation, used advanced monitor detection and supplied those
dumb values (I call them dumb because they may cause troubles to the screen if used with silly settings.
One should try to reduce those to a safer clock range) :
Yet the result is still only 1024x768. I had to create a new Monitor entry in /etc/X11/XF86Config-4 to be able to reach 1280x800 (taken from another i915 laptop page) :
Here's the complete XFree86-4-vesa.
Though debian's kernel is very ok, it might not be fresh enough to get every recent hardware up and on line. I switched to linux-126.96.36.199 (note (02/01/2006) : this step might as well be merged with the next paragraph) and used this setup : most of the hardware is detected, still I need some more time to fully state that the hardware is ok.
The main reason for switching to a recent kernel is for getting an i915 agp module in, so that some 3D acceleration can be set, via direct rendering (DRI).
Here's the .config I used.
I also appended idebus=66 in my kernel boot param by adding it to lilo.conf. Some more tunings with hdparm
should probably be welcome, I'll dig that soon.
A few month later, I struggled a little bit with hdparm because I really had the feeling the discs were too slow, and I realised that the machine doesn't use the ICH6 as an ide controller, but rather as a Serial-ATA controller. So toggling libata support in the kernel (in the scsi part of drivers) brought a huge performance improvement : about 30MB/s instead of 3MB/s when transfering datas from hard-disk !
The tricky point was that the generic EIDE support from kernel was able to show the disk during installation though it's support wasn't optimal. Now, when we switch from ide to SATA support, we have to rename every references to the disks, since /dev/hda is now seen as /dev/sda...
I had to change /etc/fstab and /etc/lilo.conf. Both changes are very tricky, so backup each modified file before modification, and verify you have a complete independent way of booting back the machine, with knoppix for example.
The .config for linux-2.6.15.
In order to see the DVD through SATA, I had to tell libata to take care of ATAPI devices, so now my entry in lilo.conf is like this :
Sarge doesn't include Xorg (yet ?), so I downloaded some Xorg backports from Debian Backports, (they used to be there). After asking aptitude to install xserver-xorg and all new packages needed, I configured the Xorg server by asking i810 driver, told there were 128000 kilobytes of memory, the i810 driver isn't aware about kilobyte and uses bytes instead.
After tweaking the Modeline section the same way as X11 vesa driver, I managed to get some decent 3D acceleration with that card. Tuxracer is playable, but it doesn't compare with my Nvidia Ge4200.
Here's the corresponding xorg.conf.
The Intel wireless component of the m40x has support shipped with recent kernels, but still needs a firmware supplied and locked by Intel. Read the /usr/src/linux/Documentation/networking/README.ipw2200 supplied with kernels to learn more about it.
In short : I had to compile ipw2200 as a module rather than a build-in feature so that the firmware would load properly at init-time. The firmware also have to match the release number of the ipw2200 driver supplied with the kernel. For example, when writting those lines, I'm using firmware 2.4 matching the 1.0.8 relase of ipw2200 that is supplied with 188.8.131.52 kernel...
For filsystem firmware location, unzipping the firmware into /lib/firmware does the trick.
The machine is now fairly useable, I still have to validate a lot of hardware in it, but the first goal : getting a decent cheap 3D laptop working with linux, is reached.
Please, feel free to mail me comments, and also to come back soon : I'll update this page as soon as I can provide rock-solid statements about the M40X's components.
|updated January 3rd 2006 - Jean-Daniel Pauget|