Here is the step by step process for setting up the LTSP Server.
I used Edubuntu 12.04 and installed on the server, mainly because they have very good
documents for help
Most of the docs and help can be taken from the link
https://help.ubuntu.com/community/UbuntuLTSP
SERVER SIDE CONFIGURATION STEPS
---------------------
1. configure static Ip address - /etc/network/interfaces
2. configure DNS names - /etc/resolv.conf
3. Verify the existence of following files and directories
- Root directory - /opt/ltsp/<arch> [ <arch> will be i386, ppc etc depending on your architecture ]
- TFTP directory - /var/lib/tftpboot/ltsp/<arch> [will hold your PXE boot files]
- lts.conf - /var/lib/tftpboot/ltsp/<arch>/ [config file to define the hardware profiles of the thin clients]
- pxelinux.0 - /var/lib/tftpboot/ltsp/<arch>/ [first boot file for pxe boot]
- pxelinux.conf/default - /var/lib/tftpboot/ltsp/<arch>/ [config files to define multi-boot settings]
- nbi.img - /var/lib/tftpboot/ltsp/<arch>
- initrd.img - /var/lib/tftpboot/ltsp/<arch>
4. LTSP DHCP Config - /etc/ltsp/dhcpd.conf
5. Install and configure tftp
6. Configure lts.conf file as per your requirements
7. Create users
========
STEP 1 |
========
Set static IP Address
-----------------------------
The LTSP Server must have the Static IP Address so that the thin clients can always reach the server
tnlexperts@edubuntu:$ sudo vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.5.22
netmask 255.255.255.0
gateway 192.168.5.1
tnlexperts@edubuntu:$ sudo /etc/init.d/networking restart
========
STEP 2 |
========
Set DNS Server names
-----------------------------
Ensure to set the DNS info else the Server will not be able to fetch the packages from Internet when you try
to install them
tnlexperts@edubuntu:$ sudo vi /etc/resolv.conf
nameserver 192.168.5.22
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 4.2.2.2
========
STEP 3 |
========
navigate to the root directory and verify the existence of the <arch> folder
tnlexperts@edubuntu:$ cd /opt/ltsp
tnlexperts@edubuntu:/opt/ltsp$ ls (i386 or ppc folder must be present)
navigate to the tftpboot directory and verify the existence of the <arch> folder
tnlexperts@edubuntu:$ cd /var/lib/tftpboot/ltsp/
tnlexperts@edubuntu:/var/lib/tftpboot/ltsp$ ls (i386 or ppc or i686 folder must be present)
navigate to the tftpboot/ltsp/<arch> directory and verify the existence of the lts.conf, pxelinux.conf, nbi.img, pxelinux.0, initrd.img
tnlexperts@edubuntu:$ cd /var/lib/tftpboot/ltsp/<arch>/
tnlexperts@edubuntu:/var/lib/tftpboot/ltsp/<arch>$ ls (lts.conf, pxelinux.conf, nbi.img, pxelinux.0, initrd.img files must be present)
========
STEP 4 |
========
LTSP DHCP Config
----------------
tnlexperts@edubuntu:$ cd /etc/ltsp
tnlexperts@edubuntu:/etc/ltsp$ sudo vi /dhcpd.conf
subnet 192.168.5.0 netmask 255.255.255.0 {
range 192.168.5.10 192.168.5.20;
# option domain-name "mydomain.com";
option domain-name-servers 192.168.5.1;
option broadcast-address 192.168.5.255;
option routers 192.168.5.22;
# next-server 192.168.0.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 "/var/lib/tftpboot/ltsp/i386/pxelinux.0";
# } else {
# filename "/var/lib/tftpboot/ltsp/i386/nbi.img";
}
}
[it is important to note that the the DHCP config file paths
have to match the paths verified in STEP3 ]
tnlexperts@edubuntu:$ sudo /etc/init.d/isc-dhcp-server restart
========
STEP 5 |
========
Intall and configure tftp
--------------------------
tnlexperts@edubuntu:$ sudo apt-get update
tnlexperts@edubuntu:$ sudo apt-get install xinetd tftpd tftp
Create /etc/xinetd.d/tftp and put this entry
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /var/lib/tftpboot/ltsp/i386
disable = no
}
Create a folder with the name that should match whatever you gave in server_args. mostly it will /var/lib/tftpboot/ltsp/i386
tnlexperts@edubuntu:$ sudo mkdir /var/lib/tftpboot/ltsp/i386
tnlexperts@edubuntu:$ sudo chmod -R 777 /var/lib/tftpboot/ltsp/i386
tnlexperts@edubuntu:$ sudo chown -R nobody /var/lib/tftpboot/ltsp/i386
uncomment the tftp entries in the below file
tnlexperts@edubuntu:$ /etc/services
tftp 69/tcp
tftp 69/udp
Restart the xinetd service.
tnlexperts@edubuntu:$ sudo /etc/init.d/xinetd stop
tnlexperts@edubuntu:$ sudo /etc/init.d/xinetd start
Test the tftp server
-----------------------
tnlexperts@edubuntu:$ cd /tmp
tnlexperts@edubuntu:$ tftp 192.168.5.22
tftp> get nbi.img
received 28,072 bytes --> this transfer shows the server is working!!
tftp> quit
========
STEP 6 |
========
you dont need to edit the lts.conf file until and unless you have
trouble booting the thin clients.
Here is a Sample lts.conf file in case you need to edit anything
-----------------------------------------------------------------
tnlexperts@edubuntu:$ sudo vi /var/lib/tftpboot/ltsp/i386/lts.conf
[default]
# LDM_ALLOW_GUEST=True (if this line doesnt work, the below line will, so uncomment one at a time and test)
# LDM_GUESTLOGIN=True
LD_THEME=edubuntu
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LDM_LANGUAGE=en_US.UTF-8
LDM_SESSION="gnome-session --session=gnome-fallback" #For Ubuntu Gnome Desktop!!!
# LDM_REMOTECMD=/usr/bin/startkde #For Ubuntu Unity UI Desktop!!!
after the changes to the lts.conf file you have to issue a command
"ltsp-update-image" after every change
tnlexperts@edubuntu:$ sudo ltsp-update-kernels
tnlexperts@edubuntu:$ sudo ltsp-update-image
tnlexperts@edubuntu:$ sudo ltsp-update-sshkeys
========
STEP 7 |
========
Create user on the server so that this user can login from the diskless thin-client
tnlexperts@edubuntu:$ sudo vi /etc/passwd (to check the userlist)
tnlexperts@edubuntu:$ sudo chroot /usr/sbin/adduser <username>
tnlexperts@edubuntu:$ sudo chmod 1777 /tmp
adding/removing/changing any user info should be followed by ltsp update commands from Step 6.
###############################################################################################
CLIENT SIDE CONFIGURATION
--------------------------
The LTSP diskless client needs one very important configuration.
You need to go to the
BIOS settings and make sure the
First Boot Device/priority is set to
Boot from Network/PXE
Save the settings and restart the PC and you should be able to boot from the LTSP Server.