Differences between revisions 75 and 77 (spanning 2 versions)
Revision 75 as of 2014-11-02 13:13:20
Size: 11036
Editor: ?RichardKweskin
Comment:
Revision 77 as of 2014-11-06 11:15:14
Size: 16360
Editor: ?RichardKweskin
Comment:
Deletions are marked like this. Additions are marked like this.
Line 117: Line 117:
Only when the server has an update or software is added that is desirable for clients should one repeat the step: The following changes require a re-creation of the squashfs image:

W
hen the server is updated.

S
oftware is added to the server that is desirable for clients.

This
means one repeats the step:
Line 122: Line 128:

At the time of writing Debian Jessie's version of xserver-xorg is 1.16. This may not run well on some older graphic cards. Debian Wheezy, on the other hand, has the 1.12 version and will work on many of those older graphic cards.

== Installing LTSP-PNP on Wheezy ==

The version of LTSP employed here is 5.4.2-6+deb7u1, running on Debian Wheezy. This particular model has much less flexibilty since the clients must run the same version of distribution and platform as the server. The upside is that the model is easier to maintain. Thus a 32bit version (Wheezy i386) is suggested. There is no separate chroot (sometimes referred to as ltsp-pnp) and nbd (rather than nfs) is used to provide a squashfs image.

The use of dnsmasq is another choice providing less flexibility in exchange for ease of configurability and maintenance. The default config file generated provides its use as the tftp server as well as handling dhcp-proxy or dhcp-server proper with the adjustment of commenting and/or uncommenting lines provided.

 1. Update the server, ensure the ip(s) is/are as desired (static is recommended) and /etc/hosts is as desired.

 1. Install ltsp-server-standalone, ltsp-client (since there is to be no separate chroot) dnsmasq (an easy to configure tool) other desired software and the desktop environment of your choice.

 1. On the commandline run as root {{{
ltsp-config dnsmasq
}}}

 This reports Created /etc/dnsmasq.d/ltsp-server-dnsmasq.conf [ ok ]
 Restarting DNS forwarder and DHCP server: dnsmasq

 1. If the server will run one subnet containing the Internet connection and the clients it need have only one network interface card. In this case dnsmasq can be configured to run a dhcp-proxy if there already is another dhcp server active. In this case edit the above file to comment out the dhcp range line and ensure there is a line (uncommented) stating dhcp-proxy.

 1. If the server will also run a dhcp-server then comment out the dhcp-proxy line and leave the dhcp-range line uncommented, ensuring the subnet entries are correct.

 1. Edit the config file /etc/ltsp/update-kernels.conf to have the uncommented lines: {{{
BOOT_METHODS=NBD
IPAPPEND=3
}}}

 1. Inspect and edit as desired /etc/ltsp/ltsp-update-image.excludes as some software running on the server will not be appropriate for the clients.

Note that at the time of writing the wheezy kernel was 3.2.0-4-486. Please check which version is running on the server and edit the following as needed.
{{{
dpkg-reconfigure linux-image-3.2.0-4-486
}}}


 this reports update-initramfs: Generating /boot/initrd.img-3.2.0-4-486
 adding the changes above.


 1. On the commandline run as root:{{{
ltsp-update-image --cleanup /
}}}

this reports

Updating /var/lib/tftpboot directories for chroot: i386

(i.e. putting pxelinux.0 and pxelinux.cfg and the latest kernel into
/var/lib/tftpboot/ltsp/i386/)

and triggers ltsp-config nbd-server reporting

Created /etc/nbd-server/conf.d/swap.conf
Created /etc/nbd-server/conf.d/ltsp_i386.conf
  nbd-server.

(it also creates /etc/nbd-client but did not report it)
(as well as putting the latest squashfs image for nbd into
/opt/ltsp/images)
 This creates the squashfs image at /opt/ltsp/images used by nbd and takes an appropriate subset of what the actual server is running, which is why update-kernels.conf was edited earlier.

 If there is an error message "FATAL: Module overlayfs not found" it is a non-issue since aufs is used instead of overlayfs.

 1. On the commandline run as root:{{{
service nbd-server restart
}}}

 1. On the commandline run as root:{{{
ltsp-config lts.conf
}}}

This creates a default lts.conf file which many should study and edit as appropriate. Note that all headings (written between square brackets) should have at least one entry each so don't leave any empty.

This file plays a role similar to xorg.conf for xorg and there are many options for it to choose from. One is worth mentioning here:

Under [Default] the option LDM_DIRECTX = True (the default is false) allows one to turn off the encrypted X tunnel via SSH, and instead run a less secure, but much faster unencrypted tunnel. If speed is important and security is less so then it is recommended.

As this model describes a usage with nbd rather than Debian's default using nfs note that the useful file lts.conf is in/var/lib/tftpboot/ltsp/i386/ which among other things means that changes made to this file do NOT require a re-creation of the squashfs image.

When ready to try ltsp don't forget to create users as appropriate for the clients. This also does NOT require a re-creation of the squashfs image.

Notes:


The following changes require a re-creation of the squashfs image:

When the server is updated.

Software is added to the server that is desirable for clients.

This means one repeats the step:

On the commandline run as root:{{{
ltsp-update-image --cleanup /
}}}

At the time of writing Debian Jessie's version of xserver-xorg is 1.16. This may not run well on some older graphic cards. Debian Wheezy, on the other hand, has the 1.12 version and will work on many of those older graphic cards.

Translation(s): Português Brasileiro


LTSP How To

Upstream documentation with official, detailed information about installing LTSP is at http://wiki.ltsp.org/wiki/LTSPedia.

Installating and configuring LTSP

This section documents a standard Debian LTSP installation on recent versions of Debian (wheezy and jessie), which uses NFS for a root filesystem, and ISC DHCPD.

  1. If you want a complete LTSP server with all the bells and

    whistles:

    apt-get install ltsp-server-standalone

    If you want more fine-grained control, splitting some services off to separate servers, you can install ltsp-server instead, and manually install each of the other services.

  2. Build the LTSP client environment, downloading packages from the internet:

    ltsp-build-client

    If your clients do not support 64-bit extensions (amd64), and your server is 64-bit, you may want to build your chroot specifying the i386 architecture:

    ltsp-build-client --arch i386
  3. Configure DHCP. Edit /etc/ltsp/dhcpd.conf to adapt to your network.

    Include the LTSP dhcpd.conf at the bottom of /etc/dhcp/dhcpd.conf:

    include "/etc/ltsp/dhcpd.conf";

    Restart isc-dhcp-server:

    service isc-dhcp-server restart
  4. Configure /etc/exports:

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

    Restart nfs-kernel-server:

    service nfs-kernel-server restart
  5. Boot a PXE capable machine and enjoy.

Installing LTSP using the LTSP-PNP method

The version of LTSP employed here is 5.5.2-1, running on Debian Jessie, but should also work with wheezy. This particular model has much less flexibilty since the clients must run the same version of distribution and platform as the server. The upside is that the model is easier to maintain. Thus a 32bit version (Jessie i386) is suggested. There is no separate chroot (sometimes referred to as ltsp-pnp) and nbd (rather than nfs) is used to provide a squashfs image.

The use of dnsmasq is another choice providing less flexibility in exchange for ease of configurability and maintenance. The default config file generated provides its use as the tftp server as well as handling dhcp-proxy or dhcp-server proper with the adjustment of commenting and/or uncommenting lines provided.

  1. Update the server, ensure the ip(s) is/are as desired (static is recommended) and /etc/hosts is as desired.
  2. Check to see if the loop module is installed. If not add a line with the word loop to /etc/modules and reboot the server. The current version of mount in Jessie (2.25.1-5) should automatically load the loop module as needed.
  3. Install ltsp-server-standalone, ltsp-client (since there is to be no separate chroot) dnsmasq (an easy to configure tool) other desired software and the desktop environment of your choice.
  4. On the commandline run as root

    ltsp-config dnsmasq
    This creates a default config file /etc/dnsmasq.d/ltsp-server-dnsmasq.conf
  5. If the server will run one subnet containing the Internet connection and the clients it need have only one network interface card. In this case dnsmasq can be configured to run a dhcp-proxy if there already is another dhcp server active. In this case edit the above file to comment out the dhcp range line and ensure there is a line (uncommented) stating dhcp-proxy.
  6. If the server will also run a dhcp-server then comment out the dhcp-proxy line and leave the dhcp-range line uncommented, ensuring the subnet entries are correct.
  7. On the commandline run as root:

    service dnsmasq restart
  8. Edit the config file /etc/ltsp/update-kernels.conf to have the uncommented lines:

    BOOT_METHODS=NBD
    IPAPPEND=3
  9. Inspect and edit as desired /etc/ltsp/ltsp-update-image.excludes as some software running on the server will not be appropriate for the clients.
  10. On the commandline run as root:

    ltsp-update-image --cleanup /
    This creates the squashfs image at /opt/ltsp/images used by nbd and takes an appropriate subset of what the actual server is running, which is why update-kernels.conf was edited earlier.
  11. On the commandline run as root:

    ltsp-config nbd-server
    This creates 3 files: /etc/nbd-server/conf.d/swap.conf /etc/nbd-client and /etc/nbd-server/conf.d/ltsp_i386.conf. If there is an error message "FATAL: Module overlayfs not found" it is a non-issue since aufs is used instead of overlayfs.
  12. On the commandline run as root:

    service nbd-server restart
  13. On the commandline run as root:

    ltsp-config lts.conf

This creates a default lts.conf file which many should study and edit as appropriate. Note that all headings (written between square brackets) should have at least one entry each so don't leave any empty.

This file plays a role similar to xorg.conf for xorg and there are many options for it to choose from. One is worth mentioning here:

Under [Default] the option LDM_DIRECTX = True (the default is false) allows one to turn off the encrypted X tunnel via SSH, and instead run a less secure, but much faster unencrypted tunnel. If speed is important and security is less so then it is recommended.

As this model describes a usage with nbd rather than Debian's default using nfs note that the useful file lts.conf is in/var/lib/tftpboot/ltsp/i386/ which among other things means that changes made to this file do NOT require a re-creation of the squashfs image.

When ready to try ltsp don't forget to create users as appropriate for the clients. This also does NOT require a re-creation of the squashfs image.

Notes:

The following changes require a re-creation of the squashfs image:

When the server is updated.

Software is added to the server that is desirable for clients.

This means one repeats the step:

On the commandline run as root:

ltsp-update-image --cleanup /

At the time of writing Debian Jessie's version of xserver-xorg is 1.16. This may not run well on some older graphic cards. Debian Wheezy, on the other hand, has the 1.12 version and will work on many of those older graphic cards.

Installing LTSP-PNP on Wheezy

The version of LTSP employed here is 5.4.2-6+deb7u1, running on Debian Wheezy. This particular model has much less flexibilty since the clients must run the same version of distribution and platform as the server. The upside is that the model is easier to maintain. Thus a 32bit version (Wheezy i386) is suggested. There is no separate chroot (sometimes referred to as ltsp-pnp) and nbd (rather than nfs) is used to provide a squashfs image.

The use of dnsmasq is another choice providing less flexibility in exchange for ease of configurability and maintenance. The default config file generated provides its use as the tftp server as well as handling dhcp-proxy or dhcp-server proper with the adjustment of commenting and/or uncommenting lines provided.

  1. Update the server, ensure the ip(s) is/are as desired (static is recommended) and /etc/hosts is as desired.
  2. Install ltsp-server-standalone, ltsp-client (since there is to be no separate chroot) dnsmasq (an easy to configure tool) other desired software and the desktop environment of your choice.
  3. On the commandline run as root

    ltsp-config dnsmasq
    This reports Created /etc/dnsmasq.d/ltsp-server-dnsmasq.conf [ ok ] Restarting DNS forwarder and DHCP server: dnsmasq
  4. If the server will run one subnet containing the Internet connection and the clients it need have only one network interface card. In this case dnsmasq can be configured to run a dhcp-proxy if there already is another dhcp server active. In this case edit the above file to comment out the dhcp range line and ensure there is a line (uncommented) stating dhcp-proxy.
  5. If the server will also run a dhcp-server then comment out the dhcp-proxy line and leave the dhcp-range line uncommented, ensuring the subnet entries are correct.
  6. Edit the config file /etc/ltsp/update-kernels.conf to have the uncommented lines:

    BOOT_METHODS=NBD
    IPAPPEND=3
  7. Inspect and edit as desired /etc/ltsp/ltsp-update-image.excludes as some software running on the server will not be appropriate for the clients.

Note that at the time of writing the wheezy kernel was 3.2.0-4-486. Please check which version is running on the server and edit the following as needed.

dpkg-reconfigure linux-image-3.2.0-4-486
  • this reports update-initramfs: Generating /boot/initrd.img-3.2.0-4-486 adding the changes above.
  • On the commandline run as root:

    ltsp-update-image --cleanup /

this reports

Updating /var/lib/tftpboot directories for chroot: i386

(i.e. putting pxelinux.0 and pxelinux.cfg and the latest kernel into /var/lib/tftpboot/ltsp/i386/)

and triggers ltsp-config nbd-server reporting

Created /etc/nbd-server/conf.d/swap.conf Created /etc/nbd-server/conf.d/ltsp_i386.conf

  • nbd-server.

(it also creates /etc/nbd-client but did not report it) (as well as putting the latest squashfs image for nbd into /opt/ltsp/images)

  • This creates the squashfs image at /opt/ltsp/images used by nbd and takes an appropriate subset of what the actual server is running, which is why update-kernels.conf was edited earlier. If there is an error message "FATAL: Module overlayfs not found" it is a non-issue since aufs is used instead of overlayfs.
  • On the commandline run as root:

    service nbd-server restart
  • On the commandline run as root:

    ltsp-config lts.conf

This creates a default lts.conf file which many should study and edit as appropriate. Note that all headings (written between square brackets) should have at least one entry each so don't leave any empty.

This file plays a role similar to xorg.conf for xorg and there are many options for it to choose from. One is worth mentioning here:

Under [Default] the option LDM_DIRECTX = True (the default is false) allows one to turn off the encrypted X tunnel via SSH, and instead run a less secure, but much faster unencrypted tunnel. If speed is important and security is less so then it is recommended.

As this model describes a usage with nbd rather than Debian's default using nfs note that the useful file lts.conf is in/var/lib/tftpboot/ltsp/i386/ which among other things means that changes made to this file do NOT require a re-creation of the squashfs image.

When ready to try ltsp don't forget to create users as appropriate for the clients. This also does NOT require a re-creation of the squashfs image.

Notes:

The following changes require a re-creation of the squashfs image:

When the server is updated.

Software is added to the server that is desirable for clients.

This means one repeats the step:

On the commandline run as root:

ltsp-update-image --cleanup /

At the time of writing Debian Jessie's version of xserver-xorg is 1.16. This may not run well on some older graphic cards. Debian Wheezy, on the other hand, has the 1.12 version and will work on many of those older graphic cards.

Installing LTSP on Lenny

  1. If you want a complete LTSP server with all the bells and whistles:

    apt-get install ltsp-server-standalone

    If you want more fine-grained control, splitting some services off to separate servers, you can install ltsp-server instead, and manually install each of the other services.

    (you can also get backported packages for lenny: LTSP/Howto/Lenny-With-Backports)

  2. Build the LTSP client environment:

    ltsp-build-client

ltsp-build-client uses the Internet to fetch packages.

In case you got backported packages at step 1., it is strongly recommended to use backports packages too to build client, or you may have incompatibilities (bad ldm version, login failed...). Please, use the following command:

 ltsp-build-client \
  --backports-mirror "http://backports.debian.org/debian-backports" \
  --apt-key /etc/apt/trusted.gpg

(details: LTSP/Howto/Lenny-With-Backports)

In case your thin clients are old, please use the following parameter:

 ltsp-build-client \
  --arch i386

In case you have a slow Internet connection or want to use Local DVDs of Debian. Please use the following command:

ltsp-build-client --mirror file://mnt/Debian_Lenny_Bluray_Image.img --security-mirror none --accept-unsigned-packages

Since the ltsp-build-client uses more than one Debian DVD you would need to build a ?BluRay Image using the jigdo template of ?BluRay Disc. This Image location can be passed as the argument. The security-mirror-none option prevents updates from being downloaded. The accept-unsigned-packages allows the building to go on even using unsigned packages.

  • If you're installing a different Debian distribution than what's on the server, you will need to specify the --dist xxx commandline option. where xxx is your Debian distribution (e.g. lenny, squeeze). See /usr/share/debootstrap/scripts/ and the Debootstrap page.
    ltsp-build-client will download a complete Debian filesystem into /opt/ltsp/i386 (or specify an alternate location with --base) and install the ltsp-client and ldm packages (the LTSP Display Manager). Typically, you will need a desktop environment like Gnome or Xfce, or a window manager such as icewm installed on the server (NOT in the chroot).

    If you change the IP data after you have done the initial setup, run ltsp-update-sshkeys on the server. The files the client will boot are installed on the server into /var/lib/tftpboot.

  • Configure /etc/dhcp3/dhcpd.conf and /etc/ltsp/dhcpd.conf: Edit /etc/ltsp/dhcpd.conf to adapt to your network. See examples in /usr/share/doc/ltsp-server/examples/dhcpd.conf as a reference.

    Include the LTSP dhcpd.conf at the bottom of /etc/dhcp3/dhcpd.conf:

    include "/etc/ltsp/dhcpd.conf";

    Take care at the next-server line, which specify the IP address of the TFTP server. Restart dhcp3-server:

    invoke-rc.d dhcp3-server restart
    Alternately, configure /etc/dnsmasq.conf. See the example in /usr/share/doc/ltsp-server/examples/dhcpd-dnsmasq and adapt to your network.

    Restart dnsmasq:

    invoke-rc.d dnsmasq restart
  • Configure /etc/exports:

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

    Restart nfs-kernel-server:

    invoke-rc.d nfs-kernel-server restart

    Now make sure that portmap is not started on the loopback interface only. Look into /etc/default/portmap and verify that there is no line saying

    OPTIONS="-i 127.0.0.1"

    If there is such a line, comment it out by prepending a # character and restart portmap by:

    invoke-rc.d portmap restart
  • Start tftpd. By default, tftpd-hpa is started from inetd. you may need to restart inetd after installing tftpd-hpa:

    invoke-rc.d openbsd-inetd restart

    Alternately, edit /etc/default/tftpd-hpa to have tftpd-hpa start on its own:

    RUN_DAEMON="yes"

    Then, comment the tftpd entry in /etc/inetd.conf:

    #tftp           dgram   udp     wait    root  /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot

    Restart inetd:

    invoke-rc.d openbsd-inetd restart

    and restart tftpd-hpa:

    invoke-rc.d tftpd-hpa restart
  • Boot a PXE or Etherboot capable machine and enjoy. Note that some older versions of etherboot do not support ELF images, and may not work without additional configuration.

Customizations in the chroot

Two important configuration files inside the client are /var/lib/tftpboot/ltsp/i386/lts.conf (or /opt/ltsp/i386/etc/lts.conf for NFS) and /opt/ltsp/i386/etc/default/ltsp-client-setup. See the examples in /opt/ltsp/i386/usr/share/doc/ltsp-client*.

See also see the Edubuntu wiki http://doc.ubuntu.com/edubuntu/edubuntu/handbook/C/customizing-thin-client.html (note: Debian LTSP still uses NFS by default).