21 April 2009

 

Installing LTSP 5.1 in Debian 5 ( Lenny ) with Floppy gPXE and Etherboot Workstations


Editor's note, 29 May 2009: 

Due to a recent change in the versions of files contained in Debian's Lenny repository, it is now impossible to use etherboot workstations with LTSP 5.1.  When using the following instructions, you must use a gPXE image when installing a floppy image booting workstation.  None of the other referenced images will work!

I discovered this several days ago when I reinstalled Lenny and LTSP using current Debian repository files.  I used the same network computers and rtl8139 network cards that were used in my Lenny/LTSP 5.1 howto.  I then tested LTSP 5.1 with the same floppies prepared while writing my Lenny/LTSP 5.1 howto.  Only the gPXE floppies worked.  All of the etherboot floppies, whether of Debian, romomatic or thinstation origin, crashed.  A newly prepared Debian etherboot floppy also crashed.  (The only etherboot floppy that worked was a trusty old Romomatic 5.2 .com version.)  Reinstalling Lenny/LTSP several more times produced the same results.

Editor's Note, 16 Sept 2009:

Due to additional changes in the versions of files contained in the Debian Lenny "stable" repository, it is now impossible to use the Rom-o-matic gPXE "all-drivers" image with my RTL 8139 network chip. The gPXE version specific to my network chip is still compatible.

To ensure successful booting of your floppy image workstation, do the following:

1) Identify the version of your network chip by following the directions found in Section 4 of my instructions.

2) Obtain from Rom-o-matic the gPXE image that is specific to your network chip.

3) Copy this gPXE image to a floppy. Do not use an etherboot image or the "all-drivers" gPXE image.



  • Introduction
  • 1--Preparing Your Server for the Installation of LTSP
  • 2--Installing LTSP
  • 3--Configuring the Server Files
  • 4--Configuring the LTSP Workstation:  Identifying the Network Chip
  • 5--Configuring the LTSP Workstation:  Obtaining a Floppy Boot Image
  • 6--Configuring the LTSP Workstation:  Testing the Floppy Boot Image
  • 7--Installation Notes
  • 8--Sample LTSP Files
  • 9--References


Introduction

During the past six years, each revision of LTSP has brought extensive changes.  But not all the changes have been good.  Etherboot compatibility has deteriorated:  each release of LTSP has been compatible with even fewer of the available etherboot images.

With the release of LTSP 5.0, the deprecation was complete:  LTSP no longer worked with any etherboot image.(#1)  Motherboards which did not have PXE emulation or suffered from defective PXE emulation were now unusable.  If you wanted an etherboot workstation in LTSP 5.0, you had to hack Etch to make the workstation run.(#2) 

With the latest version of LTSP, the situation has changed.  LTSP 5.1 now works with all etherboot images -- and no hacking of files is necessary. 

After installing LTSP 5.1, I tested various boot images using Realtek 8139 network adapters.  I found that:

(1) Etherboot images from Debian, which previously had been incompatible with Etch, are again usable. 

(2) Etherboot images from ROM-o-matic, which had been incompatible with Etch and Sarge, are usable but still have problems.

(3) More and more multiboot floppy images are available.  They contain multiple images for many different network chips, all on the same boot floppy.

(4) Most importantly, there is a new and little-known image available that works with LTSP workstations -- gPXE.

The instructions that follow tell you where to find the various boot images and how to transfer them to floppy disks.  The included LTSP 5.1 installation instructions are easier to follow than those on the Debian LTSP Wiki.(#3)   Finally, be sure to read the “Comments” section at the end of this article before starting installation.


1--Preparing Your Server for the Installation of LTSP

1.  Router.

If you have a router which uses DHCP to assign IP addresses to the computers on your network, the router's DHCP capabilities must be disabled to successfully run LTSP 5.1.  Do this only when instructed – not now.

2.  Hard Disk.  Use a clean hard disk.

If other operating systems are to be installed on the server, the hard disk must be preformatted before inserting the Lenny installation CD.

3.  Debian 5.0.

I prefer to use “Expert install” for complete control of the installation.  

(1)  Configure the Network.

Note that these directions use a server IP address of xxx.xxx.xxx.150 and workstation IP addresses of xxx.xxx.xxx.100 to xxx.xxx.xxx.110.  Alter them to the requirements of your network. 

There are several ways to setup a network:

__(1)  If you have a router with DHCP enabled, assign your computer a “dynamic” network IP address.  You will convert this address to a static IP address later. 

__(2)  If your network uses static IP addresses, setup a “static” network address.

__(3)  If you already have a DHCP server on your network and intend to  continue to use it, make the appropriate entries here and later in the DHCP server’s dhcpd.conf.

(2)  Configure the Computer Clock.  Select NTP if you want to use local time. 

(3)  Configure the Desktop.

__(1)  Accept the preselected items “Desktop Environment” and “Standard System” if you want to install Gnome.

__(2)  If you want a “lean & mean” installation, do not install the “Desktop Environment” package.  You can instead install icewm, XFCE or another desktop/windows manager later.

(4)  Configure GrubSelect:

__(1) “master boot record” for an LTSP-only server;

__(2) “root partition” if other operating systems are to be installed.  In this instance you will need to install a boot manager later on.

(5)  Configure your computer to use local time: deselect UTC.

4.  Optional.  When the installation of Lenny is completed, perform any additional setup tasks needed for your proposed installation:

(1) If you plan to use an alternate Desktop/Windows Manager, install it now.

(2) If you need to install a Boot Manager, reboot.  Install the boot manager.  Then reboot again.


2--Installing LTSP

1. Install the LTSP installation files.  Ignore notifications regarding tftpd-hpa and dhcpd3 errors.

  apt-get   install   ltsp-server-standalone

2. Install the LTSP chroot files used by the workstations:

  ltsp-build-client


3--Configuring the Server Files

Note:  Copies of all files modified in the following directions can be found in the “Sample LTSP Files” section.  Altered text and sites requiring user-specific data are shown in red.                 

1.  Modify /etc/exportsAdd the following text at the end of the file.  Note that there is no space between the asterisk and the parenthesis:

  /opt/ltsp    *(rw,no_root_squash,async,no_subtree_check)

2.  Restart the nfs-kernel-server:

  invoke-rc.d   nfs-kernel-server   restart

3.  Revise /etc/default/tftpd-hpa to read:

  RUN_DAEMON=“yes”

4.  Restart the tftp daemon:

   /etc/init.d/tftpd-hpa    start

5.  Revise /etc/inetd.conf:

Scroll down to the entry for “tftp”.  Comment out the line beginning with “tftp” by entering a “#” at the beginning of the line.  Enter only the #, not “  ”. (See the “Sample LTSP Files” section.)

6.  Modify /etc/dhcp3/dhcpd.conf:

Copy /etc/ltsp/dhcpd.conf  to the /etc/dhcp3 directory, replacing the Lenny version of dhcpd.conf.  Then, using the sample copy of dhcpd.conf in the “Sample LTSP Files” section, modify all of the indicated IP addresses.  You can easily do much of this by using search-and-replace in gedit to change the network portion of the IP addresses.

7.  Restart the dhcp daemon:

  invoke-rc.d    dhcp3-server    restart

If major errors are present in dhcpd.conf, the daemon will not load it; minor errors will not be detected.

8.  Assign your computer a “static” IP address  -- necessary only if you installed Lenny with a temporary “dynamic” address.

Revise /etc/network/interfaces by replacing the data for “#The primary network interface” stanza found in the interfaces file with that found in the “Sample LTSP Files” section.  Update the indicated IP addresses with IP addresses from your own network.

9.  Reload the interfaces file.  (Necessary only if you performed Step #8 above.)

  ifdown    eth0

  ifup    eth0

10.  Update SSH-keys with your computer's new IP address: 

   /usr/sbin/ltsp-update-sshkeys 

This must be done every time you change the server's IP address once LTSP is installed.

11.  If you are using a router with DHCP, disable DHCP now.

12.  Reboot your server. 

   reboot    -n

The reboot will start the daemons installed by LTSP and also force Linux to reread the revised configuration files.


4--Configuring the LTSP Workstation:  Identifying the Network Chip

You need to know the manufacturer and/or model of the network hardware in your workstation, whether the network hardware is installed on the motherboard or on an adapter card.  If you already have this information, skip this section.

1. If linux is not already installed on the workstation computer, run a Debian live CD distribution such as Knoppix on the workstation.

Obtain lspci and run the following commands:

   apt-get   install   pciutils

   lspci    –nn   |   grep    Ethernet

This information will show the vendor's ID# and device (network chip) ID#.

2.  Additional help can be found at:

   http://www.mepis.org/docs/en/index.php/LTSP_Server

    http://www.pcidatabase.com/


5--Configuring the LTSP Workstation:  Obtaining a Floppy Boot Image

There are many sources for workstation boot images.  The new gPXE images are highly recommended and will be discussed first.  Etherboot images will be discussed last.  Try the Rom-o-matic ethernet images only if the Debian versions do not work.

*** All-drivers gPXE image, ver 0.9.6 ***

(1) A gPXE “All-drivers” image is available from ROM-o-matic.org and contains all of the gPXE images currently available.  Obtain it from the following website:

  http://romomatic.org

(2) In the “gPXE Releases” section, search the “NIC/ROM type” for “gpxe:all-drivers”.  From the “ROM output format” box, select “Floppy bootable-ROM Image (.dsk)”.  Then click “Get the ROM”.  

(3) After downloading the image, copy the image to a floppy with:

 cp     gpxe-0.9.6-gpxe.dsk    /dev/fd0

 *** Specific gPXE image ***

Use the data obtained with lspci.  Follow the steps above, but instead, when looking in the “gPXE Releases” section, find your specific driver by looking at the information [in brackets] on the right side of each listed driver.  Match this data with the vendor and device ID data you found using lspci.  Download your network chip's specific gPXE image and copy it to a floppy disk, as above. 

*** All-in-one-boot-floppy image with gPXE image ***

(1) The All-in-one-boot-floppy image contains an older version (.0.9.3, February 2008) of ROM-o-matic's gPXE “all-driver” gPXE boot image.  Download it from: 

  http://rescup.winbuilder.net/bootdisk/allinone.img

(2) Copy the image to a floppy disk:

  dd    if=allinone.img    of=/dev/fd0

Note:  My Asus workstation crashed using this image.  (The Asus workstation also crashed using an old 5.2 etherboot COM image.)  I think this incompatibility is due to the “designer” floppy drive chip the Asus motherboard uses to provide floppy emulation since Intel no longer supports floppy drives.  Interestingly, my Gigabyte workstation's designer floppy drive chip had no problem with either image. 

*** Thinstation etherboot image *** 

(1) The Thinstation image contains a selected group of images for older, mainstream network chips.  Download the multi-rom etherboot image from:

  http://voxel.dl.sourceforge.net/sourceforge/thinstation/BootDisk522b.zip

(2) Extract the zipped image.

(3) Copy the etherboot image to a floppy disk:

  dd    if=ebnet522.dsk    of=/dev/fd0  

*** Specific Debian etherboot image ***

(1) Obtain these images from the Debian repository:

 apt-get   install   etherboot

(2) Search through the /usr/share/etherboot directory.  Look for the DSK.GZ version of the NIC image you need:

  cd    /usr/share/etherboot

  ls    -l   | more

(3) After selecting the image matching your network chip, extract the DSK image from its archived GZ version:

  gzip   -d    rtl8139.dsk.gz     {use your filename instead}

(4) Copy the DSK image to a floppy disk:

  dd    if=rtl8139.dsk    of=/dev/fd0     {use your filename instead}

 *** Specific ROM-o-matic etherboot image ***

(1) My studies, as well a comments on the web, show these images continue to be unreliable when used with LTSP 5.1.(4)  Find them at:

  http://romomatic.org

(2) In the “Etherboot Releases” section find the image for your network chip.  Use the procedure described in “Specific gPXE image” section above, but instead download the image in the “Floppy bootable-ROM Image (.zdsk)” format. 

(3) Copy the image to a floppy:

   cat    eb-5.4.4-yournic.zdsk    >    /dev/fd0     {use your filename instead}

Note:  The Realtek 8139 etherboot image obtained from this site was unsatisfactory.  The workstation desktop was considerably off-center, compressed, and of low resolution.


6--Configuring the LTSP Workstation:  Testing the Floppy Boot Image

1.  Boot the workstation. 

2.  Enter the workstation bios and:

(1) Set the motherboard lan as follows:

__(1) If you are using the motherboard lan, “Enable” the lan.

__(2) If you are using an add-in network card, “Disable” the motherboard lan. 

(2) “Disable” the motherboard PXE emulation. 

(3) Set the floppy drive as the first boot device.

(4) Save all changes to the bios.

3.  Boot the server.

4.  Insert the gPXE or etherboot image floppy into your workstation floppy drive.  Be sure your server is running and the gdm login is screen visible on its screen.  (You need not be logged onto the server.)

5.  Reboot the workstation.

If successful, the scrolling of dots and text on the display screen will culminate with the ldm login screen.  Login with your user name.  (Root will not be accepted.)

Should you be unsuccessful, obtain another gPXE or etherboot image, prepare a new floppy boot disk, and try again.  In past versions of LTSP, I have found it sometimes helps, when testing floppy images, to reboot the server after the workstation boot fails.  Then reboot the workstation using the new floppy image.


7--Installation Notes

1.  Trouble-shooting

If you are having trouble setting up LTSP, it may be that all of the services needed by LTSP are not running.  To show which daemons are running, enter the following:

   netstat    -lu     {lower-case L}

The output will show you if “nfs” and “tftp” are currently running.

   ps   -A 

will show if “nfsd”, “in.tftpd”, and “dhcpd3” are running.

2.  Routers.

I have always run a router on the same network as LTSP, although it is discouraged by LTSP developers.  It worked with no problems in LTSP 4.  My modifications for installing LTSP 5.0 also allowed a router using DCHP to exist on the same network.  LTSP 5.1, however, will not run with a DHCP router on the network.  If you are using a DHCP server on your network instead of a router, then make the appropriate changes in dhcpd.conf in both the LTSP server and the DHCP server before attempting to start the workstation.

3.  Network chips -- motherboard and adapter.

If you are using network adapter cards, they should all be from the same manufacturer and all have the same model number.  This will save the extra work that would be needed to test various images for each of the network chips used in your workstations.

When using a network adapter card instead of the motherboard lan, you must disable the motherboard lan in the bios. 

4.  Hard disk -- partitioning.

If you are going to install other operating systems on your server's hard drive, partition your hard disk prior to the installation of Lenny.  Use Partition Magic or one of the older partitioning programs for the task.  Partitions created by Windows Vista, while during the installation of Vista or while running Vista, are completely different than those created by Windows XP and DOS.  The new Microsoft (Vista) partitioning scheme overwrites the boundaries of partitions established with the older DOS method.  Although the partitions work initially, ultimately your partitions will fail with loss of your data.  (This has happened to me!) 

5.  Video cards.

It may be necessary to revise lts.conf if you have a newer video card.  The installed version of this file, found as /opt/ltsp/i386/etc/lts.conf, contains only minimal parameters.  Poorly supported video cards continue to be the bane of linux existence!

If you need to actively troubleshoot LTSP's xserver setup, you will have to do it in the LTSP chroot.  Prepare to do this by logging onto your Lenny server as root.  Then:

 chroot     /opt/ltsp/i386

 passwd     {enter your root password x 2 when requested}

 exit

From then on you can log on as root from the workstation console with <Ctrl>+<Alt>+<F1>.  Note that LTSP will not accept your logon to the <F1> console if you attempt to logon as a user.

6.  Boot manager.

Use a boot manager which installs on the master boot record or on a floppy if you have several operating systems on your server.

On non-SATA hard drives I use an old version of OSL2000 (8.77) which installs in DOS.  The newest version reportedly works with SATA drives -- but you must have Windows on one of your partitions to install it. 

For SATA drives I use AirBoot:

  http://hobbes.nmsu.edu/h-search.php?key=air+boot&pushbutton=Search

If you want to remove AirBoot, a simple DOS command of “fdisk   /mbr” will return the master boot record to its original condition without destroying any of the partition data.  AirBoot is free.

7.  Thinstation BootDisk522b.zip Disk -- contents.

The following etherboot images are present in the Thinstation multiboot image:

PCI CARDS: 3c90x, 3c595, cs89x0, davico, depca, e1000, eepro, eepro100, epic100, fa311, natsemi, ns8390, pcnet32, prism2_pci, prism2_plx, rtl8139, sis900, sk_g16, sundance, tg3, tlan, tulip, via-rhine, w89c840.

Although the disk also contains images for a few ISA network cards, do not use them.  ISA network cards require a complicated dhcpd.conf file.

8.  gPXE All-driver Floppy Image -- contents.

A listing of the vendor and device code for each network chip available in the gPXE format can be found at:

 http://rom-o-matic.net/gpxe/gpxe-git/gpxe.git/src/bin/NIC

9.  Miscellaneous notes -- LTSP desktop.

Gnome installs Adobe flash 9 which is worthless with youtube.  Get version 10 which works with all youtube videos.


8--Sample LTSP Files

The following files are from my LTSP 5.1 server.  Use them as examples of where and how the text must be altered.  New text is displayed in red.

Beware of copying text from one of these sample files and then pasting the text into a new file on your server:  unseen formatting codes may be generated by the copying process and cause the file to function improperly. 

Be sure to replace all IP addresses in these sample files with your own IP addresses.

1.  /etc/exports

  • Code:
  • ####

  • #  /etc/exports -- LTSP
  •  
  • /opt/ltsp    *(ro,no_root_squash,async,no_subtree_check)
  •  
  • #
  • ####

 

2.  /etc/default/tftpd-hpa

  • Code:
  • ####
  • #  /etc/default/tftpd-hpa -- LTSP
  •  
  • RUN_DAEMON=”yes
  • OPTIONS=”-l  -s  /var/lib/tftpboot”
  •  
  • #
  • ####

 

3. /etc/inetd.conf

  •  Code:
  • ####
  • #  /etc/inetd.conf -- LTSP
  • #  ---------------------------  snip  ---------------------
  •  
  • #:BOOT: TFTP service is provided primarily for booting.  Most sites
  • #       run this only on machines acting as “boot servers”.
  •  
  • #tftp    dgram   udp    wait   root  /usr/sbin/in.tftpd   /usr/sbin/in.tftpd   -s  /var/lib/tftpboot
  •  
  • #:RPC: RPC based services
  •  
  • # ---------------------------  snip  -----------------------
  • #####

 

4. /etc/dhcp3/dhcpd.conf

  • Code:
  • ####
  • #  /etc/dhcp3/dhcpd.conf -- LTSP 5.1 revised version
  •  
  • #  This file uses an IP address of 150 for your server.
  • #   IP addresses 100-110 are used for your workstations.
  •  
  • #  Comments, indicated by “#<--(text)”, show where specific
  • #   modifications are required to adapt my version of
  • #   dhcpd.conf to your own network.  Most of the corrections
  • #   entail entering your network's general address; some are
  • #   the specific address on your network for a specific computer.
  •  
  • #  Beware of   “; { }”  in the following text. If you erase one
  • #   of these punctuation marks or type one in the wrong place,
  • #   dhcpd.conf will *not* work.
  •  
  •  
  • authoritative;
  •  
  • subnet 192.168.2.0 netmask 255.255.255.0 {      #<--your networks IP
  •     range 192.168.2.100  192.168.2.110;             #<--workstation IP range
  •     option domain-name "myltsp.com";                  #<--make up a name
  •     option domain-name-servers 192.168.2.150;     #<--LTSP server IP
  •     option broadcast-address 192.168.2.255;         #<--your network IP
  •     option routers 192.168.2.1;                           #<--your router IP
  •     next-server 192.168.2.150;                            #<--LTSP server IP
  •     # get-lease-hostnames true;
  •     option subnet-mask 255.255.255.0;
  •     option root-path "/opt/ltsp/i386";
  •  
  •     if substring ( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
  •         filename "/ltsp/i386/pxelinux.0";
  •     } else {
  •         filename "/ltsp/i386/nbi.img";
  •     }
  • }
  •  
  • #
  • ####

 

5. /etc/network/interfaces

  •  Code:
  • ####
  • # /etc/network/interfaces -- LTSP
  • #
  • # change IP addresses indicated with "#<--text"
  •  
  • ## The loopback network interface
  • auto lo
  • iface lo inet loopback
  •  
  • ## The primary network interface - dynamic
  • #auto eth0
  • #iface eth0 inet dhcp

  • # The primary network interface - static
  • auto eth0
  • iface eth0 inet static
  •   address           192.168.2.150    #<--your server IP address
  •   netmask          255.255.255.0
  •   network          192.168.2.0        #<--your network IP address
  •   broadcast        192.168.2.255     #<--your network IP address
  •   gateway          192.168.2.1        #<--your router IP address
  •            
  • #
  • ####


9--References

(1)  http://linuxagora.com/vbforum/showthread.php?t=749

(2)  http://linuxagora.com/vbforum/showthread.php?t=860

(3)  http://wiki.debian.org/LTSP/Howto?highlight=ltsp

(4)  http://ubuntuforums.org/archive/index.php/t-997955.html


Edits:  29 May 2009 -- Added text, lost during editing, to /etc/network/interfaces sample file.