home

Howto: Debian on the TC1000

I like Debian, so I use it. Most of what I document here will translate easily to other machines, but beware paths may differ if you've got a different distro.

Step -1: Materials

- 1 Compaq TC1000T100X030C25T US
  - 256MB RAM
  - 30GB Disk
  - No wireless
- 1 USB multi-bay
- 1 CD-RW/DVD drive for said multi-bay
- 1 floppy drive for said multi-bay
- 1 3COM Ethernet PCCard
- 1 Helper computer for web surfing.
- A list of my current debian packages
- A list of my current bootup modules modules

Step 0: Strategy

My goal is to be dual-booting Windows XP Tablet PC Edition with Linux. I want to re-partition the single disk to allow this. I was not "moved in" to the Windows side, so data loss wasn't going to be an issue. However, given that I can only install from a destructive recovery CD, I decided I had to do a non-destructive resize of the NTFS filesystem.

Next is to install Debian, I burned a "minimal" CD, so I could install most packages off the net. I got an image from LordSutch.com (woody-i386-1.iso).

Step 1: Re-partition

The first challenge was resizing the partition, especially given my boot configuration: usb floppy OR a usb cd-rom with a usb keyboard (except for a couple keys on the side, which aren't usb).

I found an NTFS resize tool for linux with a statically linked version here. I dropped this on a floppy disk (about 500K, os it took half a floppy, fdisk might be handy on here too, I can't find one right off hand).

Once I booted the CD, I found I couldn't access the CD-ROM any more or use the floppy drive to run ntfsresize, all I could do was use the keyboard (a big plus).

I then realized USB support in the kernel was a necessity. I dug out a floppy for my firewall (I boot a little floppy based distro on my laptop for ultra-low power usage, no spinning disk). I then built a custom kernel on my spare machine and copied it to my floppy (use rawwrite or dd, look at the Debian install docs if you need help making a floppy image).

Once this boots up, umount /floppy and then mount the floppy with ntfsresize. Run ntfsresize as described by their FAQ.

Next is resizing the partition. I didn't have fdisk on a floppy, so I booted the CD-ROM mentioned above. I then deleted /dev/hda1 and recreted it with a partition size slightly larger than the new filesystem to be safe. At this time I created my new partitions (all in one extend partition): /dev/hda5 (swap 512MB) /dev/hda6 (/ 512MB) /dev/hda7 (/usr 50%) /dev/hda8 (/home/shared 50%). /home/shared was intended to be a FAT32 partition for OS shared files (the bulk of what would be my home directory).

Next, I boot windows to be sure I didn't break it.

Step 2: Installing Linux

Now I need to install linux, but we couldn't access the cd-rom to copy files, so while I'm in windows I copy the contents of the cd-rom to /dev/hda8 (I formatted this in windows too, and made it my d: drive).

So, now I boot the CD-ROM and start the installation. When asked for the source of the files to copy, use an 'unmounted drive' and tell it to look at /dev/hda8.

Everything should proceed happily. However, I couldn't get the Ethernet driver to work (the CD doesn't have the e100 driver). I used an old 3com card I had, so I did most of the initial install using the 3com card.

I installed the longrun package for Transmeta support. I found that I needed version 0.9-7 from debian unstable for it to work.

Step 3: Making the system bootable

Temporarily: I used grub on a floppy. I don't remember how to set this up. You can also boot with the CD, at the boot: prompt, you should be able to enter linux root=/dev/hda6 and get your system to boot.

Long term: I found a site with instructions, which uses GRUB and the windows boot loader. It works well for me. Here's my menu.lst

Step 4: Building a Linux Kernel

I use Debian's kernel package tools. I installed the 2.4.20 kernel source package, plus the pcmcia-cs-src, nvidia-kernel-src and nvidia-glx-src packages for driver support.

cd /usr/src untar the files there, you should have a kernel-source-2.4.20 directory and a modules directory. cd kernel-source-2.4.20 and make-kpkg kernel_image && make-kpkg modules_image . Here's my .config file. The important modules here are e100 Ethernet driver, usb, SCSI and ide-scsi emulation (for USB devices/Compact Flash). I also would include mtrr & cpuid so you can use longrun. You also might want ACPI support (not APM, it didn't work for me) so you can do sleep/suspend and the power button does a clean shut-down. I use devfs too, so it may be easier to follow me if you do too.

Build nvidia-glx cd nvidia-glx ; make -f debian/rules binary-arch

Install the packages (all 4, maybe do the kernel first by itself).

It is worth it apply the latest acpi patches. These may be obtained from the linux acpi project team at source forge. I used a kernel.org source package and applied the acpi patches to this, rather than the debian kernel-source, which had trouble with the patches.

Step 5: Installing X

Easy, take my XF86Config-4 (don't have debconf do it for you). I've also go other config files for different monitor configurations. 1280x1024 on external monitor (small portion on LCD) 2304x1024 accross both monitors (1280x1024 + 1024x768, with the LCD scrolling up and down to make 1024 vertically).

Step 6: Turning everything else on

Internal NIC: already working with e100 driver, I'm trying the laptop-net package from debian and found it works best with the pump package, not the dhcp-client package.

Sound: the via82cxxx_audio driver from the 2.4.20 kernel works for me.

Transmeta Longrun: install the longrun package, read the man page.

USB mouse/keyboard: already working, hotplug package is installed (from original install), plus usb drivers from the kernel. X uses /dev/input/mice

USB CD-ROM: already working.

USB floppy: already working, though I had to be sure I had all the SCSI modules loaded, list coming.

Compact Flash: already working with PCMCIA support and SCSI modules including ide-scsi emulation.

Pen: work in progress. fpi2002-0.1.tar.gz Extra Keys: used xmodmap file below, must run xmodmap .xmodmaprc at start (with .xsession or something).

Step 7: Docking/Undocking configurations plus Portrait mode

I decided I wanted an "easy" switch from a docked setup with my external monitor and an "undocked" setup with only the LCD. I also wanted to run the longrun tool with performance settings for the "docked" profile and not for the "undocked" profile. I decided that UNIX runlevels were the answer (this is why you see what you do in the menu.lst) You pick a runlevel at boot by putting the number as a parameter. Debian defaults to 2, which I chose as my 'docked' profile, the menu.lst shows the others.

I installed two scripts in /etc/init.d : longrun and xsetup. Longrun will turn on power save features when started, and turn them off when stopped. I also have this run hdparms to set the disk turn-off timeout. I installed this to run under runlevel 2 and stop when leaving runlevel 2. The xsetup copies a file named /etc/X11/XF86Config.N to /etc/X11/XF86Config, where N is the runlevel (hence the numbering on the config files above). I run this for run levels 2-4, and not 5. 5 is my multi-user no X profile, I don't start kdm there either. I use ksysv from KDE to set these up. Otherwise you just need to setup symbolic links from /etc/rcN.d to the script with S (for start) or K (for kill at shutdown) as the first letter, sort order determines run order.

The result is when I boot, I pick GRUB from the windows menu, then pick Linux Undocked/Linux Docked 1/Linux Docked 2/ Linux Docked no X from the GRUB menu. It boots up with my display configuration.

I also worked on portrait mode. This requires the xfree86 nv driver. I also found that the nvidia-glx stuff got in the way. Icons also didn't display properly for me in kde. I used this XF86Config-4 file.

Step 8: Pen/Digitizer

Frank Bruno helped tremendously on this front, and did most of the work.

The first step is to turn on the serial port used to communicate with the digitizer/pen. You need Frank's driver, it includes documentation for installation.

The second part is the driver for X windows. Frank found that the Fujitsu Stylistic driver works with this FinePoint Innovations digitizer. I found binaries and source at http://linuxslate.com/. I've got a copy of the drivers I grabbed here. I copied the _drv.o file to /usr/X11R6/lib/modules/input/. Then you need to add the appropriate lines to your XF86Config-4 file. There's now a driver for the TC1000 that Frank Bruno and I developed, it has the option to have the second mouse button work as in windows only when both buttons are pushed plus rudimentary support for the buttons on the side of the screen. More information here

The next hard part is calibration. I found a tool that worked for me at the linuxslate site. It's fpitcal.c. Just do make fpitcal in the directory with the source, the default make rules work. I had to change it to look at /dev/ttyS0. Run this WHILE you've got X running and with the pen turned on, I think you need some initialization to happen. I got the best results if I made sure to keep the pen withing the viewable area of the screen, i.e. don't move it around the sides when you go corner to corner. Also, it worked better when I kept the pen perpendicular to the screen, don't hold it at an angle like you were writing.

To re-compile the drivers you need to get the X source and start building it then copy the source into the source tree and build in the driver directory.

The last step was to get handwriting input. I got the xstroke package from debian. I had trouble with it crashing due to an infinite loop processing regular expressions in the alphabet file, I fixed it in this alphabet file. I also had trouble with the /usr/share/doc/xstroke/xstroke-help.html, I had to fix the <TITLE> tag

Step 8: On-screen keyboard in kdm/xdm/gdm

Get the keyboard app xvkbd (there's a debian package for it). Edit the kdm/xdm file Xsetup, add the line /usr/X11R6/bin/xvkbd & to the end, just before exit 0. When you start kdm/xdm next you should see a keyboard. You may want to add -geometry options (see man X) in the Xsetup file to place the keyboard in a better location. This still requires work to get it to go away after login.

Misc. Info

/proc/cpuinfo
/proc/ioports
/proc/interrupts
/proc/pci
/proc/modules

home

Copyright 2003 Michael Rolig

Valid HTML 4.01!