Step-By-Step-Howto

Version 1 (schmelzs, 02/18/2009 01:50 pm)

1 1 schmelzs
h1. Step By Step HOWTO: Stateless Linux with OpenSLX
2 1 schmelzs
3 1 schmelzs
The operation and administration of a larger number of computers is quite a lot of effort. This is also true for Linux installations. So that administration won't become the main task with your implementation and maintenance of a larger installation, there is a need for special technologies to get the problem under control. Apart from the classic method of Software Deployments and Patch Managements, Stateless approaches have the best chance to relieve the admin from boring routine tasks. On request, one installation can serve any number of Client-machines over the network. For this there is no need for any special preparation of the machines: PXE or Etherboot are sufficient to allow the machine to boot from the network. From this, additional freedom of design is achieved: Local installations don't need to loose ground, but can for example, during migration or mixed scenarios, offer an alternative to the Stateless operation.
4 1 schmelzs
5 1 schmelzs
OpenSLX deals with GPL-Software that allows installation and easy administration on hard drive free Linux Workstations. The project focuses of large installations with a similar deployment profile (So not necessarily machines with special hardware for production control etc.). This is currently implemented in Schools or Universities to have a highly flexible and stable pool environment for training courses, classes etc. On the established Stateless-Linux-Basis, another OS for training purposes, such as Windows or Linux, can effectively be distributed through virtualization technologies (currently VMplayer, later also VirtualBox or XEN).
6 1 schmelzs
7 1 schmelzs
The switch-over between different operation modes occurs at boot time, since no costly Image distribution (Imagecopy) occurs before or during the machine boot.
8 1 schmelzs
9 1 schmelzs
Plenty of good Linux distributions are available: For this reason OpenSLX doesn't choose the approach to offer its own package collection. Instead a script collection is available which many standard distributions prepare for the stateless operation. The OpenSLX package prepares a middleware for you that stays hidden from the user of a machine. So the appropriate "Look & Feel" of a distribution is maintained, the customization and changes occur in the background.
10 1 schmelzs
11 1 schmelzs
Users use their desktop to access all of their machines available equipment as usual: There are no special requirements since everything occurs locally and no costly, for example, Auto-mount chains need to happen. Playback of movies or use 
12 1 schmelzs
of 3D-applications is also no problem. Furthermore, only this way, can the extensive performance potential of today’s desktop PCs be fully used and be given exclusively to the user.
13 1 schmelzs
14 1 schmelzs
This type of Linux Desktop allows the familiar uses of versatile applications: Virtualization environments such as Virtual Box or VMware(Player) allow you to boot further Operating Systems.
15 1 schmelzs
16 1 schmelzs
17 1 schmelzs
h2. Further Development
18 1 schmelzs
19 1 schmelzs
With technologies like UnionFS or AUFS, an existing base installation can easily be extended or cut back. This allows different user groups to be served separately. Furthermore it is possible to setup a central server that allocates ground installation/infrastructure, and further software is integrated into the system locally.
20 1 schmelzs
21 1 schmelzs
Completely different possibilities are offered through virtual workstations: Instead of installing the OS for a certain user directly, this occurs in a virtual environment, which places the container in the user’s home directory. So, users can access any machine in the OpenSLX network and will find their familiar environment.
22 1 schmelzs
23 1 schmelzs
24 1 schmelzs
h2. Installation
25 1 schmelzs
26 1 schmelzs
The OpenSLX Package is actually like every other OpenSource Package, not finished, however is constantly being developed further since 1997. The current version is 4.9. You can download it from the project homepage, www.openslx.org, as RPM or Debian package. 
27 1 schmelzs
For OpenSuSE choose RPM:
28 1 schmelzs
29 1 schmelzs
<pre>
30 1 schmelzs
x60s:~ # wget
31 1 schmelzs
x60s:~ # rpm -i
32 1 schmelzs
</pre> 
33 1 schmelzs
34 1 schmelzs
For current bug fixes, new features and further supporting distributions, you can anonymously access the sources in the Subversion:
35 1 schmelzs
36 1 schmelzs
<pre>
37 1 schmelzs
x60s:~ # svn co http://svn.OpenSLX.org/svn/openslx/openslx
38 1 schmelzs
Ausgecheckt, Revision 2NNN.
39 1 schmelzs
x60s:~ # cd openslx/trunk
40 1 schmelzs
x60s:~/openslx/trunk # make install
41 1 schmelzs
</pre>
42 1 schmelzs
43 1 schmelzs
Irrespective of how you installed OpenSLX, OpenSLX will work with its original settings in the following directory structure:
44 1 schmelzs
45 1 schmelzs
<pre>
46 1 schmelzs
/etc/opt/openslx
47 1 schmelzs
/etc/opt/openslx/distro-info
48 1 schmelzs
/opt/openslx
49 1 schmelzs
/opt/openslx/lib
50 1 schmelzs
/opt/openslx/share
51 1 schmelzs
/opt/openslx/bin
52 1 schmelzs
/srv/openslx
53 1 schmelzs
/srv/openslx/export
54 1 schmelzs
/srv/openslx/tftpboot
55 1 schmelzs
/var/opt/openslx
56 1 schmelzs
/var/opt/openslx/config
57 1 schmelzs
/var/opt/openslx/db
58 1 schmelzs
/var/opt/openslx/stage1
59 1 schmelzs
</pre>
60 1 schmelzs
61 1 schmelzs
Only directories with the statistical SLX files are created, directories such as /var/opt/openslx or /srv/openslx are created at the setup of the Client environment. 
62 1 schmelzs
The command slxsetting allows you to specify:
63 1 schmelzs
64 1 schmelzs
<pre>
65 1 schmelzs
x60s:~ # slxsettings set private-path='/var/opt/openslx' set public-path='/'
66 1 schmelzs
setting private-path to '/var/opt/openslx'
67 1 schmelzs
setting public-path to '/'
68 1 schmelzs
</pre>
69 1 schmelzs
70 1 schmelzs
All global settings of the packages are placed beneath /etc/opt/openslx. All statistical files are placed in /opt/openslx, like scripts and the required Perl modules and Includes. All data that is generated during runtime is placed in /var/opt/openslx, if not changed through slxsettings. The directories are empty after installation. In config you can place files and configurations of later exported systems, db records the database of your Systems and Clients.
71 1 schmelzs
72 1 schmelzs
In a further step Exported systems are finally placed in stage1. While the amount of data in other directories can be disregarded, you should expect at least 5 - 50 GBytes of data depending on the type and number of OpenSLX-Installations (stage1).
73 1 schmelzs
74 1 schmelzs
If the specification of the directories isn't what you imagined, you can adjust these using the script slxsettings. This way you can for example specify that the Stage1 files aren't stored on your Server-Rootfilesystem but on a separately mounted partition instead.
75 1 schmelzs
76 1 schmelzs
See the current version of your OpenSLX-Toolsets through:
77 1 schmelzs
78 1 schmelzs
<pre>
79 1 schmelzs
x60s:~ # slxversion
80 1 schmelzs
4.0.0revNNNN
81 1 schmelzs
</pre>
82 1 schmelzs
83 1 schmelzs
h2. Functionality
84 1 schmelzs
85 1 schmelzs
The task of the OpenSLX project is the setup of exportable systems; Distributions in a certain version, that can incorporate stateless clients over the network as Rootfilesystem. An SLX server can supply many of these systems.
86 1 schmelzs
87 1 schmelzs
For a good overview, the setup procedure of your stateless is separated into many clear stages:
88 1 schmelzs
* Stage0 identifies a running reference system on real or virtual hardware, of 
89 1 schmelzs
which a copy through Rsync is generated on the server. This stage simply plays 
90 1 schmelzs
a role for the clone mode.
91 1 schmelzs
* Stage1 identifies a executable client system, which is placed beneath 
92 1 schmelzs
/var/opt/openslx/stage1/<name>. With consistent hardware architecture you can 
93 1 schmelzs
access this directory through "slxos-setup shell <name>". The system is strictly 
94 1 schmelzs
setup and extended with particular local extensions. To this you could count the 
95 1 schmelzs
installation of special, not offered from the distribution, external software packages. 
96 1 schmelzs
There are two ways in which you could setup Stage1, through direct installation 
97 1 schmelzs
from the respective packet source or copy of an existing system (Clone, Stage0).
98 1 schmelzs
* Stage2 - from stage1, different Client-Rootfilesystems can be created. For this 
99 1 schmelzs
stage1 is duplicated, this means the omission of irrelevant files for the stateless 
100 1 schmelzs
operation, a new sub-directory in NFS-Export is created or for Network block devices 
101 1 schmelzs
a compressed SquashFS is applied. An appropriate Kernel is needed for this 
102 1 schmelzs
(usually directly from the distribution being used), at least one InitialRamFS 
103 1 schmelzs
fitting to the Kernel and one Client configuration. The Client configuration 
104 1 schmelzs
can contain an array of files that are extracted to the appropriate place in 
105 1 schmelzs
Stage3.
106 1 schmelzs
* Stage3 - During Stage0-2 administrative procedures occur on the SLX server, 
107 1 schmelzs
which you only need to do a few times. Stage3 occurs on every single client at 
108 1 schmelzs
every restart within the InitialRamFS. Here the individual machines are setup. 
109 1 schmelzs
This area is covered by the shell scripts init (SLX-Init), hwautocfg and servconfig. 
110 1 schmelzs
The latter places all the clients important configuration files in /mnt/etc. Local 
111 1 schmelzs
extensions (for all clients that use a certain InitRamFS) are possible by using 
112 1 schmelzs
preinit.local at the very beginning of SLX-Init, postinit.local towards the end of 
113 1 schmelzs
SLX-Init. postinit.local is created through ConfTGZ. This is a package of configuration 
114 1 schmelzs
files that are downloaded through, for example, TFTP and then extracted in Stage3. 
115 1 schmelzs
The template for this is in /var/opt/openslx/config/<system>. <system> is the name 
116 1 schmelzs
of the Vender OS linked through two colons and the type of the export.
117 1 schmelzs
* In Stage4, SLX view, only some smaller configuration tasks occur. The client 
118 1 schmelzs
now has a complete Rootfilesystem, all programs and files, so now the keyboard 
119 1 schmelzs
configuration can occur. Also, in this stage, the graphical login is started to 
120 1 schmelzs
an appropriate earlier time.
121 1 schmelzs
122 1 schmelzs
Depending on the type of the clients, you may want to prepare one or more different 
123 1 schmelzs
system exports on a server. This can mean that a Stage1 system in many varieties, 
124 1 schmelzs
like NFS and at the same time NBD/SquashFS, should be delivered to the clients. On 
125 1 schmelzs
the other hand, very different Stage1's can be served with the same technology from 
126 1 schmelzs
different exports. This is, for example, useful for on-site tests, when you would 
127 1 schmelzs
like to offer the new system parallel with an existing system.
128 1 schmelzs
129 1 schmelzs
There are two options if you would like to export one and the same base system in 
130 1 schmelzs
different ranges: You either, from the start, put two different Stage1 versions into 
131 1 schmelzs
place which are maintained separately. Or you move the differences into a certain 
132 1 schmelzs
area which will later be additionally mounted in the environment, for example by 
133 1 schmelzs
using a Stacking file system.
134 1 schmelzs
135 1 schmelzs
136 1 schmelzs
The SLX-Server
137 1 schmelzs
138 1 schmelzs
All the considerations made so far have an effect on space requirements. Depending 
139 1 schmelzs
on the range of the installed system, a Stage1 version needs 2 - 8 GBytes of disk 
140 1 schmelzs
space in the folder /var/opt/openslx/stage1. A Stage2-NFS-Export requires 
141 1 schmelzs
between 90 and 98% of this amount, a NBD/SquashFS-Export between 35 - 50%. Accordingly 
142 1 schmelzs
you should ensure /srv/openslx/export has enough disk space.
143 1 schmelzs
144 1 schmelzs
SLX-Clients operate stateless and have no local operating system installed. They 
145 1 schmelzs
obtain their joint Rootfilesystem from a central server, which should be configured 
146 1 schmelzs
with sufficient capacity. The largest load is carried by the Rootfilesystem export 
147 1 schmelzs
service, which generates the largest Filesystem output. For a setup consisting of 
148 1 schmelzs
100 clients, you should have one to two Gigabit Interfaces and fast hard drives 
149 1 schmelzs
bound by RAID installed on your server. Since only the files in the area of the 
150 1 schmelzs
exports of the clients are incorporated, you can place /var/opt/openslx/stage1 on 
151 1 schmelzs
slower drives. The requirement of DHCP and TFTP do not even burden an average 
152 1 schmelzs
server with more than 1000 clients. While the server sits better on the backbone 
153 1 schmelzs
of your network, a 100Mbits interface is sufficient for the clients. Depending on 
154 1 schmelzs
the type of operation, in one day between 0.3 and 3 Gigabytes of data is transported 
155 1 schmelzs
per client. The installation of Network block devices with SquashFS can more than 
156 1 schmelzs
halve the amount of data compared to NFS.
157 1 schmelzs
158 1 schmelzs
An increase of the client connections to 1 Gigabit should be accompanied with improved 
159 1 schmelzs
IO of the server: A very fast RAID or placing the exports in RAM connected with 
160 1 schmelzs
Gigabit-Trunking accelerates the start and operation of the clients considerably. 
161 1 schmelzs
They are then generally noticeably faster as in classic operation from a local hard 
162 1 schmelzs
disk.
163 1 schmelzs
164 1 schmelzs
For smaller network of demonstration with few clients, an average equipped fileserver 
165 1 schmelzs
of normal Desktop PC should suffice.
166 1 schmelzs
167 1 schmelzs
168 1 schmelzs
Program names und global Settings
169 1 schmelzs
170 1 schmelzs
The Configuration and Setup programs all have the prefix "slx", most of which are 
171 1 schmelzs
Perl scripts. Most tools deliver some short help with the Option "--help", the Manpage 
172 1 schmelzs
can be accessed through "--man".
173 1 schmelzs
174 1 schmelzs
You can set global settings after the installation using slxsettings, like directory 
175 1 schmelzs
structure. Calling slxsettings without parameters, a list of current settings is shown:
176 1 schmelzs
x60s:~ # slxsettings
177 1 schmelzs
paths fixed at installation time:
178 1 schmelzs
        base-path='/opt/openslx'
179 1 schmelzs
        config-path='/etc/opt/openslx'
180 1 schmelzs
current base settings (cmdline options):
181 1 schmelzs
        db-name='openslx'
182 1 schmelzs
        db-spec=''
183 1 schmelzs
        db-type='SQLite'
184 1 schmelzs
        debug-confess=''
185 1 schmelzs
        locale='de_DE.UTF8'
186 1 schmelzs
        locale-charmap='UTF-8'
187 1 schmelzs
        private-path='/var/opt/openslx'
188 1 schmelzs
        public-path='/'
189 1 schmelzs
        temp-path='/tmp'
190 1 schmelzs
        verbose-level=''
191 1 schmelzs
extended settings:
192 1 schmelzs
        db-passwd=<unset>
193 1 schmelzs
        db-user=<unset>
194 1 schmelzs
        default-shell='bash'
195 1 schmelzs
        default-timezone='Europe/Berlin'
196 1 schmelzs
        mirrors-preferred-top-level-domain='de'
197 1 schmelzs
        mirrors-to-try-count='20'
198 1 schmelzs
        mirrors-to-use-count='5'
199 1 schmelzs
        ossetup-max-try-count='5'
200 1 schmelzs
        pxe-theme=<unset>
201 1 schmelzs
        pxe-theme-menu-margin='9'
202 1 schmelzs
203 1 schmelzs
slxsettings provides through an extensive help (slxsettings --man), which 
204 1 schmelzs
summaries all Perl based SLX commands:
205 1 schmelzs
206 1 schmelzs
SLXSETTINGS(1)        User Contributed Perl Documentation       SLXSETTINGS(1)
207 1 schmelzs
208 1 schmelzs
NAME
209 1 schmelzs
       slxsettings − OpenSLX−script to show & change local settings
210 1 schmelzs
211 1 schmelzs
SYNOPSIS
212 1 schmelzs
       slxsettings [options] [action ...]
213 1 schmelzs
214 1 schmelzs
       Script Actions
215 1 schmelzs
216 1 schmelzs
             set <option‐name=value>    sets the option to the given value
217 1 schmelzs
             reset <option‐name>        resets the given option to its default
218 1 schmelzs
219 1 schmelzs
       List of Known Option Names
220 1 schmelzs
221 1 schmelzs
             db‐name=<string>           name of database
222 1 schmelzs
             db‐spec=<string>           full DBI‐specification of database
223 1 schmelzs
             db‐type=<string>           type of database to connect to
224 1 schmelzs
             locale=<string>            locale to use for translations
225 1 schmelzs
             logfile=<string>           file to write logging output to
226 1 schmelzs
             private‐path=<string>      path to private data
227 1 schmelzs
             public‐path=<string>       path to public (client‐accessible) data
228 1 schmelzs
             temp‐path=<string>         path to temporary data
229 1 schmelzs
             verbose‐level=<int>        level of logging verbosity (0‐3)
230 1 schmelzs
231 1 schmelzs
       General Options
232 1 schmelzs
233 1 schmelzs
             ‐‐help                     brief help message
234 1 schmelzs
             ‐‐man                      full documentation
235 1 schmelzs
             ‐‐quiet                    do not print anything
236 1 schmelzs
             ‐‐version                  show version
237 1 schmelzs
       Actions
238 1 schmelzs
239 1 schmelzs
           set <openslx-option>=<value>
240 1 schmelzs
               sets the specified option to the given value
241 1 schmelzs
242 1 schmelzs
           reset <setting>
243 1 schmelzs
               removes the given setting from the local settings (resets it to
244 1 schmelzs
               its default value)
245 1 schmelzs
           ...
246 1 schmelzs
247 1 schmelzs
Thus the Debug expenditure can be controlled by the option ‐‐verbose‐level=0-3 
248 1 schmelzs
with all SLX commands. Changes of the values can be made with set, reset allows 
249 1 schmelzs
for resetting on the default value, if available, or deletes the entry.
250 1 schmelzs
251 1 schmelzs
For most SLX environments the default values should be ok. If however you have 
252 1 schmelzs
for example mounted a large empty partition under /data/openslx and would like 
253 1 schmelzs
to use this for OpenSLX, you can adjust the Stage1-Installationen on these:
254 1 schmelzs
255 1 schmelzs
x60s:~ # slxsettings set public-path='/data/openslx'
256 1 schmelzs
setting public-path to '/data/openslx'
257 1 schmelzs
x60s:~ # slxsettings set mirrors-preferred-top-level-domain=de
258 1 schmelzs
setting mirrors-preferred-top-level-domain to 'de'
259 1 schmelzs
260 1 schmelzs
The second example shows an important setting for the search of mirrors of the 
261 1 schmelzs
sources of installation of the different distributions. OpenSLX tries to determine 
262 1 schmelzs
the Domain with the installation, however fails in networks with private Domain 
263 1 schmelzs
names. Likewise you can change the type of database which administers with OpenSLX 
264 1 schmelzs
exported systems and your clients. The standard type is "SQLite", depending upon 
265 1 schmelzs
installed Perl components you may alternatively also use MySQL.
266 1 schmelzs
267 1 schmelzs
x60s:~ # slxsettings set db-type=SQLite
268 1 schmelzs
setting db-type to 'SQLite'
269 1 schmelzs
270 1 schmelzs
Once you have decided on the type of database, you cannot easily change it in the 
271 1 schmelzs
running system. After base installation, you must devote to a database at Stage0 
272 1 schmelzs
or Stage1.
273 1 schmelzs
274 1 schmelzs
You will find the settings in /etc/opt/openslx/settings:
275 1 schmelzs
SLX_DB_TYPE=SQLite
276 1 schmelzs
SLX_MIRRORS_PREFERRED_TOP_LEVEL_DOMAIN=de
277 1 schmelzs
SLX_PUBLIC_PATH=/data/openslx
278 1 schmelzs
279 1 schmelzs
280 1 schmelzs
Stage1 from Network Sources or reference machines
281 1 schmelzs
282 1 schmelzs
Depending on the Linux Distribution, there are one or two ways to setup Stage1: 
283 1 schmelzs
either you install a fresh system from the package sources or you clone an already 
284 1 schmelzs
setup machine, which is running under your Linux distribution. Both are taken care of 
285 1 schmelzs
by the command slxos-setup, which is made up of "slxos-setup command <parameter>". 
286 1 schmelzs
Information is listed by the subcommand "list-supported":
287 1 schmelzs
288 1 schmelzs
x60s:~ # slxos-setup list-supported
289 1 schmelzs
        gentoo-2007.X           (clone)
290 1 schmelzs
        suse-10.2               (clone,install)
291 1 schmelzs
        suse-10.2_x86_64        (clone,install)
292 1 schmelzs
        suse-10.3               (clone)
293 1 schmelzs
        suse-10.3_x86_64        (clone)
294 1 schmelzs
        suse-11.0               (clone,install)
295 1 schmelzs
        suse-11.0_x86_64        (clone,install)
296 1 schmelzs
        ubuntu-8.04             (clone,install)
297 1 schmelzs
        ubuntu-8.04_amd64       (clone,install)
298 1 schmelzs
299 1 schmelzs
So far not all listed distributions from SLX-Stage3 are supported. New installations 
300 1 schmelzs
are performed by slxos-setup with the subcommand "install", followed by the 
301 1 schmelzs
distribution:
302 1 schmelzs
303 1 schmelzs
x60s:~ # slxos-setup install suse-11.0
304 1 schmelzs
[ ... lots of yum output ... ]
305 1 schmelzs
Total download size: 69 k
306 1 schmelzs
Downloading Packages:
307 1 schmelzs
(1/2): nbd-2.8.7-14.i586. 100% |=========================|  45 kB    00:00
308 1 schmelzs
(2/2): squashfs-kmp-defau 100% |=========================|  24 kB    00:00
309 1 schmelzs
Running Transaction Test
310 1 schmelzs
Finished Transaction Test
311 1 schmelzs
Transaction Test Succeeded
312 1 schmelzs
Running Transaction
313 1 schmelzs
  Installing: squashfs-kmp-default         ######################### [1/2]
314 1 schmelzs
  Installing: nbd                          ######################### [2/2]
315 1 schmelzs
316 1 schmelzs
Installed: nbd.i586 0:2.8.7-14 squashfs-kmp-default.i586 0:3.1_2.6.18.2_34-34
317 1 schmelzs
Complete!
318 1 schmelzs
Starting SuSEconfig, the SuSE Configuration Tool...
319 1 schmelzs
Running in full featured mode.
320 1 schmelzs
Reading /etc/sysconfig and updating the system...
321 1 schmelzs
Executing /sbin/conf.d/SuSEconfig.perl...
322 1 schmelzs
Executing /sbin/conf.d/SuSEconfig.permissions...
323 1 schmelzs
Finished.
324 1 schmelzs
Vendor-OS 'suse-11.0' installed succesfully.
325 1 schmelzs
Vendor-OS 'suse-11.0' has been added to DB (ID=1).
326 1 schmelzs
327 1 schmelzs
Depending on bandwidth and load of your network you can plan a coffee or lunch 
328 1 schmelzs
break till this step is finished. All of the installed distributions can be 
329 1 schmelzs
refreshed with "slxos-setup update <distro>", which is considerably faster 
330 1 schmelzs
than the primary installation.
331 1 schmelzs
332 1 schmelzs
If you already have an established system, since, for example, you may want to 
333 1 schmelzs
turn Fat-Clients into OpenSLX-Clients, Clone setup may be a good option. The 
334 1 schmelzs
slxos-setup subcommand "clone" requires the outgoing source. To be able to 
335 1 schmelzs
identify a classic cloned system of a classic RPM installation, give the 
336 1 schmelzs
child an individual name. Everything you enter after the distribution name 
337 1 schmelzs
and version, for example "-mysystem", become part of the name. The actual 
338 1 schmelzs
clone operation occurs in the background with the command Rsync, so that at the 
339 1 schmelzs
start you are prompted for the root password of the reference machine. On 
340 1 schmelzs
an Ubuntu Reference system you must ensure that "root" can login through SSH.
341 1 schmelzs
342 1 schmelzs
x60s:~ # slxos-setup clone 10.60.4.50:/ suse-11.0-mysystem
343 1 schmelzs
Cloning vendor-OS from '10.60.4.50:/' to '/space/stage1/suse-11.0-mysystem'...
344 1 schmelzs
Password: 
345 1 schmelzs
receiving file list ...
346 1 schmelzs
...
347 1 schmelzs
var/yp/
348 1 schmelzs
var/yp/nicknames
349 1 schmelzs
var/yp/binding/
350 1 schmelzs
351 1 schmelzs
sent 5765235 bytes  received 6044617832 bytes  5710602.23 bytes/sec
352 1 schmelzs
total size is 6025777602  speedup is 1.00
353 1 schmelzs
Vendor-OS 'suse-11.0-mysystem' has been cloned successfully.
354 1 schmelzs
Vendor-OS 'suse-11.0-mysystem' has been added to DB (ID=3).
355 1 schmelzs
356 1 schmelzs
357 1 schmelzs
The subcommand "list-installed" shows you all existing Stage1-Systems:
358 1 schmelzs
x60s:~ # slxos-setup list-installed
359 1 schmelzs
List of installed vendor-OSes:
360 1 schmelzs
        suse-11.0-mysystem
361 1 schmelzs
        suse-10.3
362 1 schmelzs
363 1 schmelzs
Plug-ins - the modular Extension of the base package
364 1 schmelzs
365 1 schmelzs
The general Software Architecture of OpenSLX aims to extend the base 
366 1 schmelzs
functionality of the system by implementing special extensions 
367 1 schmelzs
(OS-Plugins). The previous steps were sufficient for a bootable base 
368 1 schmelzs
system, however not a comfortable graphical desktop. This task is taken 
369 1 schmelzs
over by the plug-ins "xserver" and "desktop". The first takes care of 
370 1 schmelzs
the automatic setup of Xorg and the integration of proprietary OpenGL 
371 1 schmelzs
drivers from NVidia or ATI/AMD. The second deals with the setup of 
372 1 schmelzs
display managers and the graphical default session.
373 1 schmelzs
374 1 schmelzs
Installation of the plug-ins and their configuration, if you wish to 
375 1 schmelzs
change their default settings, is taken care by the command slxos-plugin:
376 1 schmelzs
x60s:~ # slxos-plugin install suse-11.0 desktop manager=kdm
377 1 schmelzs
Plugin desktop has been installed into vendor-OS 'suse-11.0'.
378 1 schmelzs
x60s:~ # slxos-plugin install ubuntu-8.04-clone xserver
379 1 schmelzs
Plugin xserver has been installed into vendor-OS 'suse-11.0'.
380 1 schmelzs
381 1 schmelzs
For a later post installation of plug-ins: Without a following export and 
382 1 schmelzs
call to the OpenSLX Demuxers, which are explained later, the selected 
383 1 schmelzs
plug-in won't be available on the booting SLX-Clients.
384 1 schmelzs
385 1 schmelzs
Stage3-Attribute, that like the desktop plug-in includes settings for 
386 1 schmelzs
later running clients, writes slxos-plugin into the database. There you 
387 1 schmelzs
can customize these anytime for single clients, whole groups or vendor OS.
388 1 schmelzs
389 1 schmelzs
390 1 schmelzs
System Export
391 1 schmelzs
392 1 schmelzs
The previous operations have not yet covered the allocation of a 
393 1 schmelzs
Rootfilesystem to booting clients. This occurs in the next step with 
394 1 schmelzs
slxos-export, which realises the transition from Stage1-Installations 
395 1 schmelzs
into Stage2-Exports. The parameter "list-installed" should, when called 
396 1 schmelzs
with slxos-export, give the identical result as with slxos-setup:
397 1 schmelzs
398 1 schmelzs
x60s:~ # slxos-export list-installed
399 1 schmelzs
List of installed vendor-OSes:
400 1 schmelzs
        suse-10.3-mysystem
401 1 schmelzs
        suse-11.0
402 1 schmelzs
403 1 schmelzs
From this system you can now create an Export, currently supported are 
404 1 schmelzs
"nfs" and "nbd-squash". Further types will be added in future development. 
405 1 schmelzs
The subcommand "export", you create a new export, for example:
406 1 schmelzs
407 1 schmelzs
x60s:~ # slxos-export export suse-11.0-x60 sqfs-nbd
408 1 schmelzs
invoking mksquashfs...
409 1 schmelzs
Parallel mksquashfs: Using 1 processor
410 1 schmelzs
Creating little endian 3.0 filesystem on /data/openslx/export/sqfs/suse-11.0-x60
411 1 schmelzs
    block size 65536.
412 1 schmelzs
[===========================================================] 294751/294751 100%
413 1 schmelzs
[ ... ]
414 1 schmelzs
Filesystem size 2325395.23 Kbytes (2270.89 Mbytes)
415 1 schmelzs
        41.13% of uncompressed filesystem size (5654449.42 Kbytes)
416 1 schmelzs
Inode table size 2888177 bytes (2820.49 Kbytes)
417 1 schmelzs
        30.34% of uncompressed inode table size (9518178 bytes)
418 1 schmelzs
Directory table size 2735640 bytes (2671.52 Kbytes)
419 1 schmelzs
        47.98% of uncompressed directory table size (5701677 bytes)
420 1 schmelzs
[ ... ]
421 1 schmelzs
vendor-OS '/data/openslx/stage1/suse-11.0-x60' successfully exported to '/data/openslx/export/sqfs/suse-11.0-x60'!
422 1 schmelzs
Export 'suse-11.0-x60:sqfs-nbd' has been added to DB (ID=1)...
423 1 schmelzs
################################################################################
424 1 schmelzs
Please make sure you start a corresponding nbd-server:
425 1 schmelzs
        nbd-server 5000 /data/openslx/export/sqfs/suse-11.0-x60 -r
426 1 schmelzs
################################################################################
427 1 schmelzs
system 'suse-11.0-x60:sqfs-nbd' has been successfully added to DB (ID=1)
428 1 schmelzs
429 1 schmelzs
A classic NFS Rootfilesystem can be created through a similar call:
430 1 schmelzs
431 1 schmelzs
x60s:~ # slxos-export export suse-11.0 nfs
432 1 schmelzs
building file list ...
433 1 schmelzs
...
434 1 schmelzs
... rsync Ausgaben ...
435 1 schmelzs
...
436 1 schmelzs
sent 5642940230 bytes  received 5681918 bytes  9147566.23 bytes/sec
437 1 schmelzs
total size is 5624419842  speedup is 1.00
438 1 schmelzs
vendor-OS '/data/openslx/stage1/suse-11.0-x60' successfully exported to 
439 1 schmelzs
 '/data/export/nfs/suse-11.0'!
440 1 schmelzs
Export 'suse-11.0-nfs' has been added to DB (ID=1)...
441 1 schmelzs
################################################################################
442 1 schmelzs
Please make sure the following line is contained in /etc/exports
443 1 schmelzs
in order to activate the NFS-export of this vendor-OS:
444 1 schmelzs
        /data/export/nfs/suse-11.0  *(ro,no_root_squash,async,no_subtree_check)
445 1 schmelzs
################################################################################
446 1 schmelzs
system 'suse-11.0-nfs' has been successfully added to DB (ID=1)
447 1 schmelzs
448 1 schmelzs
Afterwards you can ensure that everything has worked through calling 
449 1 schmelzs
"slxos-export list-exported".
450 1 schmelzs
451 1 schmelzs
452 1 schmelzs
Quick start
453 1 schmelzs
454 1 schmelzs
Up to this point you prepared the Rootfilesystem (either classic NFS or 
455 1 schmelzs
NBD with SquashFS) and the database filled with some base data. Missing 
456 1 schmelzs
now is the preparation of the respective Kernels with the appropriate 
457 1 schmelzs
InitialRamFS and one matching client configuration. This task is taken care 
458 1 schmelzs
by the command slxconfig-demuxer, which doesn't require any further parameters. 
459 1 schmelzs
460 1 schmelzs
It works directly with the entries in the database. With the base data you 
461 1 schmelzs
already have a valid configuration for each requesting client. For more 
462 1 schmelzs
specific settings, the tool slxconfig can be used, which will be explained 
463 1 schmelzs
in the next section.
464 1 schmelzs
465 1 schmelzs
Your ISC-DHCP-Server should be running and the following two entries for the 
466 1 schmelzs
domain from which you want to boot stateless:
467 1 schmelzs
468 1 schmelzs
next-server 10.8.4.254;
469 1 schmelzs
filename "pxe/pxelinux.0";
470 1 schmelzs
471 1 schmelzs
The second entry depends on the specified TFTP root directory. How to proceed: 
472 1 schmelzs
When DHCP is running, enter the appropriate values. Now you should have 
473 1 schmelzs
prepared everything needed to test the first clients. If you have not yet 
474 1 schmelzs
turned on the PXE-Bootability, do this on your clients now. They should now 
475 1 schmelzs
be assigned an IP Address at start-up and then download the Kernel and InitRamFS.
476 1 schmelzs
477 1 schmelzs
478 1 schmelzs
The Database and the Boot Setup
479 1 schmelzs
480 1 schmelzs
As soon as you want to manage multiple systems or give clients varying 
481 1 schmelzs
settings, the configuration through the database comes into play. To 
482 1 schmelzs
communicate with the database, which is located by slxox-* under 
483 1 schmelzs
/var/opt/openslx/db or where ever you specified, use the command slxconfig. 
484 1 schmelzs
It can occur that not every type of database is supported on every server. 
485 1 schmelzs
This will be determined at the end of the call slxos-setup. Then you can 
486 1 schmelzs
edit this using slxsettings.
487 1 schmelzs
488 1 schmelzs
This plans to be extended to a web interface in future versions. Entries 
489 1 schmelzs
in the database up until now were entered automatically and show:
490 1 schmelzs
491 1 schmelzs
x60s:~ # slxconfig list-vendoros
492 1 schmelzs
List of the matching vendor-OSes:
493 1 schmelzs
        suse-10.3-mysystem
494 1 schmelzs
	suse-11.0
495 1 schmelzs
x60s:~ # slxconfig list-export
496 1 schmelzs
List of the matching exports:
497 1 schmelzs
        suse-10.3-mysystem        (nfs)
498 1 schmelzs
	suse-11.0:sqfs-nbd        (sqfs-nbd)
499 1 schmelzs
500 1 schmelzs
For the installation Vendor-OS, called SLX-Stage1 and the exports created 
501 1 schmelzs
from this. Generally one entry will be created for one system in the 
502 1 schmelzs
database:
503 1 schmelzs
504 1 schmelzs
x60s:~ # slxconfig list-systems
505 1 schmelzs
List of systems:
506 1 schmelzs
        <<<default>>>
507 1 schmelzs
        suse-10.3-mysystem:nfs
508 1 schmelzs
	suse-11.0:sqfs-nbd
509 1 schmelzs
510 1 schmelzs
now displays
511 1 schmelzs
512 1 schmelzs
x60s:~ # slxconfig add-client slx-test01 mac=00:01:02:03:04:06
513 1 schmelzs
client 'slx-test01' has been successfully added to DB (ID=1)
514 1 schmelzs
x60s:~ # slxconfig add-client slx-test02 mac=00:11:22:33:44:55
515 1 schmelzs
client 'slx-test02' has been successfully added to DB (ID=2)
516 1 schmelzs
517 1 schmelzs
So that your Administrator can also login on the clients, you should determine 
518 1 schmelzs
a joint root password. For German users it makes sense to change the default 
519 1 schmelzs
language:
520 1 schmelzs
521 1 schmelzs
x60s:~ # slxconfig change-system suse-11.0:sqfs-nbd country=de
522 1 schmelzs
523 1 schmelzs
If everything works then you can remove this again. One alternative would be 
524 1 schmelzs
to distribute an "Authorized"-SSH-Key to the clients using ConfTGZ, to be able 
525 1 schmelzs
to access a fixed machine without problems. Debugging is often not possible 
526 1 schmelzs
without access to the client itself.
527 1 schmelzs
528 1 schmelzs
You complete the last step by calling slxconfig-demuxer. This command does 
529 1 schmelzs
not require any further subcommands or parameters, since it obtains all of 
530 1 schmelzs
its information from the database. All the necessary operations to complete 
531 1 schmelzs
the Stage2 phase are done in this step.
532 1 schmelzs
533 1 schmelzs
The slxconfig-demuxer completely rebuilds the directory <public-path>/tftpboot 
534 1 schmelzs
and <public-path>/tftpboot/client-config. And changes that you may have made 
535 1 schmelzs
in these folders will be lost. There are multiple sources of the demuxers:
536 1 schmelzs
* Kernel, -modules come from Stage1, the respective Vender-OS from which an 
537 1 schmelzs
export was created
538 1 schmelzs
* The base configuration, the InitRamFS setup, for the created InitRamFS 
539 1 schmelzs
will be generated from the database. Entries can be edited with slxconfig.
540 1 schmelzs
* The package of the configuration data (ConfTGZ) comes from 
541 1 schmelzs
/var/opt/openslx/config/<system-name>. The system name is automatically 
542 1 schmelzs
entered into the database by slxos-export.
543 1 schmelzs
544 1 schmelzs
545 1 schmelzs
Communication with the Database
546 1 schmelzs
547 1 schmelzs
The tool slxconfig provides the user interface to the database. With this 
548 1 schmelzs
you can display all settings and make changes. "slxconfig list-system" shows 
549 1 schmelzs
you all activated, ready for potential clients, SLX systems.
550 1 schmelzs
551 1 schmelzs
In the last section you entered single clients into the database. You can 
552 1 schmelzs
see all set variables with:
553 1 schmelzs
554 1 schmelzs
x60s:~ # slxconfig --verbose list-system name="<system>"
555 1 schmelzs
List of systems:
556 1 schmelzs
system 'suse-11.0-main:nfs':
557 1 schmelzs
    clients       = <<<default>>>
558 1 schmelzs
    comment       = -
559 1 schmelzs
    description   = -
560 1 schmelzs
    export_id     = 6 (suse-11.0-main:nfs)
561 1 schmelzs
    hidden        = -
562 1 schmelzs
    id            = 5
563 1 schmelzs
    kernel        = vmlinuz
564 1 schmelzs
    kernel_params = aufs vga=0x317 quiet
565 1 schmelzs
    label         = suse-11.0-main:nfs
566 1 schmelzs
  PLUGINS:
567 1 schmelzs
    30...Theme
568 1 schmelzs
    50...VMware
569 1 schmelzs
  ATTRIBUTES:
570 1 schmelzs
    country       = de
571 1 schmelzs
    ramfs_fsmods  = aufs
572 1 schmelzs
    ramfs_nicmods = forcedeth e1000 e100 tg3 r8169 pcnet32 b44 8139too
573 1 schmelzs
    slxgrp        = default
574 1 schmelzs
    start_cron    = yes
575 1 schmelzs
    start_dreshal = yes
576 1 schmelzs
    start_nfsv4   = yes
577 1 schmelzs
    start_ntp     = yes
578 1 schmelzs
    start_sshd    = yes
579 1 schmelzs
    start_x       = yes
580 1 schmelzs
    start_xdmcp   = kdm
581 1 schmelzs
    theme::name   = openslx
582 1 schmelzs
    vmware        = nfs://10.4.6.1/vol/vmwareImages/vmware
583 1 schmelzs
584 1 schmelzs
585 1 schmelzs
Most of the settings aren't assigned a value for the setup of the machine 
586 1 schmelzs
so they are assigned "<<<default>>>". You can change the parameter of the 
587 1 schmelzs
system and default system:
588 1 schmelzs
589 1 schmelzs
x60s:~ # slxconfig change-system "<<<default>>>" start_xdmcp=gdm
590 1 schmelzs
system '<<<default>>>' has been successfully changed.
591 1 schmelzs
592 1 schmelzs
This configuration ensures that all cloned SuSE-11.0 clients start with the 
593 1 schmelzs
Default-Splash with the resolution 1024x768:
594 1 schmelzs
x60s:~ # slxconfig change-system suse-10.3-mysystem:sqfs-nbd \
595 1 schmelzs
kernel_params="vga=0x317 quiet"
596 1 schmelzs
597 1 schmelzs
The following database entry is needed if the home directory of the user 
598 1 schmelzs
is not prepared the secure NFSv3 way:
599 1 schmelzs
% predicted to be in plug-in
600 1 schmelzs
x60s:~ # slxconfig change-system suse-10.3-mysystem:sqfs-nbd automnt_dir=/home 
601 1 schmelzs
automnt_src="nfs://11.00.4.2/home"
602 1 schmelzs
603 1 schmelzs
In many scenarios you may use different servers for DHCP, TFPT and the 
604 1 schmelzs
fileserver for the Client-Rootfilesystem. Should your export server differ 
605 1 schmelzs
from the DHCP-Server, you must inform your database:
606 1 schmelzs
607 1 schmelzs
x60s:~ # slxconfig change-export suse-10.3-main::sqfs-nbd server_ip=10.30.4.4
608 1 schmelzs
port=5002
609 1 schmelzs
export 'suse-10.3-main::sqfs-nbd' has been successfully changed
610 1 schmelzs
x60s:~ # slxconfig list-export suse-10.3-main::sqfs-nbd
611 1 schmelzs
List of exports:
612 1 schmelzs
export 'suse-10.3-main::sqfs-nbd':
613 1 schmelzs
    comment      = -
614 1 schmelzs
    id           = 10
615 1 schmelzs
    port         = 5002
616 1 schmelzs
    server_ip    = 10.30.4.4
617 1 schmelzs
    type         = sqfs-nbd
618 1 schmelzs
    uri          = -
619 1 schmelzs
    vendor_os_id = 7 (suse-10.3-main)
620 1 schmelzs
621 1 schmelzs
x60s:~ # slxconfig change-system suse-11.0-clone::nfs \
622 1 schmelzs
  scratch="nfs://10.8.4.2/data/export/tmp"
623 1 schmelzs
624 1 schmelzs
625 1 schmelzs
System-Update and Extension
626 1 schmelzs
627 1 schmelzs
With Stage1-Installations installed directly from the package source, 
628 1 schmelzs
you perform updates on the server. This is triggered by the "update" 
629 1 schmelzs
parameter in slxos-setup:
630 1 schmelzs
631 1 schmelzs
x60s:~ # slxos-setup update suse-11.0-kde
632 1 schmelzs
Setting up Update Process
633 1 schmelzs
Setting up repositories
634 1 schmelzs
base_non-oss              100% |=========================|  951 B    00:00
635 1 schmelzs
base                      100% |=========================|  951 B    00:00
636 1 schmelzs
base_update               100% |=========================| 1.2 kB    00:00
637 1 schmelzs
Reading repository metadata in from local files
638 1 schmelzs
primary.xml.gz            100% |=========================| 548 kB    00:00
639 1 schmelzs
################################################## 1340/1340
640 1 schmelzs
Resolving Dependencies
641 1 schmelzs
[ ... etliche weitere Ausgaben ... ]
642 1 schmelzs
Starting SuSEconfig, the SuSE Configuration Tool...
643 1 schmelzs
Running in full featured mode.
644 1 schmelzs
Reading /etc/sysconfig and updating the system...
645 1 schmelzs
Executing /sbin/conf.d/SuSEconfig.perl...
646 1 schmelzs
Executing /sbin/conf.d/SuSEconfig.permissions...
647 1 schmelzs
Finished.
648 1 schmelzs
Vendor-OS 'suse-11.0-kde' updated succesfully.
649 1 schmelzs
650 1 schmelzs
The update of a clone system is performed on the reference machine in 
651 1 schmelzs
the so called Stage0. After this you call 
652 1 schmelzs
"slxos-setup clone 11.00.4.50:/ suse-10.3-mysystem":
653 1 schmelzs
654 1 schmelzs
Vendor-OS 'suse-10.3-mysystem' has been re-cloned successfully. 
655 1 schmelzs
No need to change vendor-OS 'suse-10.3-mysystem' in OpenSLX-database.
656 1 schmelzs
657 1 schmelzs
658 1 schmelzs
x60s:~ # slxos-setup clone 0.20.4.50:/ suse-10.3-mysystem
659 1 schmelzs
building file list ...
660 1 schmelzs
[ ... etliche weitere Ausgaben ... ]
661 1 schmelzs
sent 434920 bytes  received 121491994 bytes  375737.79 bytes/sec
662 1 schmelzs
total size is 8644862874  speedup is 70.90
663 1 schmelzs
Vendor-OS 'suse-10.3-mysystem' has been cloned successfully.
664 1 schmelzs
No need to change vendor-OS 'suse-10.3-mysystem' in OpenSLX-database.
665 1 schmelzs
666 1 schmelzs
You will then be informed that slxos-setup was completed successfully. 
667 1 schmelzs
There are no special update parameters for System Clone since the update 
668 1 schmelzs
occurs externally to the server on the reference machine and is only 
669 1 schmelzs
then copied to the server.
670 1 schmelzs
671 1 schmelzs
672 1 schmelzs
Cleanup
673 1 schmelzs
674 1 schmelzs
At some stage you may want to remove older systems or test versions. The 
675 1 schmelzs
tools slxos-setup and slxos-export have a delete operation for this. For 
676 1 schmelzs
this you work in reverse order. slxconfig deals with the database and 
677 1 schmelzs
doesn't delete anything in the file system:
678 1 schmelzs
679 1 schmelzs
x60s:~ # slxconfig remove suse-11.0
680 1 schmelzs
removing vendor-OS folder '/data/openslx/stage1/suse-11.0'...
681 1 schmelzs
Vendor-OS 'suse-11.0' removed successfully.
682 1 schmelzs
Vendor-OS 'suse-11.0' has been removed from DB!
683 1 schmelzs
684 1 schmelzs
The removal of systems from the ~/tftpboot area occurs with a recall of 
685 1 schmelzs
slxconfig-demuxer.
686 1 schmelzs
687 1 schmelzs
In the next step you remove exports (parts of Stage2), which do not use 
688 1 schmelzs
an insignificant amount of disk space. This process also removes the 
689 1 schmelzs
associated database entry.
690 1 schmelzs
691 1 schmelzs
% change!!
692 1 schmelzs
x60s:~ # slxos-export remove suse-11.0 nbd
693 1 schmelzs
export '/srv/openslx/export/nbd-squash/suse-11.0' successfully removed!
694 1 schmelzs
Export 'suse-11.0' has been removed from DB.
695 1 schmelzs
696 1 schmelzs
x60s:~ # slxos-export remove suse-11.0
697 1 schmelzs
export '/srv/openslx/export/nfs/suse-11.0' successfully removed!
698 1 schmelzs
Export 'suse-11.0' has been removed from DB.
699 1 schmelzs
700 1 schmelzs
In the last step we remove the installed base system (Stage1) from the 
701 1 schmelzs
disk of your server. This also removes the database entry.
702 1 schmelzs
703 1 schmelzs
x60s:~ # slxos-setup remove suse-11.0
704 1 schmelzs
Vendor-OS 'suse-11.0' removed succesfully.
705 1 schmelzs
Vendor-OS 'suse-11.0' has been removed from DB!
706 1 schmelzs
707 1 schmelzs
708 1 schmelzs
Boot Cycle
709 1 schmelzs
710 1 schmelzs
711 1 schmelzs
712 1 schmelzs
PXE-Boot
713 1 schmelzs
714 1 schmelzs
Your PCs can now do what, for a long time, was a given on a "proper" Unix 
715 1 schmelzs
Workstation: Intels Pre boot eXtension Environment (PXE) gives the option 
716 1 schmelzs
of booting hard drive-less machines over a network. The network booting 
717 1 schmelzs
machine acquires an IP Address via DHCP as well as the information of 
718 1 schmelzs
where it can load a PXE-Image via TFTP. This then gives the machine more 
719 1 schmelzs
boot functionality. At this point a whole class of network software is added. 
720 1 schmelzs
Well known are the wide range of netbased operating system installations, 
721 1 schmelzs
whether Linux or Windows.
722 1 schmelzs
723 1 schmelzs
The PXE Boot menus for you clients are prepared by the slxconfig-demuxer 
724 1 schmelzs
automatically in the directory ~/tftpboot/pxe/pxelinux.cfg. If you would 
725 1 schmelzs
like to customize the look of your menu or change the default password for 
726 1 schmelzs
access to the appropriate kernel command line, you must edit the file 
727 1 schmelzs
/etc/opt/openslx/PXE-template.
728 1 schmelzs
729 1 schmelzs
730 1 schmelzs
DHCP for the IP-Address assignment
731 1 schmelzs
732 1 schmelzs
If there was not already a DHCP server in your network, you will now need to 
733 1 schmelzs
setup one. In most cases it is sufficient to adjust two files to get a DHCP 
734 1 schmelzs
server running. The entries for your clients are found in /etc/dhcpd.conf. 
735 1 schmelzs
For initial test the following entries are enough:
736 1 schmelzs
737 1 schmelzs
ddns-update-style none;
738 1 schmelzs
subnet 10.8.4.0 netmask 255.255.255.0 {
739 1 schmelzs
  server-identifier 10.8.4.1;
740 1 schmelzs
  next-server 10.8.4.1;
741 1 schmelzs
  filename "pxe/pxelinux.0";
742 1 schmelzs
  option routers 10.8.4.254;
743 1 schmelzs
  range 10.8.4.101 10.8.4.200;
744 1 schmelzs
}
745 1 schmelzs
746 1 schmelzs
After this you determine in /etc/sysconfig/dhcpd that the DHCP server is 
747 1 schmelzs
listening on the correct interface and, for security, is running in a 
748 1 schmelzs
chroot environment:
749 1 schmelzs
750 1 schmelzs
DHCPD_INTERFACE="eth0"
751 1 schmelzs
DHCPD_RUN_CHROOTED="yes"
752 1 schmelzs
753 1 schmelzs
754 1 schmelzs
TFTP
755 1 schmelzs
756 1 schmelzs
The start procedure of a client upto and including Stage3, is strongly 
757 1 schmelzs
associated with TFTP. The initial data (PXE-Linux and the menu system) 
758 1 schmelzs
and the client configuration are acquired using this protocol. The directory 
759 1 schmelzs
structure for a typical SLX-Installation looks like this:
760 1 schmelzs
761 1 schmelzs
tftpboot/client-config
762 1 schmelzs
tftpboot/client-config/suse-11.0-A
763 1 schmelzs
tftpboot/client-config/suse-11.0-A/01-<MAC>.tgz
764 1 schmelzs
tftpboot/client-config/suse-11.0-A/default.tgz
765 1 schmelzs
tftpboot/client-config/<system>/...
766 1 schmelzs
tftpboot/pxe
767 1 schmelzs
tftpboot/pxe/menu.c32
768 1 schmelzs
tftpboot/pxe/pxelinux.0
769 1 schmelzs
tftpboot/pxe/suse-11.0
770 1 schmelzs
tftpboot/pxe/suse-11.0/initramfs-1
771 1 schmelzs
tftpboot/pxe/suse-11.0/vmlinuz
772 1 schmelzs
tftpboot/pxe/<vendor-os>/...
773 1 schmelzs
tftpboot/pxe/...
774 1 schmelzs
775 1 schmelzs
By default, the directory is located under /srv/openslx. Its location can 
776 1 schmelzs
be changed by using slxsettings --tftpboot-path=New-Dir.
777 1 schmelzs
778 1 schmelzs
The file in.tftp is included with most distributions as TFTP server. This 
779 1 schmelzs
is activated using xinetd. For this you edit the file /etc/xinetd.d/tftp 
780 1 schmelzs
depending on the distribution:
781 1 schmelzs
782 1 schmelzs
service tftp
783 1 schmelzs
{
784 1 schmelzs
        socket_type             = dgram
785 1 schmelzs
        protocol                = udp
786 1 schmelzs
        wait                    = yes
787 1 schmelzs
        user                    = root
788 1 schmelzs
        server                  = /usr/sbin/in.tftpd
789 1 schmelzs
        server_args             = -s /tftpboot
790 1 schmelzs
        disable                 = yes
791 1 schmelzs
}
792 1 schmelzs
793 1 schmelzs
The carried out settings for the directory need to match the settings of 
794 1 schmelzs
the OpenSLX package and DHCP server. The variable "filename" contains 
795 1 schmelzs
"/tftpboot/pxe/pxelinux.0", this file should be delivered to the requesting 
796 1 schmelzs
PXE-Clients.
797 1 schmelzs
798 1 schmelzs
The entry "-s /tftpboot" means, that at the start of the in.tftpd, under 
799 1 schmelzs
the entered path, clients can download files from the server. So that the 
800 1 schmelzs
client knows where to search, the DHCP server informs them with the variable 
801 1 schmelzs
"filename". PXE itself is not in the position to load a large kernel which 
802 1 schmelzs
may be a few megabytes straight away. So, it is given a special Boot-Loader 
803 1 schmelzs
from the Syslinux package from Peter Anwin, pxelinux.0.
804 1 schmelzs
805 1 schmelzs
This tool takes over all further steps and can also build a boot menu and 
806 1 schmelzs
provide further boot options. After the establishment you restart xinetd, 
807 1 schmelzs
you then use the small command tftp from any machine in your network or 
808 1 schmelzs
directly from the server to check if the file pxelinux.0 can be loaded from 
809 1 schmelzs
the location your clients are expecting:
810 1 schmelzs
811 1 schmelzs
dirk@x60s:/tmp> tftp 10.8.4.254
812 1 schmelzs
tftp> get /tftpboot/pxe/pxelinux.0
813 1 schmelzs
tftp> quit
814 1 schmelzs
dirk@x60s:/tmp> ls -la pxelinux.0
815 1 schmelzs
-rw-r--r-- 1 dirk users 13320 2007-04-20 16:10 pxelinux.0
816 1 schmelzs
817 1 schmelzs
Syslinux
818 1 schmelzs
819 1 schmelzs
In the last section we discussed a program to produce boot menus and to load 
820 1 schmelzs
the kernal and InitialRamFS through TFTP: pxelinux.0 is a component of the 
821 1 schmelzs
Syslinux package. The central program pxelinux.0 and menu-help program are 
822 1 schmelzs
available in the OpenSLX package.
823 1 schmelzs
824 1 schmelzs
There are some specific parameters for PXElinux. pxelinux.0 expects its 
825 1 schmelzs
configuration file in respect to some locations under pxelinux.cfg. If no 
826 1 schmelzs
special machine specific configuration files are found, it loads a file named 
827 1 schmelzs
default. Machine specific files have the format 01-<MAC-des-Clients>. The format 
828 1 schmelzs
of specific and default files is identical, their content may of course not 
829 1 schmelzs
differ. In your system settings you will find the template:
830 1 schmelzs
831 1 schmelzs
NOESCAPE 0
832 1 schmelzs
PROMPT 0
833 1 schmelzs
TIMEOUT 10
834 1 schmelzs
DEFAULT menu.c32
835 1 schmelzs
IMPLICIT 1
836 1 schmelzs
ALLOWOPTIONS 1
837 1 schmelzs
MENU TITLE What would you like to do (Selection using cursor)?
838 1 schmelzs
MENU MASTER PASSWD secret
839 1 schmelzs
LABEL memtest
840 1 schmelzs
  KERNEL memtest.bin
841 1 schmelzs
842 1 schmelzs
It is best to use the small test tool memtest for the first test of a PXE-Boot 
843 1 schmelzs
over the network. It is a small binary program which performs intensive memory 
844 1 schmelzs
tests in infinite test runs. So that you don't always need to get a CD with the 
845 1 schmelzs
current version, you can easily provide it through the network for all PXE 
846 1 schmelzs
compatible machines. The tool can be found, for example, on a magazine DVD or 
847 1 schmelzs
the first installation CD of SuSE and should be copied into the same directory 
848 1 schmelzs
as pxelinux.0. If it is in a different location, you must ensure that the 
849 1 schmelzs
TFTP server has access to this location. You can also specify the full path 
850 1 schmelzs
like „kernel /tftpboot/tools/memtest.bin“. The termination of memtest can be 
851 1 schmelzs
chosen arbitrarily, but may not be „*.0“. If everything worked well, you 
852 1 schmelzs
can then experiment using a Linux Kernel and an appropriate Ramdisk in the 
853 1 schmelzs
next step.
854 1 schmelzs
855 1 schmelzs
prompt 1
856 1 schmelzs
timeout 100
857 1 schmelzs
default dxs
858 1 schmelzs
label dxs
859 1 schmelzs
  kernel dxs
860 1 schmelzs
  append vga=normal initrd=initrd-dxs nfsserver=10.30.4.1:/nfsroot/ldc
861 1 schmelzs
  ipappend 1
862 1 schmelzs
label memtest
863 1 schmelzs
  kernel memtest.bin
864 1 schmelzs
865 1 schmelzs
Most of the parameters are self explanatory: Prompt ensures that PXElinux 
866 1 schmelzs
with the prompt „boot:“ waits for 100 seconds (timeout 100). If in this 
867 1 schmelzs
time no input was given, by default „label dxs“ will be started. The setting 
868 1 schmelzs
assumes the kernel called kernel-dxs and a matching Ramdisk called initrd-dxs 
869 1 schmelzs
is located in the directory /nfsroot/ldc/boot. This can easily be achieved with:
870 1 schmelzs
871 1 schmelzs
cp /boot/vmlinuz /nfsroot/ldc/boot/kernel-dxs
872 1 schmelzs
cp /boot/initrd(.img) /nfsroot/ldc/boot/initrd-dxs
873 1 schmelzs
874 1 schmelzs
„ipappend 1“ ensures that PXE writes the configuration in the Kernel-Commandline 
875 1 schmelzs
which is acquired through DHCP. This contains the additional parameter „ip“:
876 1 schmelzs
877 1 schmelzs
ip=11.00.40.2:11.00.40.71:11.00.40.254:255.255.255.0
878 1 schmelzs
879 1 schmelzs
You can view the content of this special row with the command „cat /proc/cmdline“. 
880 1 schmelzs
After the configuration has been completed, you will see a lot more with a 
881 1 schmelzs
restart of the Test-Clients. Now the client almost looks like usual: A boot 
882 1 schmelzs
loader takes care of the Kernel as well as the Initial Ramdisk and ensures 
883 1 schmelzs
they start. The Kernel extracts itself, as is familiar with Knoppix or a hard 
884 1 schmelzs
drive installation. The Mini-Linux-Environment of the Initial-Ramdisk is carried 
885 1 schmelzs
out. However the process breaks with a failed mount of the Root-filesystem.
886 1 schmelzs
887 1 schmelzs
Image: vmware-normalinitrd.png
888 1 schmelzs
889 1 schmelzs
This is because the Kernel and Ramdisk come from a classic installation and are 
890 1 schmelzs
prepared for a start from a hard drive. At this point the Admin has come quite 
891 1 schmelzs
far and has enough of an understanding of the basic concepts to try out a 
892 1 schmelzs
Diskless Linux project.
893 1 schmelzs
894 1 schmelzs
895 1 schmelzs
Configuration of OpenSLX Clients
896 1 schmelzs
897 1 schmelzs
OpenSLX clients cannot store their configuration as is the case with classic 
898 1 schmelzs
Linux-Workstations. This is why machines are prepared in multiple steps:
899 1 schmelzs
1. You aquire you Base-IP-configuration when booting through PXE or Etherboot/gPXE 
900 1 schmelzs
if in the PXE file the Parameter IPAPPEND 1 is set. Otherwise the the machine 
901 1 schmelzs
will call a new DHCP-Client in Stage3.
902 1 schmelzs
2. If the Kernel started in the Stage3-Init, the main script will read the 
903 1 schmelzs
configuration data from the previous stages Kernel command line and the 
904 1 schmelzs
InitRamFS delivered machine setup file.
905 1 schmelzs
3. After this an extended configuration within Stage3, depending on the 
906 1 schmelzs
specified configuration start, is available.
907 1 schmelzs
4. Then the Stage3 scripts read the loaded configuration and create the 
908 1 schmelzs
majority of the settings for Stage4.
909 1 schmelzs
910 1 schmelzs
All primary configuration steps occur during the run of InitialRamFS. The 
911 1 schmelzs
central configuration file is machine-setup. It is populated and extended 
912 1 schmelzs
during the setup of InitialRamFS in Stage2 initialization and during Stage3. 
913 1 schmelzs
In Stage4 it can be accessed in the directory /etc.
914 1 schmelzs
915 1 schmelzs
916 1 schmelzs
The Kernel Command line
917 1 schmelzs
918 1 schmelzs
The slxconfig-demuxer prepares the Kernel Command line alongside the 
919 1 schmelzs
InitialRamFS and Client configuration. It consists of necessary and 
920 1 schmelzs
optional entries which are delivered by PXElinux or Etherboot. The IP 
921 1 schmelzs
configuration can and InitialRamFS must count towards this. However there 
922 1 schmelzs
is a problem, the Kernel command line with Intel platforms is limited to 
923 1 schmelzs
256 characters, so must take this into account for this entry.
924 1 schmelzs
- debug - without specifying a level, the debug level is set to 1
925 1 schmelzs
- debug=* - sets the debug level on the specified integer value. For a 
926 1 schmelzs
listing of all debug levels see appendix E.2
927 1 schmelzs
- nodhcp - no renewed DHCP for configuration in InitRamFS. Setting for 
928 1 schmelzs
cases where the standard IP and DNS data are assigned in other ways 
929 1 schmelzs
(ConfTGZ and PXE-IP-Info). This entry is not in the Kernel command line 
930 1 schmelzs
by default.
931 1 schmelzs
- ldap=* - use LDAP for configuration (URI Syntax)
932 1 schmelzs
- file - use TFTP to acquired configuration files
933 1 schmelzs
- file=* - use TFTP take the specified TFTP Server and path (URI Syntax)
934 1 schmelzs
- ldsc - do not generate ld.so.cache and overtaken by existing3 from 
935 1 schmelzs
Stage2.
936 1 schmelzs
- rootfs=* - Type of Root file system of the Client. In question are 
937 1 schmelzs
currently NFS, (D)NBD with SquashFS. The URI Format is expected, for 
938 1 schmelzs
example "rootfs=nfs://server/pfad" or "rootfs=nbd://server:port/Filesystem". 
939 1 schmelzs
If the root filesystem is made up of many components, "ldsc" will 
940 1 schmelzs
automatically be activated. Instead of a constant server IP, you can 
941 1 schmelzs
use the variable "@@@serverip@@@" when DHCP- und Root file system 
942 1 schmelzs
servers are identical. In Stage3 it will be replaced with the DHCP 
943 1 schmelzs
acquired value for the DHCP server.
944 1 schmelzs
dcsize=* - only needed with defined "rootfs=dnbd://...", defines the 
945 1 schmelzs
size of the cache file for DNBD. Since the cache file is stored in 
946 1 schmelzs
RAM, it should be chosen according to available RAM.
947 1 schmelzs
- ip=* - is populated through PXE-Linuxor Etherboot/gPXE.
948 1 schmelzs
- tmpfssize=* - size of the maximum temporary memory in RAM (tmpfs)
949 1 schmelzs
- vci=* - Vendor Code Identifier, only needed if DHCP is used.
950 1 schmelzs
951 1 schmelzs
5.2 Central Configuration File machine-setup
952 1 schmelzs
953 1 schmelzs
The central Configuration File of a OpenSLX client is machine-setup. In 
954 1 schmelzs
the current version it can be found in 
955 1 schmelzs
/var/opt/openslx/config/default/initramfs/machine-setup. For a given 
956 1 schmelzs
installation it should already be populated with reasonable settings, 
957 1 schmelzs
since it is entered into the created InitRamFS as Initial-Configuration4. 
958 1 schmelzs
The configuration methods in the attached explanation, append their results 
959 1 schmelzs
to this file. So for example, the DHCP configuration could possibly 
960 1 schmelzs
overwrite the variable for Hostname, DNS-Server, ... etc. In some cases 
961 1 schmelzs
a variable can be defined more than once. In this case only the last one 
962 1 schmelzs
defined is valid, so the file is read from the bottom up if you are 
963 1 schmelzs
looking for a particular assignment.
964 1 schmelzs
Instead of a constant Server IP for the differing sources or services, 
965 1 schmelzs
you can use the variable "@@@serverip@@@" in machine-setup. It will be 
966 1 schmelzs
replaced with the address acquired from DHCP in Stage3. With this you 
967 1 schmelzs
can spare yourself statistical entries if the same IP address is valid 
968 1 schmelzs
for most or even all SLX-Services.
969 1 schmelzs
Even though in most environments, OpenSLX Clients are kept quite 
970 1 schmelzs
consistent, it could be of interest or necessary to specify settings 
971 1 schmelzs
for individual clients separately. This becomes more important in larger 
972 1 schmelzs
networks with groups of clients. All of the following configuration types 
973 1 schmelzs
are accessed in Stage3 of the client start.
974 1 schmelzs
Currently there are three (four) configuration possibilities, even if 
975 1 schmelzs
they aren't all implemented:
976 1 schmelzs
- Via TFTP (configuration plus extension - ConfTGZ)
977 1 schmelzs
file get - is a component of the current version 4. Extension to 
978 1 schmelzs
database generated machine-setup, like user authentication, home 
979 1 schmelzs
directory and admin specific scripts (summarized as TGZ) is obtained 
980 1 schmelzs
by the client (MAC sei 00:11:43:7c:da:ff) one after the other in the 
981 1 schmelzs
Form 01-00-11-43-7c-da-ff.tgz and default.tgz.
982 1 schmelzs
The files are obtained at the start of the Services-Configuration 
983 1 schmelzs
(servconfig), so could possibly be modified.
984 1 schmelzs
Files can be specified explicitly: 
985 1 schmelzs
"file=tftp://<server-ip>/pxe/client-config/<system-name>/01-00-11-43-7c-da-ff.tgz" 
986 1 schmelzs
or should be present under a certain schema.
987 1 schmelzs
988 1 schmelzs
For this reason, if problems arise, you should test the client first 
989 1 schmelzs
to see if the command line is populated with all options.
990 1 schmelzs
991 1 schmelzs
992 1 schmelzs
apt-get  install libdbd-sqlite3-perl sqlite3
993 1 schmelzs
994 1 schmelzs
995 1 schmelzs
Problems
996 1 schmelzs
997 1 schmelzs
998 1 schmelzs
slxconfig-demuxer  --verbose-level=2
999 1 schmelzs
1000 1 schmelzs
slxos-setup remove suse-11.0-x86_64
1001 1 schmelzs
removing vendor-OS folder '/var/opt/openslx/stage1/suse-11.0-x86_64'...
1002 1 schmelzs
Vendor-OS 'suse-11.0-x86_64' removed successfully.