Install/Configure
From TcosProject
| Languages: |
English • Español • Deutsch • Português do Brasil • Русский |
Contents |
Configure TCOS and generate boot images
Using TcosConfig
TcosConfig is a useful graphical tool to configure a TCOS build. TcosConfig is not installed by default, on Debian or Ubuntu, you can install it with:
# apt-get install tcosconfig
TcosConfig will collect information then use gentcos to build the images.
See screenshots and more info at TcosConfig
Using gentcos
gentcos is included in initramfs-tools-tcos package, you can get some info at gentcos
gentcos can be manually run if any changes are made to the config files instead of running TcosConfig.
gentcos -tftp [-o=initrd-pc1] PXE (>= 64 Mb)
-nfs [-rootfs] LTSP like (28 - 64 Mb)
-nbi [-nbi-output=linux.nbi] Floppy
-cdrom [-type=grub] [-force] CDROM
-instpkg pkgname
-rmpkg pkgname
-listpkg
-fix-nvidia-ati
[-h] or [-help] gentcos extended help
[-vmlinux=vmlinuz-x.x.x|/boot/vmlinuz-x.x.x] kernel version
[-suffix=foo] ( suffix for filenames )
[-size] ( print ramdisk size )
[-v] ( show verbose output of mkinitramfs )
[-allmodules] ( generate allmodules-2.6.26-2-486.squashfs to
know what kernel modules need )
[-extramodules=foo,bar] ( add coma separated list of modules )
Configure server Display Manager
The Display Manager needs to be configured to answer network based requests (XDMCP). Each DM has a different method of configuration and provides different facilities. GDM and KDM are well themed and user friendly. XDM is more basic but can be manually configured by an experienced user.
GDM (Gnome Display Manager
NOTE: Later versions of GDM use an XML based schema file instead of the gdm.conf as documented here
Need to set /etc/gdm/gdm.conf (in Ubuntu file is gdm.conf-custom or other)
[security]
DisallowTCP=false
[xdmcp]
Enable=true
You can enable Remote autologin based on client hostname:
[daemon]
TimedLoginEnable=true
TimedLogin=/usr/sbin/tcos-gdm-autologin|
TimedLoginDelay=10
[security]
AllowRemoteAutoLogin=true
DisallowTCP=false
[xdmcp]
Enable=true
This settings can be configured with a simple helper:
# tcos-gdm-autologin --configure
|
# /etc/init.d/gdm restart |
Configuring GDM autologin
TCOS provides a small util called tcos-gdm-autologin, this python script read $DISPLAY var and try to search user with this DISPLAY. Example:
To work you need to configure DHCP server and /etc/hosts to have same values thas users...
Example /etc/hosts:
192.168.0.101 host1 192.168.0.102 host2 192.168.0.103 host3 192.168.0.104 host4 192.168.0.105 host5
Example dhcpd.conf:
host host1 {
hardware ethernet 00:04:xx:xx:xx:xx;
fixed-address 192.168.0.101;
}
host host2 {
hardware ethernet 00:04:xx:xx:xx:xx;
fixed-address 192.168.0.102;
}
host host3 {
hardware ethernet 00:04:xx:xx:xx:xx;
fixed-address 192.168.0.103;
}
host host4 {
hardware ethernet 00:04:xx:xx:xx:xx;
fixed-address 192.168.0.104;
}
host host4 {
hardware ethernet 00:04:xx:xx:xx:xx;
fixed-address 192.168.0.105;
}
Then create users:
# adduser host1 ..... # adduser host2 .....
tcos-gdm-autologin have some code to do all this things (extracted of man page):
--add
This option will ask for user/host names prefix to add to system config.
Example:
prefix=host
number=4
ipbase=192.168.0
Will generate the following:
user: host1 pass: host1 home: /home/host1 (extracted from SKEL)
user: host2 pass: host2 home: /home/host2 (extracted from SKEL)
user: host3 pass: host3 home: /home/host3 (extracted from SKEL)
user: host4 pass: host4 home: /home/host4 (extracted from SKEL)
host: 192.168.0.1 hostname= host1
host: 192.168.0.2 hostname= host2
host: 192.168.0.3 hostname= host3
host: 192.168.0.4 hostname= host4
Exec this:
# tcos-gdm-autologin --add Please input the common prefix of hosts/users (example host): host Need network IP Address of thin clients (example 192.168.0): 192.168.0 Number of host/users to generate (number): 5 Start generating from (default 1): 1 I will generate users and hostnames from "host1" to "host5" with ip adresses from 192.168.0.1 to 192.168.0.5 and uncompress "/root/skel.tar.gz" as HOME_TEMPLATE Are you sure you want this? [y/n]
To work as kiosk mode you need to create a home template and save into /root/skel.tar.gz
- Create a new user, for example: template
- Login as template and configure all you want (desktop, language, wallpaper...)
- Logout
- Exec as root:
# (cd /home/template && tar -czf /root/skel.tar.gz . )
(perhaps will be a great idea open the tar.gz file and remove some files like .Xauthority or .ICEauthority)
KDM (KDE Display Manager)
Need to set /etc/kde3/kdm/kdmrc
[xdmcp]
Enable=true
And in /etc/kde3/kdmrc/Xacces uncoment the following line:
* #any host can get a login window
XDM (X Display Manager)
XDM is mainly configured by updating the following files:
/etc/X11/xdm/xdm-config /etc/X11/xdm/Xresources
Configure Font Server
TCOS will install xfs font server, you need to configure to allow remote conections:
Edit /etc/X11/fs/config file and change this line:
no-listen = tcp
With this:
#no-listen = tcp
Configure DHCP server
I suppose you will have a network like this:
INTERNET ---- (eth0) x.x.x.x SERVER 192.168.0.254 (eth1) ----- SWITCH
||
=================
| | | | |
pc1 pc2 pc3 pc4 pc5 ....
In Debian based distros you must edit /etc/default/dhcp3-server to change network interface to listen DHCP request:
# Defaults for dhcp initscript # sourced by /etc/init.d/dhcp # installed at /etc/default/dhcp3-server by the maintainer scripts # # This is a POSIX shell fragment # # On what interfaces should the DHCP server (dhcpd) serve DHCP requests? # Separate multiple interfaces with spaces, e.g. "eth0 eth1". INTERFACES="eth1"
You can configure DHCP server by two methods:
Dynamic IP address
|
|
# /etc/dhcp3/dhcpd.conf # from: http://www.ubuntu-es.org/node/20079 ddns-update-style ad-hoc; option subnet-mask 255.255.255.0; option broadcast-address 192.168.0.255; option routers 192.168.0.1; option domain-name-servers 192.168.0.1; option domain-name "tcos-domain.org"; option option-128 code 128 = string; option option-129 code 129 = text; get-lease-hostnames true; next-server 192.168.0.254; shared-network WORKSTATIONS { subnet 192.168.0.0 netmask 255.255.255.0 { range dynamic-bootp 192.168.0.11 192.168.0.30; if substring (option vendor-class-identifier, 0, 9) = "PXEClient" { # boot from PXE network card filename "/tcos/pxelinux.0"; } else{ # boot from old version of etherboot floppy filename "/tcos/linux-2.6.18-4-486.nbi"; } } }
- Then restart service:
- # /etc/init.d/dhcp3-server restart
Static IP address
You have to put one block per host in this way:
#/etc/dhcp3/dhcpd.conf
# 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;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option domain-name-servers 192.168.0.1;
option domain-name "tcos-domain.com";
next-server 192.168.0.254;
shared-network WORKSTATIONS {
subnet '192.168.0.0 netmask 255.255.255.0 {
}
}
group {
use-host-decl-names on;
option log-servers 192.168.0.254;
next-server 192.168.0.254;
host tcos11 {
# host running TCOS
hardware ethernet 00:0c:29:4b:bc:db;
fixed-address 192.168.0.11;
filename "/tftpboot/tcos/pxelinux.0";
}
host tcos12 {
# host running LTSP
hardware ethernet 00:0c:29:2d:61:6f;
fixed-address 192.168.0.12;
filename "/tftpboot/lts/2.6.16.1-ltsp-2/pxelinux.0";
}
host tcos13 {
# host running PXES
hardware ethernet 00:0C:29:27:8A:B0;
fixed-address 192.168.0.13;
filename "/tftpboot/pxes/pxelinux.0";
}
}
- Then restart service:
- # /etc/init.d/dhcp3-server restart
Configuring pxelinux
pxelinux uses a configuration file, usually pxelinux.cfg/default. It also enables specific config files to be created per machine based on IP address or MAC address in addition to the tcos custom configuration files. These files enable custom boot kernel parameters to be passed over. You can use DHCP to deliver different pxelinux configurations or just use the automatic system provided with tcos.
An example standard file:
## Generated file don't edit, edit /etc/tcos/pxelinux.cfg.tpl instead ## File generated by gentcos on Mon May 25 13:44:10 BST 2009 default tcos prompt 1 timeout 20 display tcos.msg F0 tcos.msg F1 help.msg F2 help2.msg label tcos kernel vmlinuz-2.6.26-1-686 append ramdisk_size=65536 initrd=initramfs-2.6.26-1-686 root=/dev/ram0 boot=tcos quiet splash label install kernel vmlinuz-2.6.26-1-686 append ramdisk_size=65536 initrd=initramfs-2.6.26-1-686 root=/dev/ram0 boot=tcos quiet splash startx=N installer label update kernel vmlinuz-2.6.26-1-686 append ramdisk_size=65536 initrd=initramfs-2.6.26-1-686 root=/dev/ram0 boot=tcos quiet splash startx=N installer-update label nfs kernel vmlinuz-2.6.26-1-686 append ramdisk_size=32768 initrd=initramfs-2.6.26-1-686-nfs root=/dev/ram0 boot=tcos quiet splash
An example custom file:
default tcos prompt 0 timeout 1 ontimeout tcos label tcos kernel vmlinuz-2.6.26-1-686 append ramdisk_size=65536 initrd=initramfs-2.6.26-1-686 root=/dev/ram0 boot=tcos quiet xres=1280x768
Kernel command line options
tcos behaviour can be modified by passing various arguments to the kernel on boot. If pxelinux is used, this can be set within the pxelinux config file.
Full information on kernel parameters can be found on the Tips/Cmdline_Params page
xres=1280x766 Set the X resolution
installer Display the installer screen
nosound Do not enable sound
quiet Show little info on boot
splash Show the graphical splash screen
startx=N Do not start X
installer-update Show the "Update" installer
Configuring Pulseaudio
http://www.pulseaudio.org/wiki/PerfectSetup
IPv6 issues
You may have issues with services binding to IPv6 addresses. This can cause sound and other services to not operate as expected. At this time, you could disable IPv6 in the kernel by using sysctl as follows:
sysctl net.ipv6.conf.all.disable_ipv6=1
To have this set permanently, add to the file /etc/sysctl.conf:
net.ipv6.conf.all.disable_ipv6=1