Installing Gentoo Linux on the D900T(v) portable

(C)2005 by Frits Jalvingh, jal at-sign mumble dot to
Free for all use.

Version: 1.0 of February 20, 2005


This portable is a Clevo D900T which is sold under different brand names like Promedion, Sager and the like. This machine is awesome! It's specs are:

And some small bells and whisles.

To get this machine installed using Linux was a bit of a pain.. And since I like pain I installed the machine using Gentoo.

Base installation

This machine has a Promise 20378 Semi-RAID controller. This controller has both SATA and PATA connections for the embedded harddisks. My model came with 2x a PATA harddisk and sadly the 20387 Linux driver did only support SATA until kernel 2.6.10. So to get this to work you need to install with something having a kernel >= 2.6.10 and with the full driver set compiled. The driver you need is the 20278 driver in the SCSI section of the kernel setup. Lucky for me the new Gentoo 2005.0 beta live CD used that kernel and has the driver aboard ;-)

Before starting the install use the BIOS setup to set the controller to ATA mode, not RAID mode. The controller is a software RAID controller and that is not supported (as it is rather useless) by Linux. We will use RAID on the machine but by using mdraid.

Download the 2005.0 LiveCD (minimal install or whatever) and burn it. Have the Gentoo installation instructions on paper next to you ;-) Boot from this CD.

Installing software RAID

We must start by partitioning the harddisks. When booting with the LiveCD the card reader is seen before the harddisks. This means that using the LiveCD your harddisks are /dev/sdb and /dev/sdc. After installation these will be sda and sdb as usual. We start by partitioning the harddisks. I partitioned them both exactly the same, as follows:

fdisk /dev/sdb

Repeat the exact same steps for sdc. The post important part is the creation of partition 3: this must be exactly the same size on both disks.

Now for the hard part.. We need to create /dev/md0, which is the name of the combined RAID disk. For some reason the device nodes for these thingies are not created so we do that by hand:

mknod /dev/md0 b 9 0
mknod /dev/md1 b 9 1 (if needed)

Now load the software RAID modules. I use RAID0 (striping) so:

modprobe md
modprobe raid0

To create the RAID volume we need to create /etc/mdadm.conf on the LiveCD's /etc directory. Use nano /etc/mdadm.conf and put the following in it:

DEVICE /dev/sdb3 
DEVICE /dev/sdc3 
ARRAY /dev/md0 devices=/dev/sdb3,/dev/sdc3

Now create the RAID volume using sdb3 and sdc3:

mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sdb3 /dev/sdc3

You can check if the array creation worked by doing

cat /proc/mdstat

which should show something like:

Personalities : [linear] [raid0]
md0 : active raid0 sdb3[1] sdc3[0]
      115796352 blocks 32k chunks


Now proceed with the Gentoo installation, installing a 2.6 kernel. BUT READ THIS DESCRIPTION FIRST as you need to return here a few times during installation. Please remember to use /dev/md0 for all steps that specify the root partition.


Return: before chrooting into /mnt/gentoo

Before the chroot step copy the /dev/mdadm.conf file to /mnt/gentoo/etc


Return: creating /dev/fstab

The fstab we use looks like:

/dev/sda1               /boot           reiserfs        noauto,noatime  1 1
/dev/md0                /               reiserfs        noatime                 0 0
/dev/sda2               none            swap            sw              0 0
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro               0 0
#/dev/fd0               /mnt/floppy     auto            noauto                  0 0
none                    /proc           proc            defaults                0 0
none                    /dev/shm        tmpfs           defaults                0 0


Please replace the 'reiserfs' entries with the filesystems you used.


Return: configuring and installing a kernel

Do this by emerging genkernel and gentoo-dev-sources instead of gentoo-sources. While configuring the kernel you need a proper .config file which can be found in here. The highlights are:

Enable Promise 20287 controller in Device Drivers / SCSI and compile INTO the kernel (not as a module)

Enable ALSA in the kernel and do not enable OSS

See the .config file for more (I will extend on this later)


Return: installing grub

You install grub as usual on /dev/sdb, using /dev/sdb1 (hd0,0) as the boot partition. My menu.lst in /boot/grub looks like:

# Boot automatically after 10 secs.
timeout 10

# By default, boot the first entry.
default 0

splashimage (hd0,0)/boot/grub/splash.xpm.gz

# For booting Linux
title Linux 2.6.10
root   (hd0,0)
kernel (hd0,0)/boot/kernel-2.6.10-gentoo-r6 root=/dev/ram0 init=/linuxrc real_root=/dev/md0 ramdisk=8192
initrd (hd0,0)/boot/initrd-2.6.10-gentoo-r6


Please replace the kernel and initrd filenames with the names in /boot generated by genkernel.


After this you should have a bootable base system. To go on just follow the Gentoo procedures to get a workable graphics workstation: emerge things like xorg-x11, kde etc etc. The configuration for x11 etc can be found here.


Configuring X11

Since the “suicide by license” (license to kill??) of XFree86 most distributions use Xorg as their X11 environment. At this point however both versions are mostly similar. By replacing some of the filenames you can configure a XF86 environment with the same configuration presented here for Xorg.

Start by configuring X11 as usual, by xorgconfig (XF86config) or whatever. Configure a standard machine. Then edit the generated xorg.conf (XF86Config).


A working xorg.conf for the machine is in here. We need to fix things to get the full native resolution of 1680x1050 on the LCD screen, and we need the mousepad to work like it is supposed to do.


To get the screen to work you need the following modelines specified in the /etc/X11/xorg.conf:

Section "Modes"
    Identifier "16:10"
    # 1680x1050 @ 60.00 Hz (GTF) hsync: 65.22 kHz; pclk: 147.14 MHz
    Modeline "1680x1050"  147.14  1680 1784 1968 2256  1050 1051 1054 1087
    # 1680x1050 @ 75.00 Hz (GTF) hsync: 82.20 kHz; pclk: 188.07 MHz
    Modeline "1680x1050"  188.07  1680 1800 1984 2288  1050 1051 1054 1096
    # 1680x1050 @ 85.00 Hz (GTF) hsync: 93.76 kHz; pclk: 214.51 MHz
    Modeline "1680x1050"  214.51  1680 1800 1984 2288  1050 1051 1054 1103
    # 1680x1050 @ 100.00 Hz (GTF) hsync: 111.20 kHz; pclk: 256.20 MHz
    Modeline "1680x1050d"  256.20  1680 1808 1992 2304  1050 1051 1054 1112
EndSection

As far as I can see only the mode 1680x1050 @ 60.00HZ is used.


The Monitor section should look like:

Section "Monitor"
    Identifier  "LCD"
    DisplaySize 426 266
    HorizSync   31.5-100
    VertRefresh 30-90
    Option "dpms" "on"
    UseModes "16:10"
EndSection


The DisplaySize specified is not correct but forces a DPI setting of 100x100DPI which I find very comfortable. Please note the reference to the ModeLine's we've added.


Finally the display driver section:

Section "Device"
    Identifier  "Card0"
    Driver      "nvidia"
    BusID       "PCI:01:00:0"
    Option "IgnoreEDID" "true"
    #VideoRam    131072
    # Insert Clocks lines here if appropriate
EndSection

The Option “IgnoreEDID” “true” in the device section for the graphics card is needed because the LCD display reports a max. hsync of 64KHz. This forbids the use of the working modeline which uses 65.22KHz..


After these changes the display should come up proper in 1680x1050. To check execute xdpyinfo at a command prompt.


Another thing to configure is better mouse support. The machine uses a Synaptics touchpad with a scroll region. There is a driver for this but it is not in the root xorg tree. If you use gentoo you can emerge this driver using emerge synaptics. Other distributions can download the source from http://w1.894.telia.com/~u89404340/touchpad/ and compile/install it as per the instructions.


Change the xorg.conf file and install the mouse modules:

Section "InputDevice"
  Identifier    "mousepad"
  Driver        "synaptics"
  Option        "Device"        "/dev/psaux"
  Option        "Protocol"      "auto-dev"
  Option        "LeftEdge"      "1700"
  Option        "RightEdge"     "5300"
  Option        "TopEdge"       "1700"
  Option        "BottomEdge"    "4200"
  Option        "FingerLow"     "25"
  Option        "FingerHigh"    "30"
  Option        "MaxTapTime"    "180"
  Option        "MaxTapMove"    "220"
  Option        "VertScrollDelta" "100"
  Option        "MinSpeed"      "0.09"
  Option        "MaxSpeed"      "0.18"
  Option        "AccelFactor"   "0.0015"
  Option        "SHMConfig"     "on"
#  Option       "Repeater"      "/dev/ps2mouse"
EndSection


Do not forget to change the reference to the mouse in the CorePointer line.

A very nice module to configure the mousepad after it's been installed is the ksynaptics (or qsynaptics) package which can be obtained from http://qsynaptics.sourceforge.net/. This module gives you a kcontrol panel to configure the touchpad panel.


Configuring audio

The audio driver needed is the azx driver. This is part of the newest alsa drivers. In a gentoo system emerge alsa-driver and the rest. This will compile a newer set of Alsa drivers than the ones present in the kernel tree. Then change /etc/modules.d/alsa to have the line

alias snd-card-0 snd-azx

and do a modules-update.

Other distributions should put this line (and all other lines required for alsa) in their /etc/modprobe.conf or equivalent.


Getting wireless to work

The wireless card in the machine is a INPROCOMM 2220 card. This is a combo 802.11G (Wifi) and Bluetooth card. Since I do not use Bluetooth I have no info on that. The WLAN driver can be configured using ndiswrapper. The following part is very gentoo-centric because it is very different on other distributions.


Start by obtaining the Windows drivers for the wireless module. These come from the CD or can be downloaded in here as w900t-wireless-driver.tgz. We need the *.sys, *.cat and the *.inf files. Place these somewhere on the machine, say /home/xxx/inf

We also need the wireless tools.

So: install ndiswrapper etc and make it use the drivers:

emerge ndiswrapper
emerge wireless-tools
ndiswrapper -i /home/xxx/inf/neti2220.inf


Add the following lines to /etc/modules.d/ndiswrapper:

alias wlan0 ndiswrapper


To check if the card works you can use:

modprobe wlan0
iwlist wlan0 scan
iwconfig


This should show a list of access points and networks and the configuration for wlan0, the wireless card.


Do not forget to make sure the wireless card is powered on by using the FN+F11 key until the wireless light is green. Disable the Bluetooth thing using FN+F12.

We now have a driver but wireless networking on Gentoo at this time (feb 2005) is not present in the basic Gentoo installation. To get it to work we have to emerge a baselayout >=1.11.9 as follows:

ACCEPT_KEYWORDS=”~x86” emerge baselayout


Update the config files (etc-update) and edit the configuration files /etc/conf.d. The files needing a change are wireless and net. Descriptions on their use are specified in the examples.

The baselayout I used had a bug in the hotplug script. To fix this patch the /etc/hotplug/net.agent script with the following net.agent.patch contained herein

cd /etc/hotplug
patch </home/xxx/net.agent.patch


This fixes the “dhcp already running” boot message which prevents the driver from getting an IP address.