This HowTo is intended for use with Windows NT 4.0 Terminal Server Edition. I have no experience with Windows 2000 (yet), but I believe that the same basic procedure could be applied to Windows 2000 server even more easily (without the need for one or both of the add-on server packages).
If you don't already have a Windows Terminal Server, I advise you to think carefully about whether you really want to do this. Windows Terminal Server solutions are very expensive, and there are other lower-cost means of accessing Microsoft applications from a Linux-based server, or accessing Microsoft documents from Linux-based applications. This HowTo is really aimed at sites that already have a major investment in Microsoft platforms and an ongoing need for extensive use of Microsoft apps, but who want to transition to a thin-client model while recycling existing desktop hardware. To give you some idea of the cost, I have roughly estimated the total licensing costs of a 10-user solution - not including application costs (Microsoft Office etc) - at just short of US$3000.
Make sure you have enough Terminal Client Access Licenses installed to support the diskless terminals that will connect to this server. You will of course need TCP/IP network services installed, and you will need to install the DHCP server.
Having never used this solution in a production environment I can't give you any pointers on how powerful your server will need to be in order to support X number of diskless clients. I'm running NT4TSE as an alternate O/S on my home PC (an Athlon K7 600 Mhz) off an antique 540 Mb disk using software compression, with clients ranging from a 386DX40 to a Pentium 166, so my test environment's performance is understandably pretty bad.
Unless you can get a complete ltsroot hierarchy (with the correct kernel binary for the network cards you are using) from someone who has already built one using this procedure, you will need - at least temporarily - a Linux box to do some compilation and assembly on. The flavour of Linux is not important, so long as it is a distribution supported by LTSP. I used RedHat 6.2.
You don't need anything particularly powerful for your diskless clients. I found that a 166 MHz Pentium with 32 MB RAM works just fine, and you can get by with less. If you have the opportunity and the money to assemble your own, splash out on a 100 Mbit/s flash-programmable NIC and an AGP graphics card, and try for a small footprint (Micro-ATX mainboard and small case) and ideally a fanless power supply. Do your research first and make sure everything is Linux-supported.
You don't need a hard disk, a CDROM unit, a floppy drive, or a sound card, but it won't hurt anything to leave them in if you intend to use the PCs for other purposes as well. Although LTSP can make use of some of this hardware, it will not do so in a way that is useful in /accessable from a Windows environment.
Unless you are content to boot from floppy disk or your NIC has a boot ROM that can be flashed with an etherboot image, you will need to burn or obtain etherboot ROMs for your NICs.
It may be possible to use PXE/RPL or other vendor protocols instead of or in conjunction with Etherboot, but that's outside the scope of this HowTo. See the LTSP contrib area for some hints about this.
NT4TSE provides a TFTP client but no TFTP server. You will need to source a third-party server. I had a quick look around and found a shareware server that suited my needs perfectly: TFTP Server 1.2 for NT by Bud Millwood (Millwood Data A.B., Sweden), at an entry price of US$40. There are plenty of other viable options, but this was the best well-behaved no-frills NT service that I could find in the few minutes I spent looking. Unfortunately I now don't remember where I got it from, and I can no longer find it - it used to live on ftp.coast.net, but this site has gone AWOL.
NT4TSE does not provide an NFS server either (although I believe Windows 2000 does). However, the Microsoft Windows Services For UNIX (SFU) 2.0 add-on package (approx US$150) has one that is adequate for our purpose, plus other useful goodies. If you go with another third-party NFS server package, make sure that it supports symbolic links - many don't. If it supports character- and device-special files, even better! I couldn't find one that did.
With some additional work it ought to be possible to obviate the need for an NFS server by attaching a ramdisk image (eg. a cramfs or romfs filesystem) to the tagged kernel served to the diskless client via TFTP and using the initial ramdisk (initrd) capability of Linux. This approach would require client PCs with a fairly generous amount of RAM, whereas the LTSP-based approach does not.
LTSP doesn't have to be the basis of the Linux distribution that will run on the diskless client, but it's what I used. LTSP is intended for use with an X11-based Linux server, so we will need to bend it a bit to make it work with a Windows server.
Unless you have found an Windows NFS server that supports character- and block-special files, you will need to prepare a Linux kernel with devfs support to overcome this limitation. Devfs and devfsd sources can be found at http://www.atnf.csiro.au/~rgooch/linux/.
You will need the mknbi utility available from the Etherboot website to create a network-bootable binary.
Rdesktop is a freeware RDP client (RDP is the remote display protocol used natively by NT4TSE and Windows 2000). The Rdesktop project is still rather immature, but after application of the semi-official integrated patch it is reliable enough for our purposes on standard Intel-based PC hardware. I used unified patch revision 19-5-1.
If you are using Citrix Metaframe, it is possible to attach the Linux ICA client which is freely available from Citrix to the LTSP distribution and use this to connect to your Terminal Server using the ICA protocol rather than the RDP protocol. This is a complicated process, and is the subject of a separate HowTo. ICA/Metaframe has various advantages over RDP, potentially including compression, sound support, application abstraction and load balancing, and >8-bit colour-depths.
Another nice solution is to use Citrix UNIX Integration Services or a similar package to configure your Terminal Server as an X11/XDMCP server. This will allow the Linux-based clients to connect to your server using the X11 protocol native to Linux. You may even be able to use LTSP out of the box.
You may also want to consider installing a syslog daemon on your NT4TSE server to record events logged by your diskless clients. Several low-cost NT syslog implementations are available, eg. Adiscon WinSyslog.
Unless you intend to do dry-run boot tests from your Linux box, it is not necessary to run ltsp_initialize at this point, or to get bogged down in the details of LTS setup. We are only using Linux as an intermediary to generate a root filesystem footprint - the configuration can be done later from Windows.
If you intend to use loadable modules you will also need to compile the modules and install them into /tftpboot/lts/ltsroot/lib/modules/kernel-version. Note that the version 2.4.x kernel sources install modules using a new directory layout that most likely won't be understood by your modutils, in which case you will need to massage the modules directory back into the traditional format (because we'll be using the modprobe and depmod binaries from your Linux distro). The following procedure should work for a version 2.4.x kernel:
make modules
My personal preference is to keep the TFTP and NFS areas separate rather than have the latter a subset of the former, so for my kernel I actually used --rootdir=/ltsroot for use in the directory d:\ltsroot on my server.
Note that as you are now using modprobe you will need to remove the ".o" extensions from all your MODULES_NN lines in /tftpboot/lts/ltsroot/etc/lts.conf.
Finally, edit /tftpboot/lts/ltsroot/etc/lts.conf and set UI_MODE to RDP and SERVER to the IP address of your NT4TSE server.
I recommend giving each server a separate directory to work with, eg. c:\tftpboot for the TFTP server and c:\ltsroot for NFS server. You must ensure that the root path you used in the mknbi-linux command in step 3 matches the directory name that you use for the NFS server (without the leading drive letter and colon, and with forward-slashes substituted for back-slashes). Be careful not to compromise the security of your server; your diskless clients only need TFTP access to a single file, and read-only NFS access to their root directory. Initially, however, you must give your Linux development box read-write access to the LTS root directory so that the files can be transferred. Once your diskless PCs are up and running properly you can revoke this access.
If using the Millwood TFTP server, install by positioning the binary in the desired permanent location and running using tftpds -install and then configure using the new icon which appears in the Control Panel. Make sure that you select Limit to default directory. You will need to manually start the TFTP service after it is installed - the install procedure sets startup to Automatic but doesn't actually start the service.
Setting up the SFU NFS server is very easy. Once installed from CD (you need only install the NFS server, no other components of SFU are required), just start Windows NT Explorer, right click on on the directory you want to share via NFS and select Sharing.... In the window which appears you will see a new NFS Sharing tab which you can use to activate NFS sharing. Use the Permissions button to set sharing to Read-Only for the default group ALL_MACHINES, and then add an explicit Read-Write permission for your Linux development box.
cd /tftpboot/lts
N.B.: The DHCP server doesn't work properly straight off the NT4TSE CD. You must apply a Service Pack after installing it; I'm not sure what the minimum Service Pack it needs is, but SP6 does the trick.
Start DHCP Manager from the menu, double click Local Machine and create a new scope using the option in the Scope menu. It's OK to make use of an existing subnet to host your diskless clients, you don't need a dedicated one. If you do this, however, make sure that you add exclusions for any network entities that already exist on that subnet and aren't diskless PCs, including your Terminal Server itself. Lease Duration should be set to Unlimited.
Select the newly-created scope and then pick Scope... from the DHCP Options menu. Minimally, add Root Path and Bootfile Name options, and set the values of these appropriately. You must use UNIX conventions here, which means forward-slashes instead of back-slashes and no drive letter prefixes. You will probably want to add some other options as well. Here's what I use:
Now select Add Reservations... from the Scope menu, and add entries for each of your diskless clients, so that there is a one-to-one mapping of ethernet (MAC) addresses onto IP addresses. The MAC address goes into the field named Unique Identifier - just use 12 sequential hexidecimal digits with no separating punctuation. I found that setting Client Name didn't work - the only way I could get the DHCP server to send the client its hostname was to set the 012 Host Name option using the Options... button for every single reservation entry. Mind you, I'm not using WINS or DNS - your mileage may vary.
Finally activate the scope from the Scope menu.
This may mean fitting a ROM chip, using a flash programming utility to program a flash PROM, or writing a ROM image to a floppy disk. ROM chips burned with Etherboot ROM images are available from DisklessWorkstations.Com. Free custom ROM images can be generated and downloaded on demand from ROM-o-matic.net. To prepare a bootable floppy using a floppy-boot ROM image, just use your Linux box to dd it to /dev/fd0H1440 or use rawrite.exe from Windows.
At this point you should read the LTSP doco and set up lts.conf file as appropriate. Note that in a Windows-only server environment we will not be able to make use of LTSP's advanced features such as the Font Server, Remote Apps and floppy disk/printer support.
If all goes well you should now be able to get at least as far as booting Linux. You'll probably need to do quite a bit of additional fine-tuning to get the X server working with your particular brands of video cards and monitors.
If you are using WordPad or similar to edit your configuration files, be careful not to inadvertently introduce carriage-return characters into the file as this can mess things up quite badly (as I discovered). In particular, be careful when doing Windows cut-and-paste operations. It's probably safer to NFS-mount ltsroot onto your Linux box and edit from there.
Ingredients
Method
make modules_install
mkdir -p /tftpboot/lts/ltsroot/lib/modules/new-kernel-version
cd /lib/modules/new-kernel-version/kernel
mv fs drivers/* /tftpboot/lts/ltsroot/lib/modules/new-kernel-version
cd /
rm -rf /lib/modules/new-kernel-version /tftpboot/lts/ltsroot/modules
cp /sbin/depmod /tftpboot/lts/ltsroot/sbin
chroot /tftpboot/lts/ltsroot /sbin/depmod -a
cd /usr/src/linux/arch/i386/boot
rdev -R bzImage 0
rdev -r bzImage 1
mknbi-linux --ipaddrs=rom --rootdir=/tftpboot/lts/ltsroot bzImage >vmlinuz
cp vmlinuz /tftpboot/lts
cp devfsd /sbin/modprobe /tftpboot/lts/ltsroot/sbin
cp /usr/lib/libnsl.so.1 /tftpboot/lts/ltsroot/lib
cp devfsd.conf modules.devfs /tftpboot/lts/ltsroot/etc
rm -rf /tftpboot/lts/ltsroot/dev/*
ed /tftpboot/lts/ltsroot/etc/rc.local << EOF
/^function get_cfg/
/^}/
a
#
# Set up devfs compatibility devices
#
/sbin/devfsd /dev
.
1,\$s/\/dev\/ram/\/dev\/ram0/
/insmod/
d
i
/sbin/modprobe \${MODULE}
.
w
q
EOF
ed /tftpboot/lts/ltsroot/etc/modules.devfs << EOF
/^include /
s/^/#/
w
q
EOF
cp rdesktop /tftpboot/lts/ltsroot/ltsbin
cp /usr/X11R6/bin/xinit /tftpboot/lts/ltsroot/bin
cd /usr/X11R6/lib
cp libXmu.so.6 libXt.so.6 libSM.so.6 libICE.so.6 /tftpboot/lts/ltsroot/lib
ln -s /tmp/xinitrc /tftpboot/lts/ltsroot/.xinitrc
ed /tftpboot/lts/ltsroot/etc/rc.local << EOF
/\*)/
i
RDP) XSERVER=\`get_cfg XSERVER XF86_SVGA\`
RDP_SERVER=\`get_cfg RDP_SERVER \${DEFAULT_SERVER}\`
echo "while true; do /ltsbin/rdesktop -u Administrator -4 -F -T x \${RDP_SERVER}; done" >/tmp/xinitrc
echo "/bin/xinit -- /ltsbin/\${XSERVER}" >/tmp/start_ws
;;
.
w
q
EOF
tftp your-server-name
binary
put vmlinuz
quit
mount your-server-name:/path-to-ltsroot /mnt
cd ltsroot
tar cf - . | (cd /mnt; tar xf -)
umount /mnt
Option Value 017 Root Path /ltsroot 028 Broadcast Address 10.255.255.255 030 Mask Supplier Option 0x1 036 Ethernet Encapsulation 0x1 066 Boot Server Host Name nimbus 067 Boot File Name /tftpboot/vmlinuz