LTSP with PXE boot MINI-HOWTO

LTSP with PXE boot MINI-HOWTO

Table of Contents

1)Introduction:
2)Install LTSP ( In my Red Hat 9 I have: ltsp_core, ltsp_kernel, ltsp_x_core , ltsp_x_fonts)
3)Install and configure TFTP Server ( tftp-server)
4)Install and configure DHCP Server ( dhcp)
5)Configure LTSP

Introduction:

PXE is a system used to boot a client pc without using a boot floppy or an hard disk. To use it, you must have a PXE compatible network card. When you will boot the pc, PXE will ask to a DHCP server an IP and the network configuration. After that, we will send a PXE image to the pc client, that will do a preliminar boot action and will search an Etherboot image, and then we will send the Etherboot image with LTSP kernel.
To make an LTSP server with PXE boot, you need this software: LTSP, TFTP, Dhcpd.

Install LTSP ( In my Red Hat 9 I have: ltsp_core, ltsp_kernel, ltsp_x_core , ltsp_x_fonts)

To install LTSP , you can use the binary packages for your distribution (rpm, deb), or the source packages . You can download it directly from www.ltsp.org. The installation of that packages is well described on www.ltsp.org/documentation, so I will not rewrite that instructions.

Install and configure TFTP Server ( tftp-server)

In a Red Hat, you must install tftp-server, with:

rpm -ivh tftp-server

and then edit the file /etc/xinetd.d/tftp, changing the line:

disable = yes

with

disable = no

That’s because the tftp server is executed into xinetd superserver, and it’s disabled by default for security matters.

Install and configure DHCP Server ( dhcp)

In a Red Hat, you must install dhcp, with:

rpm -ivh dhcp

Then you must configure all the clients to get an automatic IP and hostname, matching a MAC address. This is my configuration for two client pc:

# Sample configuration file for ISCD dhcpd
#
# Don’t forget to set run_dhcpd=1 in /etc/init.d/dhcpd
# once you adjusted this file and copied it to /etc/dhcpd.conf.
#

default-lease-time 21600;
max-lease-time 21600;
ddns-update-style none;

option subnet-mask 255.255.255.0;
option broadcast-address 172.16.0.255;
option routers 172.16.0.254;
option domain-name-servers 151.99.125.2;
option domain-name “folug.lan”;
option root-path “172.16.0.100:/opt/ltsp/i386”;

shared-network WORKSTATIONS {

subnet 172.16.0.0 netmask 255.255.0.0 { }
}

group {

use-host-decl-names on;
option log-servers 172.16.0.100;

host ws001 {

hardware ethernet 00:40:F4:66:EC:0F;
fixed-address 172.16.0.99;

if substring (option vendor-class-identifier, 0, 9) = “PXEClient” {
filename “/eb-5.0.10-rtl8139b.lzpxe”;
} else if substring (option vendor-class-identifier, 0, 9) = “Etherboot” {

filename “/lts/vmlinuz-2.4.19-ltsp-1”;
option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff;
}
}

host ws002 {
hardware ethernet 00:40:F4:47:CA:CF;
fixed-address 172.16.0.98;

if substring (option vendor-class-identifier, 0, 9) = “PXEClient” {
filename “/eb-5.0.10-rtl8139b.lzpxe”;
}

else if substring (option vendor-class-identifier, 0, 9) = “Etherboot”
{
filename “/lts/vmlinuz-2.4.19-ltsp-1”;
option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff;
}

}

}

The line :

f substring (option vendor-class-identifier, 0, 9) = “PXEClient” {

controls that at PXE boot the dhcp server sends the image given by filename expression. The image is downloaded from from http://www.rom-o-omatic.org∞, and it’s based on the type of network card. Put this image on /tftpboot directory, because we need to send it with tftp.
The path given in the filename expression is relative to tftpboot, so pay attention:
if the file is on /tftpboot/eb-5.0.10-rtl8139b.lzpxe, you must use the row:

filename “/eb-5.0.10-rtl8139b.lzpxe”; # correct

# and NOT :

filename “/tftpboot/eb-5.0.10-rtl8139b.lzpxe”; # error!!!

If you put the absolute path on hard disk, PXE will say File not found. The line:

else if substring (option vendor-class-identifier, 0, 9) = “Etherboot” {

Is used to send the second image to the client pc, with the LTSP kernel image. This is also relative to tftpboot, so pay attention again to NOT USE the server absolute path of the image. This image is into the ltsp-kernel package, and it’s located in

/tftpboot/lts/vmlinuz-2.4.19-ltsp-1

Configure LTSP

Now that you have configured tftp and dhcp with the use of PXE, we need to write the configuration file for the ltsp clients.
This file is located in

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

and contains a configuration for each client:

[ws001]

XSERVER = auto
X_MODE_0 = 1024×768
LOCAL_APPS = N
USE_NFS_SWAP = N
SWAPFILE_SIZE = 48m
XkbLayout = it
RUNLEVEL = 5′

ws0001 must be the hostname of the client, given by dhcp server
Other options are available, but you must read the LTSP documentation, it’s useless a copy-paste other’s work in this mini-howto.

LTSP with PXE boot MINI-HOWTO
Torna su
Exit mobile version