Monday, May 29, 2006

Diskless Machines with LTSP

Tired of seing your old machines in the stock room, do you want to bring them to life without a hard drive? Heres a simple way how, with LTSP ( Linux Terminal Server Project ) it is very possible to bring your diskless old workstations back to life.

Coverage of this simple document:
0. Application of LTSP
1. Downloading and installing LTSP via ltspadmin tool.
2. Configuring via ltspcfg
3. tftp server
3. DHCPD Configuration file.


Application of LTSP:
1. It could be used to provide terminal services to diskless workstations across the network. Specially for schools who have old computers and want to revive them (example: probably workstations in a cyberlibrary).
2. It would also be used to remote desktop to a windows with terminal services enabled to save licensing.
3. And more.....

Whats cool with running ltsp:

Well its very easy to maintain, no hard disks to reformat , less prone to viruses and it could save you so much money from buying hard drives for each workstation you have.

Now to the setup
I used CentOS as my terminal server with 1G of ram and 120GB SATA hard drive. First let us download the ltsp component files, now type on your console:

#. wget http://ltsp.mirrors.tds.net/pub/ltsp/utils/ltsp-utils-0.25-0.noarch.rpm

After it finishes downloading type again on your console:

#. rpm -ivh
ltsp-utils-0.25-0.noarch.rpm

Once the rpm has finished installing type this in your console to bring to you the ltsp administration menu. The LTSP has matured from a really difficult installation before to a very user friendly administration tool. Now as root again type this in your console:

#. ltspadmin

You will be taken to a very nice menu. Choose INSTALL LTSP Components the select all by typing A then Q when your done. The installer itself will download all the ltsp components from the site. Wait till it downloads the packages. Grab a beer or a coke.

Before i forget you will also install a tftp server, to do this you must type again as root:

# yum install atftp if this doesnt work then type this instead yum install tftp-server.

Once this is installed your ready to rock. Now type as root:
#. ltspcfg
Select the option configure services manually by typing C . Then just select the options from 1 to 11 to fully configure each and every service that you need.

Now to the dhcpd.conf file you need to edit the following lines.
This looks exactly like the dhcpd.conf that ltspcfg generates
--------------------------------------------------------------------------------------------------
# dhcpd.conf
ddns-update-style ad-hoc;

option subnet-mask 255.255.255.0;
option broadcast-address 192.168.69.255;
option routers 192.168.69.12;
option domain-name-servers 192.168.69.12;
option domain-name "8layertech.com"; # You really should fix this
option option-128 code 128 = string;
option option-129 code 129 = text;

allow bootp;
get-lease-hostnames true;

next-server 192.168.69.12;
option root-path "192.168.69.12:/opt/ltsp/i386";

subnet 192.168.69.0 netmask 255.255.255.0 {
range 192.168.69.100 192.168.69.199;
if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
filename "/tftpboot/lts/2.6.16.1-ltsp-2/pxelinux.0"; # Wrong change to the one below

filename "/lts/2.6.16.1-ltsp-2/pxelinux.0"; # the right path
}
else{
filename "/tftpboot/lts/vmlinuz-2.6.16.1-ltsp-1"; # Wrong
filename "/lts/vmlinuz-2.6.16.1-ltsp-1"; # Right

}
}
---------------------------------------------------------------------------

This config was generated by the ltspcfg based on my network setup, we could have different network setups but the lines you will have to change would be the same.

Configuring the client

We need a diskless workstation with a floppy drive and a network card. A floppy drive may not be required if the network card has a boot rom.

If your network card does not have a bootrom then you need a floppy diskette to boot from. Go to http://www.rom-o-matic.com . Its a very simple website complete with instructions you need. Just find the driver of your network card and your good to go. Theres a very nice instruction there on how to put the bot rom image to your floppy diskette.

Once everything is finished we go to the test. We connect the dumb terminal to the hub and boot it using a floppy drive. The floppy drive enables your network card to search for the DHCP server to download the ltsp image.

Once successful you can see a login screen from your diskless workstation. And thats where the fun begins. For questions just drop me an email dax.cordova@gmail.com

No comments: