CREATING A THIN-CLIENT FOR THE WINDOWS ENVIRONMENT USING "THINSTATION" Author: Paolo Salvan (psalvan AT users.sourceforge.net) Company: XVision, Italy - www.xvision.it Last update: 2004/05/14 ______________________________________________________________________________ Our main target is to reconvert an old pc (a Pentium is perfect... but a 486 can also work) in a thin-client for Windows Terminal Services, Citrix ICA, X or VNC in less time as possible (30 minutes should be enough to setup everything), using only a Windows server without requiring additional boot-servers or "build-box"... The pc to reconvert in a thin-client has no need of an internal storage (no hd, no cd-rom... the floppy drive is useful only for booting, but you can replace it with a ROM mounted on the network card...), because all the necessary sw (the "boot image") will be loaded from the network and stored in ram (btw, 32-64Mb in the thin-client are enought to keep everything). In our network boot procedure, the thin-client: - boots-up, using the floppy disk - looks in the local network for a DHCP server in order to get - his own IP address - the TFTP server IP to download the boot-image from - the boot-image name - downloads from the TFTP server the boot image - downloads a config file - starts the terminal sw In the following description we will explain how to create the floppy disk to boot the thinclient (this floppy is all you need at client-side!) and how to configure on server-side some standard services to implement the DHCP and the TFTP server we need at boot-time; the thin-client boot image will be a pre-built image from the 'ThinStation' project. Before starting, download and uncompress from the "Download -> Prebuilt images" section of http://thinstation.sf.net the following file: Thinstation-2.1.1-prebuilt-NetBoot.zip ______________________________________________________________________________ Creating the thin-client boot-disk Insert a clean and formatted floppy in your drive, go inside the 'BootDisk\' folder and double-click on "BuildFloppy.bat" Finish. This smart boot disk contains more than 30 NIC drivers (nearly all the most common ISA and PCI NIC going around), hopeful yours also... ;o) Note: PCMCIA or USB network cards are not supported! If during floppy boot you get strange errors like "0220 ax:0224 bx:0000 cx:0001 dx:0000", throw the floppy in the trash: it's broken; retry with a new, just formatted floppy. (Note: floppy disks are poorly reliable. I strongly recommend to use, when possible, the CD version: just burn eb-net.iso and boot your thin-client from CD) Look at BootDisk\Readme.txt if you have any trouble in this phase, or you'd like some more details ______________________________________________________________________________ Setting up thinclient files Run 'TFtpdRoot\thinstation.nbi (autoextract).exe', read the "Licence Agreement" of the included Citrix ICA Client and click "I Agree" to uncompress the required 'thinstation.nbi' file: this is the thin-client boot-image you need; this file is a mini-linux distribution and it contains everything you need for setting up the client; here you can also find the 'TFtpdRoot\thinstation.conf.network', a sample configuration file for the thinclient. Copy all the 'TFtpdRoot\' folder in your server 'C:\' Edit the "C:\TFtpdRoot\thinstation.conf.network" file Check keyboard (KEYBOARD_MAP=...) and screen (SCREEN_RESOLUTION=...) configuration line, and then: - If you want to connect to a 'Terminal services' session, uncomment these lines: SESSION_?_TYPE="rdesktop" SESSION_?_RDESKTOP_SERVER="" <--- put here your server - If you want to connect to a 'Citrix ICA' session, uncomment these lines: SESSION_?_TYPE="ica" ...and edit SESSION_?_ICA_APPLICATION_SET="" or SESSION_?_ICA_SERVER="" (note: don't compile both, only one of them) - If you want to connect to a 'X' session of a UNIX server, uncomment these lines: SESSION_?_TYPE="x" SESSION_?_X_SERVER="" <--- put here your server SESSION_?_X_OPTIONS= SCREEN_X_FONT_SERVER=":7100" <--- put here your font server Note: for X sessions to work, your server should be configured to accept "-query" requests, and should expose a font server on port 7100 - If you want to connect to any of the other session types included in the thinstation.conf.network sample sessions (ie: vnc, telnet, ssh, tn5250), just uncomment it, set the server, and check session numbering. IMPORTANT NOTE ABOUT SESSION NUMBERING: You can have one or multiple sessions; please be sure that your first session have params starting with "SESSION_0_...", the second "SESSION_1_..." and so on. Every session can have a "title" that will be displayed in the thinstation session launcher menu, just add a "SESSION_?_TITLE=..." line. ______________________________________________________________________________ Setting up the TFTP and DHCP server The TFTP server is the process that sends the thinstation.* files to the thinclient. The DHCP server is the process that give an IP address and the boot-image file name to your thinclient. Uncompress the tftpd32 utility you find in 'TFtp\tftpd32o.zip', run it, and in Settings set: Base directory=C:\TFtpdRoot Exit, go in the "DHCP server" tab and set IP pool starting address= (put here the first IP address of a free pool of IP addesses of your network, ie "192.168.0.90") Size of pool= (put here the size of this free pool, ie "10") Boot file=thinstation.nbi Mask= (put here your subnet mask, ie "255.255.255.0") Press the save button and LEAVE THE APPLICATION STARTED. After the testing phase, you will probably want to use this utility as a "service", so it will be always running, even when no user is logged on the server; you can download from http://www.firedaemon.com/ the free "FireDemon Lite" utility to convert this application to a service. Otherwise you can read in the last part of this doc how to use the dhcp & tftp services provided with every Windows 2000 Server. Note: if a DHCP server already exists in your local network, you should deactivate the tftpd32 DHCP server (from "Settings") to avoid conflicts and configure the pre-existent DHCP server to supply the information required by the thin-client. ______________________________________________________________________________ Let's start! Ok, everything is now ok... Put the bootdisk into your thinclient, press the "power" switch: after booting, the system should start the traditional Windows login screen! If you have problems, check Documentation -> FAQ from http://thinstation.sf.net If this doesn't solve them, write in the "thinstation-general" mailing list (http://thinstation.sourceforge.net/mailinglists.html). In the support request, please specify: - Which version of ts are you using (ie: "Thinstation-2.1.1-prebuilt") - Which hw you have in the client (ram, video card, network card...) - Which sw are you using on the server for dhcp/tftp - thinstation.conf In the following sections, we will explain some usefull way to customize your thinclient... ______________________________________________________________________________ How to network-share a thin-client printer In thinstation.conf uncomment the following lines: PRINTER_0_NAME="parallel" PRINTER_0_DEVICE=/dev/printers/0 PRINTER_0_TYPE=P ...now, your thin-client parallel port is network shared. To use this printer, add in your server a local printer associated with a network port; the main steps, on a W2000 server, are: - add a new printer - select "local" (don't select "autodetect plug & play printer") - create a new "standard TCP/IP" type port - next - IP address: insert the address of the thin-client - port type: "Hewlett Packard Jet Direct" - next - now select the correct printer driver, and finish... If the printer you want to share if USB, simply use these lines: PRINTER_0_NAME=usb PRINTER_0_DEVICE=/dev/usb/lp0 PRINTER_0_TYPE=U ______________________________________________________________________________ Using a custom thinstation.conf.network for each thinclient If you need to set individual configurations for terminals (ie custom keyboard layout or video settings) you can add config files named like thinstation.conf- (example: thinstation.conf-005004AABBCC) or thinstation.conf- (example: thinstation.conf-172.23.24.101) in your root tftpd dir. Your thinclient will merge the options included in 'thinstation.conf.network' with the ones included in these files. But a better way to do this is giving the thinclient a hostname editing the "tftproot/thinstation.hosts" file, composed by lines like this: # HOST MAC GROUPS COMMENTS donald 003103014152 it_kb hi_res # Donald Ducks Computer daffy 005001231234 # Daffy Ducks Computer You can specify the hostname of every thinclient, and assign him optional "groups": with this file, "donald" will get the following .conf file: thinstation.conf.network thinstation.conf.group-it_kb thinstation.conf.group-hi_res thinstation.conf-donald ...while "daffy" only: thinstation.conf.network thinstation.conf-daffy ______________________________________________________________________________ How to avoid using the boot floppy: using a PXE-enabled PC A lot of today PCs or Notebooks don't need the boot floppy because they directly support remote boot thanks to the PXE standard (this feature is mainly supported by the PC with integrated NIC); some NIC also (the cheepest and most widespread I know is the 25$ '3com 3C905CX-TX-M', note the 'M' in the end) can turn your PC in a PXE-enabled one, as they have a little EEPROM containing the PXE driver. In order to use this capability, simply setup "Network" as your first boot device in the BIOS, and assure that your NIC will use the PXE protocol to network-boot, if it support more than one. Now, in your DHCP server set as the "Boot file", instead of "thinstation.nbi", the PXE loader ("thinstation.nbi.zpxe"), already included in the TFtpdRoot\ folder. Finish. Start your PC and let him directly boot from network, without needs of any boot-floppy... If you have more than one PC in your network, and some of these are PXE-enabled and some other aren't, no problem: the universal boot floppy you are using is smart enought to exclude the trailing ".zpxe" extension, if presents, from the boot file name, so it will download "thinstation.nbi" anyways... (Be aware that rom-o-matic floppies don't have this capability) Please read the "BootPXE/Readme.txt" file for more details about PXE boot, or if you are having any problem using it. ______________________________________________________________________________ Setting up the W2000/W2003 system DHCP service If you don't like the simple DHCP server included in the Tftpd32 (because it isn't a service, or because you already have a DHCP service in your network) utility and prefer to use the DHCP services included in Windows Server, read the following section: - If necessary, install the DHCP service from Windows component setup (under "Network services") of your server - Start the DHCP manager by selecting the DHCP option from the Admin Tools submenu of the Programs menu. - If you have not already done so, create a scope (New Scope.. in the Actions menu). You'll need to specify a start and end address, subnet mask, and any exclusions (excluding your server IP address is probably a good idea!). Inside this scope, click on Scope Options and then select Configure Options from the right-hand mouse button menu. Select the checkboxes corresponding to the desired options and set values appropriately. You will need the following: 66 Boot Server Host Name: "192.168.0.30" (put here your terminal server IP) 67 Bootfile Name: "thinstation.nbi" ______________________________________________________________________________ Setting up the W2000/W2003 system TFTP service If you don't like the Tftpd32 utility (because it isn't a service) you can use the tftp service included in the "Remote installation service" of W2000 server: - Install "Remote installation service" from Windows component setup - Assure the "Trivial FTP daemon" service is in "automatic" and "started" state by selecting from the Admin Tools submenu of the Programs menu the "Services" application. This service will use 'C:\TFtpdRoot' as the base tftp path; if you need to change this path, in the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TFTPD\parameters add Directory=C:\MyCustomPath ______________________________________________________________________________ Creating custom boot-images If you want to build your custom 'thinstation.nbi' image (ie if you want to have a local windows manager, to share thin-client local resources with Samba, to have sound, to use particular network services), you need a linux box and the full 'Thinstation-2.1.1.tar.gz' package. These are the steps to recompile the boot image: - [download Thinstation-2.1.1.tar.gz] - tar zxvf Thinstation-2.1.1.tar.gz - cd thinstation-2.1.1 - [copy here 'BuildFiles\build.conf.prebuilt-netboot' and 'BuildFiles\thinstation.conf.buildtime.prebuilt-netboot' supplied with the prebuilt, and if necessary edit them] - build build.conf.prebuilt After a while, in the 'boot-images/etherboot' folder you will find the new thinstation.nbi file. Look the FAQ for more detailed info. ______________________________________________________________________________ Useful links - ThinStation What made this possible... http://thinstation.sourceforge.net/ - Etherboot Where rom-o-matic boot disk and boot rom comes from.. http://etherboot.sourceforge.net/ - Configuring Windows 2000 for Etherboot Very detailed doc on installing DHCP and Tftp under W2000 http://diet-pc.sourceforge.net/windows/etherboot-w2k.html - Rdesktop The linux terminal-services client http://www.rdesktop.org/