Setting Up an Ubuntu LTSP server (Obsolete)

Introduction

This article describes how to set up an LTSP server using fat clients and the i386 architecture. Options are included for thin clients and/or the amd64 architecture.

Setting up an LTSP Server

1. Boot from Ubuntu 10.04 Alternate CD

2. Select LTSP Server from the Options menu (F4)

3. Select Install Ubuntu.

4. Make sure to set the Locale to Canadian so the server detects the CSC mirror as the closest.

5. When prompted, select eth0 as the primary network interface.

6. The installer will attempt to auto-configure using DHCP, but it will fail. Select "configure network manually". The following settings are used in the LTSP test.

IP address: 129.97.170.228

Netmask: 255.255.255.0

Gateway: 129.97.170.1

Name Server: 129.97.152.100 129.97.152.10

Hostname: ltsp1-gw-test

Domain Name: uwaterloo.ca

7. Partition the hard drive according to the server configuration. The LTSP server needs about 30GB.

The installer will now install the base Ubuntu system.

8. Enter a username and password. The test server uses the 2010 CSCF-op account.

9. When asked to encrypt your home directory, select no.

Apt will try to download new packages and configurations from the internet or use those from the disk if it can't find them. After updating, the default image is built automatically (amd64 thin client).

10. Indicated the interface that the thin clients are connected to. The test server uses eth1 for this purpose.

11. Install GRUB if necessary. If no bootloader exists already, just answer "yes" when the installer offers to install GRUB.

12. Answer "yes" to the configure the system to use UTC time.

13. The installation is completed. Unmount the CD drive or image that was loaded. The machine will restart automatically.

14. Open the terminal and execute the following command:

sudo ltsp-build-client --arch i386 --fat-client

This creates a 32-bit fat client image. This is a fairly lengthy process, but it does not require any user input along the way.

15. Open /etc/network/interfaces and configure the interface you chose to face the thin clients (eth1 in this case). Change the network information from 192.168.0.* to the appropriate values for your subnet (10.15.49.* in the test case).

16. Change the settings in /etc/ltsp/dhcpd.conf to be the same as above. The LTSP server should be in the option-routers field. In all the directories, change amd64 to i386 to set the 32-bit image as the default one. Make sure that the option domain-name-servers is set to the same DNS servers the host is using.

17. Restart the DHCP server with:

sudo /etc/init.d/dhcp3-server restart

Note that immediately after restarting the server, restarting the DHCP daemon or rebuilding the client image, the server may exhibit erratic behaviour for a few minutes. DHCP leases take a long time to get issued, valid logins will not register, clients freeze on startup, etc.

18. Now, it's time to add users. Users added to the server will be able to use the clients. Note that users that have the "do not ask for password on login" checkbox checked will still be required to enter a password when using a client. Additionally, sudo does not work when using the clients. All administrative changes to the image must be done from the server side. This step is not necessary if you set up Active Directory authentication. In this case, make sure the /xhbin directory contains symlinks to any user's default shell, or they will be unable to log in. Users that use csh or tcsh as their default shell experience problems establishing an X session on the server, so avoid those. A basic server is now set up.

19. WARNING: If you used the guide linked to above to use Active Directory, edit the /etc/nsswitch.conf file to contain the following three lines instead of the ones given in the guide:

passwd:    files ldap
group:       files
shadow:    files ldap

If you do not, the client will attempt to enumerate all the groups. If you don't have a lot, you might not experience much slowdown, but it can take as much as several minutes to log in if you are in a large organization.

Customizing your image

This section assumes you are working on an image named "i386". If you are editing a custom image, change i386 to the name of your custom image.

1. Copy over the apt sources:

sudo cp /etc/apt/sources.list /opt/ltsp/i386/etc/apt/sources.list

2. Activate chroot and mount the filesystem:

chroot /opt/ltsp/i386

mount -t proc proc /proc

Note: while in chroot, you are root. When copying commands from the twiki, omit the "=sudo=" part.

3. Update apt:

apt-get update && apt-get dist-upgrade

4. Use the command line to install whatever other packages you need.

5. When you're done, unmount the filesystem and exit.

umount /proc exit

6. Before the clients can use your updates, you must update the image:

ltsp-update-image --arch i386

Groups, Static IPs and Hostnames

It is possible to control various settings using the /etc/ltsp/dhcp.conf file.

1. Open the /etc/ltsp/dhcp.conf file. 2. Within the subnet braces, insert the following lines:

group

{
   use-host-decl-names on;
   host hostname
   {
      hardware ethernet macaddress;
      fixed-address ipaddress;
   }
}

3. Replace hostname with the client's name, macaddress with the client's MAC address and ipaddress with the desired static IP address.

4. Add additional hosts or groups if necessary.

5. You must restart the DHCP server for changes to take effect:

sudo /etc/init.d/dhcp3-server restart

Multiple Images

It is also possible to have clients in a group boot from a different image than the default one.

1. Build a base for your custom image:

sudo ltsp-build-client --arch i386 --fat-client --chroot i386-custom

This will create an image that is identical in every way to the default i386 image, except with a different name. You may also omit the fat-client option to built a thin client image and omit the --arch option to build a 64 bit image. The --chroot option changes the name of the image. i386-custom can be replaced with whatever name you want.

2. Update and customize the image using the steps described in the "Customizing your image" section.

3. Edit the /etc/ltsp/dhcpd.conf file as described in the "Groups, Static IPs and Hostnames" section. Create at least one group that will use the custom image.

4. Add the following lines in that group:

if substring( option vendor-class-identifier , 0 , 9 ) = "PXEClient"
{
   filename "/ltsp/i386-custom/pxelinux.0";
}
else
{
   filename "/ltsp/i386-custom/nbi.img";
}
option root-path "/opt/ltsp/i386-custom/";

5. Restart the DHCP server:

sudo /etc/init.d/dhcp3-server restart

The clients in that group will now boot using the specialized image.

Customizing the login screen

By default, the login screen is a splash of orange and the Ubuntu logo. This can be modified by replacing images in the opt/ltsp/i386/usr/share/ldm/themes/ubuntu/ directory, namely the background, bg.png and the logo, logo.png. Various color settings can be found in greeter-gtkrc.

-- PhilipBeldowski - 24 Sep 2010 -- PeterSamsonov - 05 Oct 2010

Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r11 - 2024-11-26 - MariHassanzada
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback