Differences between revisions 12 and 13
Revision 12 as of 2007-08-02 13:59:28
Size: 6813
Editor: KnutYrvin
Comment: running ltsp-make client takes time
Revision 13 as of 2007-08-11 08:56:34
Size: 8898
Editor: ?HelgeToreHøyland
Comment:
Deletions are marked like this. Additions are marked like this.
Line 76: Line 76:
/!\ can someone test this?
Line 81: Line 81:

This configuration has been tested and found to work properly.

= Resizeing Sentral Swap =

Sentral swap is turned on as default in Etch. But the size of it is rather small. If needed the size of it can be easely changed.
   *You need to add a line: SIZE=xxx to /etc/ltsp/nbdswapd.conf on your ltspserver ;xxx is your preferable size of swap in MB. After a restart of the diskless klient the new amount of swap is applied.
   *Have in mind the memoryusage on you partition /var/opt/ltsp/swapfiles. If needed resize it:
   {{{
   lvextend --size +xxG /dev/vg_system/var+opt+ltsp+swapfiles ;xx is your needed amount of space.
   resize2fs /dev/vg_system/var+opt+ltsp+swapfiles
   }}}

== example /etc/ltsp/nbdswapd.conf ==

{{{
SWAPDIR=/var/opt/ltsp/swapfiles
SIZE=512
}}}

== Using Local Swap ==

Sometimes it is more prefearable to use local swap partitions. This is easely done.
   *You need to make a swap patition on your harddrive. Use any linux installation and chose manual partition when promted. Make a swappartition of decired size and a small /-partition(only the size needed to beeing allowed to continue installing). Finnish of the partition and brake out of the install when the formating is done. Any other method to make a linux swap partition is also ok.
   *Next you enable local swap by adding a line USE_LOCAL_SWAP=Y to the [Default] section in /opt/ltsp/i386/etc/lts.conf on your ltspserver. Remeber to turn off sentral swap by using the line NBD_SWAP=N in the same file.
   *A restart of the client will change the swap automaticaly.

== example /opt/ltsp/i386/etc/lts.conf ==

{{{
[Default]
        USE_LOCAL_SWAP=Y
        NBD_SWAP=N
}}}
Line 112: Line 146:
== ==
/!\ Memory usage on diskless workstations.
When running diskless workstations on 256MB RAM you will get freesups when using OpenOffice.org. This is true even when you use sentral or local swap. Workaround is to add more RAM, 128MB RAM more will do fine. This has been tested on Pentium 3, 733 MHz cpu with 384MB PC 100 RAM. When using 512MB RAM the problem didn't appear, even without swap enabled.

?TableOfContents(2)

What

This page is suposed to become the instructions in how you can run Diskless workstations from a skolelinux3.0 installation. Diskless workstations are also marketed using the term "LowFat Clients" or "Halfthin Clients" or "stateless workstations".

A diskless workstation is similar to a thin client in that it bootes from the network with pxe. But instead of running applications on the server and displaying them on the thin client screen with X. A diskless workstations mounts it's root filesystem from its next-server, and runs all applications on the local hardware. You can think about it like a regular workstation with a very long harddrive cable.

Why

  • to better utilize the power of your client hardware
  • to get a full workstation experience, with all local devices working correctly
  • but still maintain central configuration and no maintainance of the individual client.
  • lower the demands of the central server, or run more clients of the same server.
  • on a 100 Mbit/s network it's possible to run 150 diskless workstations compared to 50-60 thin client

why not

  • older hardware will be very slow as a (diskless) workstation, you should have a P3 800-1000Mhz with 256-512MB ram, or there about. Try for yourself and see if your hardware is powerfull enough as a diskless workstation.
  • the workstations will require more horsepower, and will be more noisy then a thinclient. you will have CPU fan and PSU fan noise. I have yet to find a resonably priced 100% silent computer with enough power. So you loose the 40 computers in a room and no noise experience you can get from thin clients.
  • fans means moving parts, moving parts means higher risk of hardware failure. a thinclient is less likely to display the aging syndroms that regular pc's experience. Like the noise from a worn out fan. Expect slightly more hardware issues with diskless workstations then you do with thinclients with no moving parts.

How

  1. prerequisites
    • a regular skolelinux setup with tjener and preferably internet access
    • a fresh installed skolelinux terra/etch thin client server, that you want to run diskless workstations from (this server is promoted as "next-server" by tjener's dhcp)
    • combined server work fine (You must not edit pxelinux.cfg/default and in dhcpd.conf you must only enable your workstations).
    • swap on each diskless workstation is recommended. Schools has experienced that clients with 256 MB RAM freezes when swap is not enabled. Swap can be run on the server or on local harddrive
    • /!\ enough space on /opt? It need to be at least 3.5 GiB.

    • /!\ patience and enough time. The ltsp-make-client script downloads and installs the complete Debian Edu into your chroot

          lvextend --size +1G /dev/vg_system/opt 
          resize2fs /dev/vg_system/opt
  2. Edit /opt/ltsp/i386/etc/apt/sources.list.
    • Because the CDs and DVD is not signed, one need to use network APT sources.
    • Add the security repository.

deb http://ftp.skolelinux.org/debian/ etch main
deb http://ftp.skolelinux.org/skolelinux/ etch local
deb http://security.debian.org/ etch/updates main
  1. Then run the command /usr/sbin/ltsp-make-client This will adapt your chroot /opt/ltsp/i386 to diskless workstation, and install the packages needed for a workstation there. If it fails for some reason you can run it with sh -x /usr/sbin/ltsp-make-client to get a more verbose output. (run outside the chroot). /!\ This command downloads and installs a complete debian installation into your chroot, so it can take a very long time.

/usr/sbin/ltsp-make-client
  • /!\ if you run this with bash you will end up with a minor bug in /etc/dhcpd3/dhcpd.conf. The default dash shell in Skolelinux-3.0 works fine.

  1. add nfsroot=/opt/ltsp/i386 to the end of the append line in /var/lib/tftpboot/ltsp/i386/pxelinux.cfg/default

    • if you don't you'll get an error on the client about not being able to mount /var/lib
  2. edit your main dhcpd.conf file located on tjener.intern:/etc/dhcp3/dhcpd.conf, you'll need
    • a next-server line pointing to the server serving diskless workstation root. ie the ltsp-server where you ran ltsp-make-client
    • remember to restart the dhcp service
  3. Connect your diskless workstation to your workstation network 10.0.2.0/23
    • The same client can function as thinclient or diskless workstation, depending on where you connect it. 10.0.2.0/23 for workstations, 192.168.0.0/24 for thin clients.

This is setup in the file /opt/ltsp/i386/etc/init.d/ltsp_set_runlevel If you want your diskless workstation on the 192.168.0.0/24 network, you may change this here

  1. boot your client.
    • if all went well you should be looking at the kdm login screen
  2. login and use your system
    • /!\ keep in mind your diskless workstations need to be added to your ldap netgroups, just like any other workstation. Otherways it wont be able to mount your HOME dir, and you won't be able to login.

example dhcpd.conf snippet

host static04 {
   hardware ethernet 00:00:00:00:00:00;
   fixed-address static04;
   filename "/var/lib/tftpboot/ltsp/i386/pxelinux.0";
   option root-path  "/opt/ltsp/i386";
   next-server ltspserver00;
   # next-server tjener; # for a combi server 
}

example /var/lib/tftpboot/pxelinux.cfg/default

DEFAULT vmlinuz ro initrd=initrd.img quiet splash root=/dev/nfs ip=dhcp  nfsroot=/opt/ltsp/i386

(you can only add a boot option for booting a locally installed operating system)

This configuration has been tested and found to work properly.

Resizeing Sentral Swap

Sentral swap is turned on as default in Etch. But the size of it is rather small. If needed the size of it can be easely changed.

  • You need to add a line: SIZE=xxx to /etc/ltsp/nbdswapd.conf on your ltspserver ;xxx is your preferable size of swap in MB. After a restart of the diskless klient the new amount of swap is applied.
  • Have in mind the memoryusage on you partition /var/opt/ltsp/swapfiles. If needed resize it:
       lvextend --size +xxG /dev/vg_system/var+opt+ltsp+swapfiles   ;xx is your needed amount of space.
       resize2fs /dev/vg_system/var+opt+ltsp+swapfiles

example /etc/ltsp/nbdswapd.conf

SWAPDIR=/var/opt/ltsp/swapfiles
SIZE=512

Using Local Swap

Sometimes it is more prefearable to use local swap partitions. This is easely done.

  • You need to make a swap patition on your harddrive. Use any linux installation and chose manual partition when promted. Make a swappartition of decired size and a small /-partition(only the size needed to beeing allowed to continue installing). Finnish of the partition and brake out of the install when the formating is done. Any other method to make a linux swap partition is also ok.
  • Next you enable local swap by adding a line USE_LOCAL_SWAP=Y to the [Default] section in /opt/ltsp/i386/etc/lts.conf on your ltspserver. Remeber to turn off sentral swap by using the line NBD_SWAP=N in the same file.
  • A restart of the client will change the swap automaticaly.

example /opt/ltsp/i386/etc/lts.conf

[Default]
        USE_LOCAL_SWAP=Y
        NBD_SWAP=N

Upgrade Kernel

(is that still needed in etch? h01ger, 2007-07-20)

chroot /opt/ltsp/i386 
aptitude update
aptitude install linux-image-2.6.18-4-486
exit

Then you must prepare the system to use the new kernel

/usr/sbin/ltsp-update-kernels

Further Reading

Known Problems

With Skolelinux 3.0r0 auto mounting of CD-ROMs though KDE (via popup window) does not correctly. When selecting "Open in new Window" KDE will complain that the file system did not match. A fix is being worked on, until then use pmount:

pmount /dev/cdrom
pumount /dev/cdrom

== == /!\ Memory usage on diskless workstations. When running diskless workstations on 256MB RAM you will get freesups when using OpenOffice.org. This is true even when you use sentral or local swap. Workaround is to add more RAM, 128MB RAM more will do fine. This has been tested on Pentium 3, 733 MHz cpu with 384MB PC 100 RAM. When using 512MB RAM the problem didn't appear, even without swap enabled.

Confirmation

These people have followed these instructions successfully:

Name

Date

Remark


?CategoryHowto