Child pages
  • LTSP - server setup and image administration
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 79 Next »

Most of the following commands request root permissions. Use the sudo command or become root to run them.

A great source of help: https://help.ubuntu.com/community/UbuntuLTSP


Set the server

Preparation

Configure the sources to use the cache of the server

#create /etc/apt/apt.conf if it does not exist and add following line

/etc/apt/apt.conf
Acquire::http { Proxy "http://192.168.28.2:3142"; }
apt-get update

Change the hostname

#edit:

/etc/hosts
127.0.0.1 localhost
127.0.1.1 server.bluelight.av server

#edit:

/etc/hostname
server

/etc/init.d/hostname restart

hostname -f

#if not successful reboot...

Install and configure LTSP  

Install ltsp-server-standalone

 apt-get install ltsp-server-standalone

Edit the installation option of ltsp-build-client

#edit:

/etc/ltsp/ltsp-build-client.conf
# The chroot architecture. 
ARCH=i386
FAT_CLIENT_DESKTOPS="ubuntu-desktop"
# Space separated list of programs to install. 
# The java plugin installation contained in ubuntu-restricted-extras 
# needs some special care, so let's use it as an example. 
LATE_PACKAGES=" 
 ubuntu-restricted-extras 
 nfs-client
 emacs
 ssh
 vlc
 audacious	
 "
# This is needed to answer "yes" to the Java EULA. 
# We'll create that file in the next step. 
DEBCONF_SEEDS="/etc/ltsp/debconf.seeds"
# This uses the server apt cache to speed up downloading. 
# This locks the servers dpkg, so you can't use apt on 
# the server while building the chroot. 
MOUNT_PACKAGE_DIR="/var/cache/apt/archives/"

Create and edit the following file for the unattented Java and msttcorefonts installation

#edit:

/etc/ltsp/debconf.seeds
# Do you agree with the DLJ license terms?
sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true
sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true
# In order to install this package, you must accept the license terms, the
# "TrueType core fonts for the Web EULA ". Not accepting will cancel the
# installation. Do you accept the EULA license terms?
ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula boolean true

Build the client

ltsp-build-client

#Various options can be set for the Fat Client. They can be set in the /var/lib/tftpboot/ltsp/i386/lts.conf file.

#Here is a list of the options that can be used: http://manpages.ubuntu.com/manpages/precise/man5/lts.conf.5.html

#You don't need to build the client or update the image after changing an option

#You can use the fat chroot also to run thin clients, not only fat ones. This way you can have a mix of powerful and not powerful clients, that they will become "fat" or "thin" based upon their RAM (consider fat chroot a "superset" of a thin one, so thin boot uses only a small but common part of it).  The parameter that affects the RAM threshold is:

FAT_RAM_THRESHOLD

that defaults to 300 (MB).  So if you want your client boot as FAT ones only if they have more than 800MB edit lts.conf and put:

FAT_RAM_THRESHOLD=800

Another interesting feature is have a server's directory available to all the fat clients.  For instance, to have the fat clients mount as their own /srv the /srv of the server add this parameter:

LOCAL_APPS_EXTRAMOUNTS=/srv

Some other options can be set (example of lts.conf file in Deepanam School)

[default]
LOCAL_APPS_EXTRAMOUNTS=/home/share,/home/media_no_backup
USE_LOCAL_SWAP=True
LDM_DIRECTX=True
CUPS_SERVER=192.168.10.1
LDM_SESSION="gnome-session --session=ubuntu-2d"

 

Install and configure DHCP

Configure the interface

/etc/network/interfaces
# Local-loop
auto lo
iface lo inet loopback
 
# Local interface
auto eth0
iface eth0 inet static
address 192.168.10.1
netmask 255.255.255.0
broadcast 192.168.10.255

# Internet interface
auto eth1
iface eth1 inet static
address 192.168.1.2
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1

Set up DHCP

cp /etc/ltsp/dhcpd.conf{,-origin}

/etc/ltsp/dhcpd.conf
#
# Default LTSP dhcpd.conf config file.
#
#authoritative;
subnet 192.168.10.0 netmask 255.255.255.0 {
 range 192.168.10.2 192.168.2.250;
 option domain-name "bluelight.av";
 option domain-name-servers 192.168.10.1;
 option broadcast-address 192.168.10.255;
 option routers 192.168.10.1;
# next-server 192.168.10.1;
# 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";
 }
}

sudo /etc/init.d/networking restart

sudo /etc/init.d/isc-dhcp-server restart

 

#If problems kill NetworkManager or even uninstall it as it interferes with the dhcp config.

killall NetworkManager

 

Install and configure LDAP

Follow the server installation from this guide: http://wiki.bluelightav.org/display/BLUE/LDAP+Authentication+-+Ubuntu+12.04 

 

Install and configure NFS3

apt-get install nfs-kernel-server

#edit and add the following

/etc/exports
/home 192.168.10.0/24(rw,sync,no_subtree_check)

#edit & set:  

/etc/default/nfs-kernel-server
 NEED_SVCGSSD=no # no is default

#edit & set:

/etc/default/nfs-common
 NEED_IDMAPD=yes 
 NEED_GSSD=no # no is default

#edit:

/etc/idmapd.conf
[General]
Verbosity = 0
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = bluelight.av
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup

Finish the configuration by changing some permissions

#edit & add the following at the end of the file

/etc/security/group.conf
lightdm;*;*;Al0000-2400;plugdev,fuse,scanner,video,audio,lpadmin,cdrom,dip

#edit:

/etc/auth-client-config/profile.d/bl-ldap
[bl-ldap]
nss_group=group: files ldap
nss_passwd=passwd: files ldap
nss_shadow=shadow: files ldap
nss_netgroup=netgroup: nis
pam_account=account sufficient pam_ldap.so
 account required pam_unix.so
pam_auth=auth sufficient pam_ldap.so
 auth required pam_unix.so nullok_secure use_first_pass
pam_password=password sufficient pam_ldap.so
 password required pam_unix.so nullok obscure min=4 max=8 md5
pam_session=session required pam_unix.so
 session required pam_mkhomedir.so skel=/etc/skel/
 session optional pam_ldap.so
 session optional pam_foreground.so

auth-client-config -S > /etc/auth-client-config/profile.d/original

auth-client-config -p bl-ldap -a

#edit & add before "@include common-auth":

/etc/pam.d/lightdm
auth optional pam_group.so

 

The Basic Installation is done (smile)

Update the client

#The Fat Client doesn't need to be configured for ldap and NFS as it uses the parameters of the server for logging and nscd ot mount the associated folder.

Chroot in the system (from the server)

ltsp-chroot -c -p

Make the changes you need

#Like adding software, removing some, changing some configs...

Finalise the client

  • Exit the chroot

exit

  • Update the kernel if needed

ltsp-update-kernels

  • Update the image

ltsp-update-image

 

Other useful things

Change password of a user

The changing of the password in Unity (http://wiki.bluelightav.org/display/BLUE/How+to+change+the+password+of+an+LDAP+user+with+Unity+in+Ubuntu+12.04) is not available on the Fat Client.

Autologin on specific clients

Edit /var/lib/tftpboot/ltsp/i386/lts.conf and add the following replacing the mac, password and username according to your needs. You can replace the mac address by the IP.

[00:1c:c0:de:1e:d6]
LDM_AUTOLOGIN = True
LDM_USERNAME = public
LDM_PASSWORD = public

Recreate the i386 folder from the .img

Extract the valid image with:

mkdir /mnt/img
mount -o loop /opt/ltsp/images/i386.img /mnt/img/
mv /opt/ltsp/i386{,-old}
mkdir /opt/ltsp/i386
rsync -avz /mnt/img/* /opt/ltsp/i386/ 

Personalize the LDM theme

The LDM themes images are located in /opt/ltsp/i386/usr/share/ldm/themes/

  • Copy the original theme you want to modify or place one you downloaded
  • Modify as necessary
  • Create a link from default to the themes folder (or /etc/alternatives/ldm-theme, it is the default option but you will have to copy the contain of your theme folder there and make it point to your new folder... use ls prior changing anything) or or use the following option in lts.conf:
    LDM_THEME = newthemedirectoryname (no need of the full path)

     

  • update the image (ltsp-update-image)

Alternate way to setup a Fat Client system

https://help.ubuntu.com/community/UbuntuLTSP/ltsp-pnp

 

Troubleshoot

The client freeze when halting

This is due to a bug in LTSP

ltsp-chroot -m
update-rc.d -f halt remove
update-rc.d halt stop 90 0 .
exit  
  • No labels