<?xml version="1.0"?>
<article><articleinfo><title>CompaqT1500-Linux HOWTO</title><author><firstname>Thomas</firstname><surname>Chiverton</surname><affiliation><address format="linespecific">falken@bigfoot.com</address></affiliation></author><revhistory><revision><revnumber>1.01</revnumber><date>2002-03-17</date><authorinitials>gea</authorinitials><revremark>Conversion to Docbook format</revremark></revision><revision><revnumber>1.0</revnumber><date>2002-03-11</date><authorinitials>tjc</authorinitials><revremark>LDP release</revremark></revision><revision><revnumber>0.85</revnumber><date>2001-12-13</date><authorinitials>tjc</authorinitials><revremark>Security hints. XFree.</revremark></revision><revision><revnumber>0.8</revnumber><date>2001-12-13</date><authorinitials>tjc</authorinitials><revremark>Kernel transfer problem fix (NFS null). General tidy.</revremark></revision><revision><revnumber>0.7</revnumber><date>2001-09-11</date><authorinitials>tjc</authorinitials><revremark>Much FLASHing and mounting notes added</revremark></revision><revision><revnumber>0.61</revnumber><date>2001-08-20</date><authorinitials>tjc</authorinitials><revremark>Tweak debian unpack notes. Add URL. Notes on re-FLASH</revremark></revision><revision><revnumber>0.6</revnumber><date>2001-07-28</date><authorinitials>tjc</authorinitials><revremark>Add example syslog output. Add in securetty changes</revremark></revision><revision><revnumber>0.5</revnumber><date>2001-07-28</date><authorinitials>tjc</authorinitials><revremark>Initial release for feedback, comments from community</revremark></revision></revhistory><abstract><indexterm significance="normal"><primary>Abstract</primary></indexterm><para>	Lists the procedures and tools needed to boot the Compaq T1500, using a Netboot of both the native file system and a generic Linux installation.
	</para></abstract></articleinfo><sect1 id="about"><title>About this guide</title><sect2><title>Purpose and scope</title><para>This document is aimed at the Linux enthusiast with an average level of knowledge. In particular you must be happy with configuring, restarting (or installing) new services.You will need a Linux server and (of course) a T1500.</para></sect2><sect2><title>Latest update</title><para>The most up to date copy of this document can be found at <ulink url="http://www.compsoc.man.ac.uk/~falken/T1500/">www.compsoc.man.ac.uk/~falken/T1500/</ulink></para></sect2><sect2><title>Feedback</title><para>Comments and feedback should go the the author listed at the head of the document.</para></sect2></sect1><sect1><title>Introduction</title><para>The T1500 is a Linux based diskless thin client, able to boot off internal FLASH RAM into X. It will acquire TCP/IP information from DHCP, and includes telnet and a WWW browser. In this configuration, the T1500 is useful as a small 
  Internet access device.However, the T1500 can also operate as a diskless client, acquiring it's initial 
  kernel and root file system from a remote machine (this uses 'TFTP' for the 
  1st stage, and 'NFS' for the latter). Compaq provide a CD with a kernel image 
  and root file system, along with management tools, but these tools are not needed, 
  and have been found to fail on some systems. This will be discussed in the 'Compaq 
  Way' section.</para><para>It is also possible to use the Compaq kernel to boot a normal Linux based distribution. 
  We use <ulink url="http://www.debian.org">Debian</ulink> as an example, but the process 
  is fairly generic, and discussed in the 'One True Way' section.</para><para>We will assume:
  A working DNS server on 192.168.1.1 (bookcase) and that this machine will serve 
  the kernel and file system
  The T1500 is to be installed as 192.168.1.52 (box).
  The domain is 'house'.
  No special routing is needed.
  In the examples a RedHat server is used, but the specifics should apply to any 
  GNU based system.</para></sect1><sect1 id="compaq"><title>The Compaq way</title><para>Create the directories for the kernel and file system on your server, mount 
  and copy the files from the Compaq CD. Unpack the file system:</para><screen format="linespecific">mkdir /exports/T1500 
mkdir /exports/T1500/root 
mkdir /exports/T1500/tftpboot  
mount /cdrom
cp /cdrom/product/vmlinux /exports/T1500/tftpboot
cd /exports/T1500/root
tar xvf /cdrom/product/netboot.tar</screen><para>Configure DHCP by adding a section like this to your /etc/dhcpd.conf</para><para>Change the ethernet address to that of your T1500.</para><screen format="linespecific">group {
   #little black box
   host box {
   	 hardware ethernet 00:80:64:10:1d:1c;
     fixed-address box.house;
     option host-name entboxent;
     server-name ent192.168.1.1ent;
     filename ent/exports/T1500/tftpboot/vmlinuxent;
     option root-path ent192.168.1.1:/exports/T1500/rootent;
     }
   }</screen><para>Configure a new host in DNS</para><screen format="linespecific">db.192.168.1.1:
52 in ptr box.
</screen><screen format="linespecific">db.house:
   box in a 192.168.1.52</screen><para>Export the root file system by adding</para><screen format="linespecific">/exports/T1500/root box(rw,no_root_squash)</screen><para>to</para><screen format="linespecific">/etc/exports</screen><para>Configuring tftp by adding/altering a line to /etc/inetd.conf</para><screen format="linespecific">tftp dgram udp wait root /usr/sbin/tcpd in.tftpd /exports/T1500/tftpboot</screen><para>Now restart inetd,dhcpd,nfs and named
Select the 'netboot' option on the T1500, and reboot.
The T1500 will now boot into something very similar to its normal O/S.
You may want to add</para><screen format="linespecific">exec /nor/Xbin/xterm ent</screen><para>as the penultimate line in</para><screen format="linespecific">/exports/T1500/root/root/.xinitrc</screen><para>and then logout and back in again, to get an xterm.</para></sect1><sect1 id="debian"><title>The one true way</title><para>We use the debian 'potato' (2.2) release as an example. The procedure should 
  be similar no matter which distribution you choose, providing it will run on 
  a 2.0.35 kernel.</para><para>Create the directories for the kernel and file system on your server, mount 
  and copy the files from the Compaq CD. Unpack the file system (Here I use some 
  pre-made tar balls of the debian release, here is not the place to discuss further):</para><screen format="linespecific">mkdir /exports/T1500 
mkdir /exports/T1500/root 
mkdir /exports/T1500/tftpboot</screen><screen format="linespecific">mount /cdrom
cp /cdrom/product/vmlinux /exports/T1500/tftpboot
CD /exports/T1500/root
tar zxvf /tmp/base2_2.tgz 
tar zxvf /tmp/telnetd*.tgz</screen><para>Configure DHCP by adding a section like this to your /etc/dhcpd.conf
  Change the ethernet address to that of your T1500.</para><screen format="linespecific">Group {
   #little black box
   host box {
   	 hardware ethernet 00:80:64:10:1d:1c;
     fixed-address box.house;
     option host-name entboxent;
     server-name ent192.168.1.1ent;
     filename ent/exports/T1500/tftpboot/vmlinuxent;
     option root-path ent192.168.1.1:/exports/T1500/rootent;
     }
   }</screen><para>Configure a new host in DNS</para><screen format="linespecific">db.192.168.1.1:
   52 in ptr box.</screen><screen format="linespecific">db.house:
   box in a 192.168.1.52</screen><para>Export the root file system by adding</para><screen format="linespecific">/exports/T1500/root box(rw,no_root_squash)</screen><para>to /etc/exports </para><para>Configuring tftp by adding/altering a line to /etc/inetd.conf</para><screen format="linespecific">tftp dgram udp wait root /usr/sbin/tcpd in.tftpd /exports/T1500/tftpboot</screen><para>Now restart inetd,dhcpd,nfs and named</para><para>Configure the file system by setting the root password to 'pass', exposing telnetd</para><para>/exports/T1500/root/etc/passwd, alter 1st line: root:Z/U2u32VhNJoA:0:0:,,,:/root:/bin/bash</para><para>/exports/T1500/root/etc/inetd.conf, add: telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd</para><para>Append remote terminals to /etc/securetty to allow remote root access.</para><screen format="linespecific">tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
tty12
ttyp0
ttyp1
ttyp2
ttyp3</screen><para>Select network booting on the T1500 and reboot it.</para><para>Once it has booted, you should be able to telnet into the T1500. At ths point, 
you shoudl configure SSH, and close the telnet hole in inetd.</para></sect1><sect1><title>Editing FLASH image and other tools</title><sect2><title>Editing Flash image</title><para>The T1500s come with a utility called 'makeflash' (which lives in /sbin and 
  also comes on the CD). You can use this to generate a flash filesystem image 
  from a tar.gz, which can either be local, or an NFS / SMB file. This utility 
  generates all the necessary checksums too.</para><para>1. Flashing with a Slackware 8.0 image doesn't work, even with the calculated checksum. This suggests to me that there is a further check made on vmlinux itself.</para><para>2. Having dissected the leo.boot and vmlinux files supplied with the unit, 
  I
  suspect that leo.boot checks vmlinux for the string entxxxxyyyyWYSEwysexxxxent
  which is duly included in the custom kernel they use.</para><para>3. Leo.boot is in fact a Win CE related thing, with a queer bolt-on to allow
  linux boots. The normal Win CE leo.boot is about half the size. It uses
  the Eboot protocol for both ethernet and parallel port flash programming.
  There are some free Linux tools available to format images correctly for
  replacing leo.boot and also the OS image, but they rely on you supplying a
  suitably compiled object version of the bootrom.</para><para>Be careful when running it though - it is possible to flash the thing to a 
  state in which the only way to get it booting again is to use the Wyse-provided 
  DOS util / laplink cable setup.</para><para>Also, if anyone manages to get makeflash running on something which isn't the 
  terminal, could you let me know how? AFAICT, it's trying to link with a very 
  old glibc and libforms.You should be able to flash-update the T1500 a few 100,000 times.</para><para>Apparently the T1500 is a Wyse WT3X15, based on what they call the 'Leo Board'. 
  You can download a DOS reflashing util, and some docs for it from the UK Wyse 
  website, in the Customer Support section's firmware page. It requires a parallel 
  laplink cable.</para></sect2><sect2><title>Mounting FLASH</title><para>After running the mknod commands below, you can then mount /dev/fnand and /dev/fnand1, which are both 16Mb flashfs partitions. You can also mount /dev/fram, and write 
to it, however the data disappeared after umounting ent remounting. It may have 
use as swap space.</para><screen format="linespecific">mknod /dev/fcard b 63 0
mknod /dev/fcard.fmt b 63 128
mknod /dev/fcard1 b 63 1
mknod /dev/fcard1.fmt b 63 129
mknod /dev/fnand b 62 0
mknod /dev/fnand.fmt b 62 128
mknod /dev/fnand1 b 62 2
mknod /dev/fnand1.fmt b 62 120
mknod /dev/fnor b 65 0
mknod /dev/fnor.2m b 65 128
mknod /dev/fram b 64 128</screen></sect2></sect1><sect1><title>XFree86</title><para>To boot up into XFree86, grab and install the normal XFree packages.
  Grab and install the XF86Config file from <ulink url="http://www.compsoc.man.ac.uk/%7Efalken/T1500/XF86Config">http://www.compsoc.man.ac.uk/~falken/T1500/XF86Config</ulink>.
  Use a line like</para><screen format="linespecific">xinit -- -bpp 16 ent</screen><para>In rc.local (or your distributions equiv.) to start it up automaticly.
  To do the safe thing and run X as a user, create the user and use something 
  like the following to start and stop it (I placed this in the init.d dir. and 
  linked from rc.4). Change 'mplayer' on line 5 to your username.</para><screen format="linespecific">#! /bin/sh 
case "$1" in 
start)
	echo -n "Automatically logging into X" 
	su -c 'cd ~mplayer entent xinit -- -bpp 16' - mplayer ent 
	echo "." 
	;; 
stop|restart) 
	;; 
*)    
	echo "Usage: /etc/init.d/mplayer {start|stop|restart}" 
	exit 1 
esac 

exit 0</screen></sect1><sect1><title>Trouble Shooting</title><para>The servers log file (/var/log/messages) should contain hints as to where you've 
  got to in the boot process, as it should log TFTP transfers, NFS mounts etc. 
  If not, add</para><screen format="linespecific">*.* /var/log/messages</screen><para> to</para><screen format="linespecific">/etc/syslogd.conf</screen><para>and restart syslog</para><para>tcpdump allows you to see what packets are being transfered, and their NFS 
  filenames.</para><screen format="linespecific"> tcpdump -i eth0 -s 500 host box</screen><para>Your output from syslog should resemble:</para><screen format="linespecific">Jul 24 21:37:00 bookcase dhcpd: DHCPDISCOVER from 00:80:64:10:1d:1c via eth0
Jul 24 21:37:00 bookcase dhcpd: DHCPOFFER on 192.168.1.52 to 00:80:64:10:1d:1c    via eth0
Jul 24 21:37:04 bookcase dhcpd: DHCPREQUEST for 192.168.1.52 from 00:80:64:10:1d:1c    via eth0
Jul 24 21:37:04 bookcase dhcpd: DHCPACK on 192.168.1.52 to 00:80:64:10:1d:1c    via eth0
Jul 24 21:37:04 bookcase tftpd[5003]: tftpd: trying to get file: /exports/T1500/tftpboot/vmlinux
Jul 24 21:37:24 bookcase mountd[4853]: authenticated mount request from box:600</screen><para>Your tcpdump output should look like (when idle):</para><screen format="linespecific">17:31:41.450000 box.8022008 ent bookcase.nfs: 116 lookup fh Unknown/1 entinitctlent
17:31:41.450000 bookcase.nfs ent box.8022008: reply ok 128 lookup fh Unknown/1</screen><sect2><title>Intermittent kernel transfer problems (NFS null)</title><para>There is a known problem which occasionally causes the T1500 to fail to reboot, 
  apparently because it fails to tftp the kernel after the reboot. A tcpdump of 
  this happening will resemble:</para><screen format="linespecific">12:04:38.506153 box.2049 ent bookcase.house.tftp: 39 RRQ "/exports/T1500/tftpboot/vmlinux"    
12:04:38.556153 bookcase.house.1199 ent box.2049: udp 516 
12:04:38.556153 box.2049 ent bookcase.house.1199: udp 4 
12:04:38.556153 bookcase.house.196610 ent box.nfs: 516 null 
12:04:38.556153 box.2049 ent bookcase.house.1199:    udp 4 
12:04:38.556153 bookcase.house.196611 ent box.nfs: 516 null 
12:04:38.556153 box.2049 ent bookcase.house.1199: udp 4 
12:04:38.556153 bookcase.house.196612 ent box.nfs: 516 null 
12:04:38.556153 box.2049 ent bookcase.house.1199:    udp 4 
12:04:38.566153 bookcase.house.196613 ent box.nfs: 516 null 
12:04:38.566153 box.2049 ent bookcase.house.1199: udp 4 
12:04:38.566153 bookcase.house.196614 ent box.nfs: 516 null 
12:04:38.566153 box.2049 ent bookcase.house.1199:    udp 4 
12:04:38.566153 bookcase.house.196615 ent box.nfs: 516 null</screen><para>You will then see a syslog entry from tftp indicating that it is sending the 
  kernel, but no packets are exchanged. ARP requests go unanswered.</para><para>This can be resolved, but if you have your T1500 headless in a corner, is a 
  PITA.
  Connect a monitor, keyboard and PS/2 mouse if not present.
  Reboot the T1500, and press 'L' after the 1st beep.
  The T1500 will now boot focally. Change the boot mode to 'Local' (Start-entSystem 
  menu) and reboot.
  Change the boot mode back to 'Network'</para></sect2></sect1><sect1><title>Pending projects</title><para>Edit / re-flash FLASH</para><para>PCMCIA usage - probably needs the next item :-)</para><para>Custom kernel (TFTP loader looks at checksum / WYSE string)</para><para>Text mode console</para><para>SSH / SSHd / gcc for Compaq file system (should be easy to copy once compiled 
  on custom FS)</para></sect1><sect1><title>Contributors and thanks</title><para>[incomplete, real names needed too]</para><para>Cez</para><para>John Topper</para><para>Grapham Wood <email>rauxon@compsoc.man.ac.uk</email></para><para>Mike Sparks</para><para>James Mulcahy</para></sect1></article>

