LTSP a Skolelinux
De SergiTurWiki
Contingut |
LTSP a Skolelinux
Per a més informació podeu consultar l'article sobre LTSP.
Clients Lleugers
Hi han dos formes principals per fer el boot dels client lleugers (Targetes d'Ethernet amb suport PXE o a través de disquettes i Etherbot )
Material necessari per provar SkoleLinux amb clients lleugers
- Un servidor (el servidor DELL nou) que fagi de Main-Server i Thin-client server
- Un cable ethernet creuat o el seu defecte un switch i dos cables normals ethernet.
- Un client lleuger (algún dels PCs de l'aula d'accés lliure)
El cable ethernet creuat és útil per trobar errors.
Targeta Ethernet amb suport PXE
[:TODO]
Rom'o'Matic. Etherboot
Boot des de el disquet. S'utilitza el programa Room'o'Matic (http://rom-o-matic.net/5.0.7/) per generar el fitxer.
Per conèixer quina ROM hem de descarregar podem executar les comandes:
$ lspci ..... ..... 0000:01:01.0 Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 30) $ lspci -n .... .... 0000:01:01.0 0200: 8086:9055
... al client lleuger. Si no tenim Linux instalat ens els clients lleugers podem utilitzar una distribució Live.
I utilitzem el fitxer de Etherboot ROMs (http://rom-o-matic.net/5.0.7/src-5.0.7/NIC) que relaciona NICs amb les seves corresponents boots.
El codi que apareix al resultat de la segona ordre (8086:1019 correspon a una NIC: 8086x1019).
Per fer el disquet d'arrencada:
Anem a la web per descarregar la ROM (http://rom-o-matic.net/5.0.7/). SkoleLinux recomana la versio 5.0.7 (hi han versions més noves... potser es que no s'ha actualitzat el document). Amb el cercador de text del Firefox busquem 9055 i trobem la zona de NICs 3COM
# Newer 90xB revisions: 3c905b-tpo 0x10b7,0x9004 10 Base TPO 3c905b-combo 0x10b7,0x9005 10 Base Combo 3c905b-tpb2 0x10b7,0x9006 10 Base TP and Base2 3c905b-fl 0x10b7,0x900a 10 Base FL 3c905b-tpo100 0x10b7,0x9055 10/100 TPO 3c905b-t4 0x10b7,0x9056 10/100 T4 3c905b-9058 0x10b7,0x9058 0x9058 3c905b-fx 0x10b7,0x905a 10 Base FX
Inserim un disquete i executem:
$ cat fitxer_de_ROM.ldsk > /dev/fd0
Disquete boot universal?
De la següent adreça es pot obtenir el fitxer BootDisk522b.zip:
http://sourceforge.net/project/showfiles.php?group_id=80408&package_id=97496&release_id=190646
Per crear el disquet
$ unzip BootDisk522b.zip $ cp ebnet522.dsk /dev/fd0
Aquest fitxer conté algunes de les ROMs més utilitzades.
NOTA: Extret de http://www.skolelinux.no/~klaus/newnotater/x2220.html.
Depuració de la connexió
Consultar aquest apartat del ICT manual d'SkoleLinux (http://developer.skolelinux.no/dokumentasjon/IKT-bok.en.html#id2494329)
Configuració de LTSP
Fitxer de configuració /etc/ltsp/ltsp.conf
(link a /opt/ltsp/i386/etc/ltsp.conf)
S'ha d'afegir les MAC's dels clients lleugers autoritzats a utilitzar el LTSP server al apartat 'DHCP Server' dins de 'Server'. El primer client lleuger és el 'ltsp10'.
Configuració de DHCP
La configuració de DHCP específica per a LTSP a Debian-Edu és porta a terme al fitxer /etc/dhcp3/dhcpd-debian-edu.conf del servidor de client lleugers (o al servidor principal si em instal·lat els dos perfils en una mateixa màquina):
#
# Husk for standard tynnklienttjener for Debian Edu
# skal dhcpd kj re bare p det indre nettverkskortet
# som skal hete eth1.
#
# Don't forget to set run_dhcpd=1 in /etc/init.d/dhcpd
#
shared-network THINCLIENTS {
default-lease-time 432000; # 5 d
max-lease-time 432000; # 5 d
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers ltspserver;
option domain-name-servers tjener;
option domain-name "intern";
option root-path "192.168.0.254:/opt/ltsp/i386";
option ntp-servers ntp;
# Log to the LTSP server, and let it forward the messages.
option log-servers ltspserver;
# New Etherboot understands PXE, and should use PXE, to make administration easier
filename "/var/lib/tftpboot/pxelinux.0";
# Old Etherboot does not understand PXE, and needs to use mknbi
# Admins are adviced to update to newer Etherboot
# filename "/var/lib/tftpboot/lts/vmlinuz-2.4.26.nb" ;
# Use the lines below if *all* the thin clients have ISA network cards
#option option-128 e4:45:74:68:00:00;
#option option-129 "NIC=3c509";
subnet 192.168.0.0 netmask 255.255.255.0 {
# At least some thin clients will work out of the box, appearing as
# ltsp200 to ltsp253.
# We still recommend defining fixed mac adress to ip adress mappings,
# cf. examples and explanations below.
range 192.168.0.200 192.168.0.253 ;
}
Consulteu l'article DHCP a Skolelinux per a més informació.
La següent secció té exemples de diferents configuracions de LSTP:
##################################################################################
#
# We recommend defining fixed mac adress (a.k.a. hardware ethernet adress) to
# ip adress mappings.
#
# Here are a number of examples applicable in different situations.
# In all cases you should fill in the hardware ethernet adress.
# The rest of the entries will vary according to the Network Interface Card (NIC)
# of the thin client: PCI or ISA based NIC. PCI NIC with or without PXE support.
#
#- --------------------------------------------------------------------------------
#
# Appearance of entries inteded for actual use.
#
# You will find these entries below this example section, with the XX
# entries substituted with numbers in the range 10-99.
#
# host ltspXXX {
# hardware ethernet 00:00:00:00:00:00;
# fixed-address 192.168.0.XXX;
# filename "/var/lib/tftpboot/lts/vmlinuz-2.4.26.nb";
# #filename "/var/lib/tftpboot/pxelinux.0";
# #option option-128 e4:45:74:68:00:00;
# #option option-129 "NIC=3c509";
# }
#
# The intent is maximum ease of use/minimal editing, when defining new thin clients.
# As an example, the entry for a thin client with a PCI based NIC, boot from
# floppy, need only have its hardware ethernet adress filled in (and commented
# lines can remain without adverse effect).
#
#---------------------------------------------------------------------------------
#
# Example 1: PCI based NIC, floppy based boot.
# Replace the all-zeros hardware ethernet adress with that of the NIC
# An appropriate boot floppy must be fetched from
# http://rom-o-matic.com/
#
# host ltspXXX {
# hardware ethernet 00:00:00:00:00:00;
# fixed-address 192.168.0.XXX;
# filename "/var/lib/tftpboot/lts/vmlinuz-2.4.26.nb";
# }
# ---------------------------------------------------------------------------------
#
# Example 2: PCI based NIC, boot from NIC with PXE support.
# Replace the all-zeros hardware ethernet adress with that of the NIC
# Replace the all-zeros hardware ethernet adress with that of the NIC
#
# host ltspXXX {
# hardware ethernet 00:00:00:00:00:00;
# fixed-address 192.168.0.XXX;
# filename "/var/lib/tftpboot/pxelinux.0";
# }
#---------------------------------------------------------------------------------
#
# Example 3: ISA based NIC, floppy based boot.
# Replace the all-zeros hardware ethernet adress with that of the NIC
# Enable (uncomment) the option-128 and option-129 lines
# Do NOT change option-128 in any other way.
# Replace NIC module name with other NIC module if NIC other than 3c509
# Fetch an appropriate boot floppy from
# http://rom-o-matic.com/
#
# host ltspXXX {
# hardware ethernet 00:00:00:00:00:00;
# fixed-address 192.168.0.XXX;
# filename "/var/lib/tftpboot/lts/vmlinuz-2.4.26.nb";
# option option-128 e4:45:74:68:00:00;
# option option-129 "NIC=3c509";
# }
#---------------------------------------------------------------------------------
#
# Example 4: ISA based NIC, floppy based boot, Linux Progress Patch (lpp)
# As previous example, but with nice looking display of Tux and progress
# indicator during boot.
#
# CURRENTLY NOT DISTRIBUTED WITH SKOLELINUX!
#
# host ltspXXX {
# hardware ethernet 00:00:00:00:00:00;
# fixed-address 192.168.0.XXX;
# filename "/tftpboot/lts/vmlinuz-2.4.19-ltsp-lpp1";
# option option-128 e4:45:74:68:00:00;
# option option-129 "NIC=3c509";
# }
##################################################################################
#
# Entries for actual use (ltsp010 to ltsp099) below:
#
# NOTE: After editing entries below, dhcpd MUST BE RESTARTED by the below
# commands and THE THIN CLIENT IN QUESTION BE REBOOTED for changes
# to take effect:
#
# /etc/init.d/dhcp3-server stop; /etc/init.d/dhcp3-server start
#
La següent secció té les plantilles per a un total de 100 clients lleugers:
# Entries for actual use (ltsp010 to ltsp099) below:
#
# NOTE: After editing entries below, dhcpd MUST BE RESTARTED by the below
# commands and THE THIN CLIENT IN QUESTION BE REBOOTED for changes
# to take effect:
#
# /etc/init.d/dhcp3-server stop; /etc/init.d/dhcp3-server start
#
#
# ltsp010
host ltsp010 {
hardware ethernet 00:11:09:CE:25:8E;
fixed-address ltsp010;
}
# ltsp011
host ltsp011 {
hardware ethernet 00:01:02:0E:88:99;
fixed-address ltsp011;
}
