Introduce $NO_WINDOWS_BINARIES which replaces $WINDOWS_BINARIES; update docs
[grml-live.git] / docs / grml-live.txt
1 grml-live(8)
2 ============
3
4 Name
5 ----
6
7 grml-live - build framework based on FAI for generating a grml and Debian based
8 Linux Live system (CD/ISO)
9
10 Synopsis
11 --------
12
13 grml-live [-a <architecture>] [-c <classe[s]>] [-C <configfile>] [-g
14 <grml_name>] [-i <iso_name> ] [-o <output_directory>] [-r <release_name>] [-s
15 <suite>] [-t <template_directory>] [-v <version_number>] [-bBFhquVz]
16
17 CAUTION: Please check out <<current_state,the 'Current state of grml-live with
18 squashfs-tools and kernel' section>> for details about current state of involved
19 tools before starting with grml-live or if you encounter any problems.
20
21 Description
22 -----------
23
24 grml-live provides the build system for creating a grml and Debian based Linux
25 Live-CD. The build system is based on
26 link:http://www.informatik.uni-koeln.de/fai/[FAI] (Fully Automatic
27 Installation). grml-live uses the "fai dirinstall" feature to generate a chroot
28 system based on the class concept of FAI (see later sections for further
29 details) and provides the framework to be able to generate a full-featured ISO.
30 It does not use all the FAI features by default though and you don't have to
31 know FAI to be able to use it.
32
33 The use of FAI gives you the flexibility to choose the packages you would like
34 to include on your very own Linux Live-CD without having to deal with all the
35 details of a build process.
36
37 CAUTION: grml-live does **not** use /etc/fai for configuration but instead
38 provides and uses /etc/grml/fai. This ensures that it does not clash with
39 default FAI configuration and packages, so you can use grml-live and FAI
40 completely independent at the same time!
41
42 [NOTE]
43
44 Please notice that you should have a fast network connection as all the Debian
45 packages will be downloaded and installed via network. If you want to use a
46 local mirror (strongly recommended if you plan to use grml-live more than once)
47 checkout mkdebmirror (see /usr/share/doc/grml-live/examples/mkdebmirror),
48 debmirror(1), reprepro(1) (see /usr/share/doc/grml-live/examples/reprepro/ for a
49 sample configuration), apt-cacher(1) and approx(8). To avoid downloading the
50 base system again and again check out FAI's NFSROOT (see FAQ of this document
51 for details).
52
53 Options
54 -------
55
56   -a **ARCHITECTURE**::
57
58 Use the specified architecture instead of the currently running one.  This
59 allows building a 32bit system on a 64bit host (though you can't build a 64bit
60 system on a 32bit system/kernel of course). Please notice that real
61 crosscompiling (like building a ppc system on x86) isn't possible due to the
62 nature and the need of working in a chroot. Currently supported values: i386
63 and amd64.
64
65   -b::
66
67 Build the ISO without updating the chroot via FAI. This option is useful for
68 example when working on stable releases: if you have a working base
69 system/chroot and do not want to execute any further updates (via "-u" option)
70 but intend to only build the ISO.
71
72   -B::
73
74 Build the ISO without touching the chroot at all. This option is useful if
75 you modified anything that FAI or grml-live might adjust via grml's FAI
76 scripts.  It's like the '-b' option but even more advanced. Use only if you
77 really know that you do not want to update the chroot.
78
79   -c **CLASSES**::
80
81 Specify the CLASSES to be used for building the ISO via FAI.  By default only
82 the classes GRMLBASE, GRML_MEDIUM and I386 are assumed, resulting in a small base
83 system (being about ~180MB total ISO size). If using a non-I386 system (like
84 amd64) you should specify the appropriate architecture as well. Additionally you
85 can specify a class providing a grml-kernel (see
86 <<classes,the 'CLASSES' section in this document>> for details about available classes).
87 So instead of GRML_MEDIUM you can also use GRML_SMALL and GRML_FULL.
88
89   -C **CONFIGURATION_FILE**::
90
91 The specified file is used as configuration file for grml-live. By default
92 /etc/grml/grml-live.conf is used as default configuration. If a file named
93 /etc/grml/grml-live.local exists it is used as well (sourced after reading
94 /etc/grml/grml-live.conf meant as main file for local configuration). As a last
95 option the specified configuration file is sourced so it is possible to override
96 settings of /etc/grml/grml-live.conf as well as of /etc/grml/grml-live.local.
97 Please notice that all configuration files have to be adjusted during execution
98 of grml-live, so please make sure you use /etc/grml/grml-live.conf as a base for
99 your own configuration file (usually /etc/grml/grml-live.local). Please also
100 notice that the configuration file specified via this option is **not** (yet)
101 supported inside the scripts/hooks/classes at /etc/grml/fai/config. Instead use
102 /etc/grml/grml-live.local for configuration stuff used inside
103 /etc/grml/fai/config.
104
105   -F::
106
107 Force execution and do not prompt for acknowledgment of configuration.
108
109   -g **GRML_NAME**::
110
111 Set the grml flavour name. Common usage examples: grml, grml-small, grml64.
112 Please do NOT use blanks and any special characters like '/', ';' inside
113 GRML_NAME, otherwise you might notice problems while booting.
114
115   -h::
116
117 Display short usage information and exit.
118
119   -i **ISO_NAME**::
120
121 Specify name of ISO which will be available inside $OUTPUT_DIRECTORY/grml_isos
122 by default.
123
124   -o **OUTPUT_DIRECTORY**::
125
126 Main output directory of the build process of FAI.  Some directories are created
127 inside this target directory, being: grml_cd (where the files for creating the
128 ISO are located, including the compressed squashfs file), grml_chroot (the
129 chroot system) and grml_isos (where the resulting ISO is stored).
130
131   -q::
132
133 Build the ISO without (re-)creating the squashfs compressed file using mksquashfs.
134 This option is useful if you just want to update parts outside the chroot in the ISO.
135 Consider combining this option with the build-only option '-b'.
136
137   -r **RELEASENAME**::
138
139 Specify name of the release.
140
141   -s **SUITE**::
142
143 Specify the Debian suite you want to use for your live-system.  Defaults to
144 "lenny" (being current Debian/stable). Supported values are: etch, lenny, sid.
145 Debian "squeeze" (current Debian/testing) requires base.tgz
146 (/etc/grml/fai/config/basefiles/....tar.gz) or a recent version of debootstrap.
147
148   -t **TEMPLATE_DIRECTORY**::
149
150 Specify place of the templates used for building the ISO. By default
151 (and if not manually specified) this is /usr/share/grml-live/templates/.
152
153   -u::
154
155 Update existing chroot instead of rebuilding it from scratch. This option is
156 based on the softupdate feature of FAI.
157
158   -v **VERSION_NUMBER**::
159
160 Specify version number of the release.
161
162   -V::
163
164 Increase verbosity in the build process.
165
166   -z::
167
168 Use ZLIB instead of LZMA compression in mksquashfs part of the build process.
169
170 [[usage-examples]]
171 Usage examples
172 --------------
173
174 To get a small, Debian-stable and grml-based Live-CD using /grml/grml-live
175 as build and output directory just run:
176
177   # grml-live
178
179 To get a small Debian-unstable and grml-small based Live-CD using
180 /home/mika/grml-live as build and output directory just use:
181
182   # grml-live -s sid -c GRMLBASE,GRML_SMALL,I386 -o /home/mika/grml-live
183
184 To get a medium sized, Debian-unstable and grml-based Live-CD for i386
185 architecture using /grml/grml-live as build and output directory just run:
186
187   # grml-live -s sid -a i386 -c GRMLBASE,GRML_MEDIUM,I386
188
189 To get a small, Debian-unstable and grml-based Live-CD using /tmp as build and
190 output directory and use grml_0.0-3.iso as ISO name (placed inside
191 /tmp/grml_isos) just invoke:
192
193   # grml-live -o /tmp -c GRMLBASE,GRML_SMALL,I386 -s sid -i grml_0.0-3.iso
194
195 [NOTE]
196
197 If you have about 700MB of free space inside /dev/shm (being a tmpfs, usually
198 you should have >=1GB of RAM) just run "mount -o remount,suid,dev,rw /dev/shm"
199 and use /dev/shm as build and output directory - resulting in very fast build
200 process.  But please be aware of the fact that rebooting your system will result
201 in an empty /dev/shm, so please use another directory for $CHROOT_OUTPUT,
202 $BUILD_OUTPUT and $ISO_OUTPUT if you plan to create more persistent output. :)
203
204 [[main-features]]
205 Main features of grml-live
206 --------------------------
207
208 * create a grml-/Debian-based Linux Live-CD with one single command
209
210 * class based concept, providing a maximum of flexibility
211
212 * supports integration of own hooks, scripts and configuration
213
214 * supports use and integration of own Software and/or Kernels via simple use of
215 Debian repositories
216
217 * native support of FAI features
218
219 * multi-arch support (work in progress)
220
221 [[class-concept]]
222 The class concept
223 -----------------
224
225 grml-live uses FAI and its class based concept for adjusting configuration and
226 setup according to your needs. This gives you flexibility and strength without
227 losing the simplicity in the build process.
228
229 The main and base class provided by grml-live is named GRMLBASE. It's strongly
230 recommended to **always** use the class GRMLBASE when building an ISO using
231 grml-live, as well as the architecture dependent class which provides the kernel
232 (being 'I386' for x86_32 and 'AMD64' for x86_64) and a GRML_* class (like
233 GRML_SMALL, GRML_MEDIUM or GRML_FULL). The following files and directories are
234 relevant for class GRMLBASE by default:
235
236   /etc/grml/fai/config/scripts/GRMLBASE/
237   /etc/grml/fai/config/debconf/GRMLBASE
238   /etc/grml/fai/config/class/GRMLBASE.var
239   /etc/grml/fai/config/hooks/instsoft.GRMLBASE
240   /etc/grml/fai/config/package_config/GRMLBASE
241
242 Take a look at the next section for information about the concept of those
243 files/directories.
244
245 If you want to use your own configuration, extend an existing configuration
246 and/or add additional packages to your ISO just invent a new class (or extend an
247 existing one). For example if you want to use your own class named "FOOBAR" just
248 set CLASSES="GRMLBASE,GRML_SMALL,I386" inside /etc/grml/grml-live.local or
249 invoke grml-live using the classes option: "grml-live -c
250 GRMLBASE,GRML_SMALL,I386,FOOBAR ...".
251
252 More details regarding the class concept can be found in the documentation of
253 FAI itself (being available at /usr/share/doc/fai-doc/).
254
255 [[X7]]
256 [[classes]]
257 Available classes
258 -----------------
259
260 The package selection part of the classes can be found in
261 /etc/grml/fai/config/package_config whereas some further classes are defined for
262 example in /etc/grml/fai/config/scripts/ so specific feature sets can be
263 selected. The following classes are predefined:
264
265 * DEBORPHAN: get rid of all packages listed in output of Deborphan
266
267 * GRMLBASE: the main class responsible for getting a minimal subset of what's
268 defining a grml system. Important parts of the buildprocess are specified in
269 this class as well, so unless you have a really good reason you should always
270 use this class.
271
272 * GRML_FORENSIC: tools for forensic investigations which has been created
273 by people from link:http://www.forensic-geeks.org/[forensic-geeks.org].
274
275 * GRML_FULL: full featured grml, also known as the "normal", full grml.
276
277 * GRML_MEDIUM: medium sized grml version, known as grml-medium
278
279 * GRML_POWERPC: grml for PowerPC architecture, not supported yet (still work in
280 progress)
281
282 * GRML_SMALL: minimum sized grml version, known as grml-small
283
284 * LATEX: LaTeX(-related) packages like auctex, texlive,...
285 (which used to be shipped by grml before the LaTeX removal)
286
287 * LATEX_CLEANUP: get rid of several very large LaTeX directories
288 (like some /usr/share/doc/texlive-*, /usr/share/doc/texmf,...)
289
290 * LOCALES: use full featured locales setup (see /etc/locale.gen.grml). This
291 avoids to get rid of /usr/share/locale - which happens by default otherwise - as
292 well.
293
294 * NO_ONLINE: do not run scripts during the chroot build process which require a
295 network connection
296
297 * RELEASE: run some specific scripts and commands to provide the workflow for an
298 official grml release
299
300 * REMOVE_DOCS: get rid of documentation directories (like /usr/share/doc,
301 /usr/share/man/, /usr/share/info,...)
302
303 * XORG: providing important packages for use with a base grml-featured X.org
304 setup
305
306 [[files]]
307 Files
308 -----
309
310 Notice that grml-live ships FAI configuration files that do not use the same
311 namespace as the FAI packages itself. This ensures that grml-live does not clash
312 with your usual FAI configuration, so instead of /etc/fai/fai.conf (package
313 fai-client) grml uses /etc/grml/fai/fai.conf instead. For more details see
314 below. To get an idea how another configuration or example files could look like
315 check out /usr/share/doc/fai-doc/examples/simple/ (provided by Debian package
316 fai-doc). Furthermore /usr/share/doc/fai-doc/fai-guide.html/ch-config.html
317 provides documentation regarding configuration possibilities.
318
319   /usr/sbin/grml-live
320
321 Script for the main build process. Requires root permissions for execution.
322
323   /etc/grml/grml-live.conf
324
325 Main configuration file for grml-live which should be considered as a reference
326 configuration file only. Please use /etc/grml/grml-live.local for local
327 configuration instead.
328
329   /etc/grml/grml-live.local
330
331 All the local configuration should go to this file. This file overrides any
332 defaults of grml-live. Configurations via /etc/grml/grml-live.local are prefered
333 over the ones from /etc/grml/grml-live.conf. If you want to override settings
334 from /etc/grml/grml-live.local as well you have to specify them on the grml-live
335 commandline.
336
337   /etc/grml/fai/fai.conf
338
339 Main configuration file for FAI which specifies where all the configuration
340 files and scripts for FAI/grml-live can be found. By default it is set to
341 FAI_CONFIGDIR=/etc/grml/fai/config, a directory shipped by grml-live
342 out-of-the-box so you shouldn't have to configure anything in this file.
343
344   /etc/grml/fai/make-fai-nfsroot.conf
345
346 This file is used by make-fai-nfsroot(8) only. Usually you don't have to change
347 anything inside this file. If you want to modify NFSROOT though you can adjust
348 it there.
349
350   /etc/grml/fai/NFSROOT
351
352 This file specifies the package list for creating the NFSROOT.
353
354   /etc/grml/fai/apt/sources.list
355
356 This file specifies which mirrors should be considered for retrieving the Debian
357 packages when creating the main chroot (including all the software you would
358 like to see included). Important: this file should *not* be adjusted manually!
359 Instead use the GRML_LIVE_SOURCES variable inside /etc/grml/grml-live.conf or
360 /etc/grml/grml-live.local which modifies /etc/grml/fai/apt/sources.list
361 on-the-fly via grml-live then. If you want to generally adjust apt configuration
362 check out /etc/grml/fai/files/etc/apt instead.
363
364   /etc/grml/fai/config/
365
366 The main directory for configuration of FAI/grml-live. More details below.
367
368   /etc/grml/fai/config/class/
369
370 This directory contains files which specify main configuration variables for the
371 FAI classes.
372
373   /etc/grml/fai/config/debconf/
374
375 This directory provides the files for preseeding/configuration of debconf
376 through files.
377
378   /etc/grml/fai/config/hooks/
379
380 This directory provides files for customising the build process through hooks.
381 Hooks are user defined programs or scripts, which are called during the
382 installation process.
383
384   /etc/grml/fai/config/package_config/
385
386 Directory with lists of software packages to be installed or removed.  The
387 different classes describe what should find its way to your ISO.  When running
388 "grml-live -c GRMLBASE,GRML_SMALL,I386 ..." only the configuration of GRMLBASE,
389 GRML_SMALL and and I386 will be taken. If you use 'grml-live -c
390 GRMLBASE,GRML_SMALL,I386,FOOBAR ...' then the files of GRMLBASE, GRML_SMALL,
391 I386 **plus** the files from FOOBAR will be taken. So just create a new class to
392 adjust the package selection according to your needs.  Please notice that the
393 directory GRMLBASE contains a package list defining a minimum but still
394 reasonable package configuration.
395
396   /etc/grml/fai/config/scripts/
397
398 Scripts for customising the ISO within the build process.
399
400   /etc/grml/fai/files/
401
402 This directory provides files used inside the scripts of
403 /etc/grml/fai/config/scripts/*. For a full documentation what happens with the
404 files please refer to the source of the scripts.
405
406   /etc/grml/fai/live-initramfs/
407
408 This directory provides the files used for building the initramfs/initrd via
409 live-initramfs(8).
410
411 [[log-files]]
412 Available log files
413 -------------------
414
415 grml-live itself logs to /var/log/grml-live.log. Unless you set ZERO_LOGFILE in
416 /etc/grml/grml-live.conf the output is appended to the file. If you set the
417 ZERO_LOGFILE configuration option the logfile will be truncated on each new
418 invocation of grml-live.
419
420 The FAI part of grml-live logs to /var/log/fai/$HOSTNAME/ - so the
421 default being /var/log/fai/grml/.
422
423 If you are using the grml-live buildd you will find the logs of the grml-live
424 run at /var/log/grml-buildd.stdout and /var/log/grml-buildd.stderr.
425
426 [[requirements]]
427 Requirements for the build system
428 ---------------------------------
429
430 * any Debian based system should be sufficient (if it doesn't work it's a bug,
431 please send us a bug report then) [a usual
432 link:http://grml.org/grml2hd/[grml2hd] harddisk installation (using grml or
433 grml-medium) ships all you need]. Check out <<deploy-on-debian,How do I deploy
434 grml-live on a plain Debian installation>> for details how to set up grml-live
435 on a plain, original Debian system.
436
437 * enough free disk space; at least 800MB are required for a minimal grml-live
438 run (\~400MB for the chroot [$CHROOT_OUTPUT], \~150MB for the build target
439 [$BUILD_OUTPUT] and \~150MB for the resulting ISO [$ISO_OUTPUT] plus some
440 temporary files), if you plan to use GRML_FULL you should have at least 4GB of
441 total free disk space
442
443 * fast network access for retrieving the Debian packages used for creating the
444 chroot (check out "local mirror" and "NFSROOT" to workaround this problem as far
445 as possible)
446
447 For further information see next section.
448
449 [[X8]]
450 [[current_state]]
451 Current state of grml-live with squashfs-tools and kernel
452 ---------------------------------------------------------
453
454 To make it easier to track problems this section documents current state of
455 grml-live playing together with squashfs-tools / squashfs-lzma-tools (for
456 building the compressed file) and the kernel version. Documentation of this
457 section is up2date by 04nd of august 2009, please report any bugs you
458 encounter.
459
460 Using squashfs-lzma-tools 3.3-1 on the build system
461 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
462
463 squashfs-lzma-tools from the grml repository supports kernel 2.6.26-grml[64] and
464 2.6.28-grml[64] using both lzma and zlib (-nolzma) compression. It's the
465 recommended package for building ISOs with grml-live currently!
466
467 The packages can be downloaded from
468 link:http://deb.grml.org/pool/main/s/squashfs-lzma/[http://deb.grml.org/pool/main/s/squashfs-lzma/].
469
470 [NOTE]
471 Please use squashfs-lzma-tools 3.3-1 if you want to remaster grml release
472 2008.11 or 2009.05.
473
474 Using squashfs-tools 1:3.3-7 on the build system
475 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
476
477 squashfs-tools 1:3.3-7 is available via the official Debian/unstable and
478 Debian/testing (Lenny) pool running:
479
480   # aptitude install squashfs-tools=1:3.3-7
481
482 or directly via downloading the files
483 http://grml.org/squashfs/squashfs-tools_3.3-7_i386.deb (for x86) or
484 http://grml.org/squashfs/squashfs-tools_3.3-7_amd64.deb (for amd64) [both build
485 on and for Debian/etch but working with testing and unstable as well].
486
487 Please notice that squashfs-tools 1:3.3-7 does NOT support LZMA compression at
488 all (so you won't be able to remaster release 2008.11 and 2009.05 using LZMA for
489 example). The -nolzma option of mksquashfs is not available therefore (even
490 though grml-live will deactivate it for you automatically anyway). Please use
491 squashfs-lzma-tools instead.
492
493 * Kernel 2.6.23-grml: does NOT work, please use squashfs-tools 1:3.2r2-9exp1
494                       instead if you still want to use kernel 2.6.23 (not
495                       recommended)
496 * Kernel 2.6.26-grml: works (without LZMA compression only of course!)
497 * Kernel 2.6.28-grml: works (without LZMA compression only of course!)
498
499 Using squashfs-tools 1:3.2r2-9exp1 on the build system
500 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
501
502 squashfs-tools 1:3.2r2-9exp1 is available via the grml-testing repository,
503 running:
504
505   # aptitude install squashfs-tools=1:3.2r2-9exp1
506
507 or directly via downloading the files
508 http://grml.org/squashfs/squashfs-tools_3.2r2-9exp1_i386.deb (for x86) or
509 http://grml.org/squashfs/squashfs-tools_3.2r2-9exp1_amd64.deb (for amd64).
510
511 Using with ZLIB compression (SQUASHFS_OPTIONS='-nolzma' or -z
512 option in grml-live cmdline):
513
514 * Kernel 2.6.23-grml: works
515 * Kernel 2.6.26-grml: works
516 * Kernel 2.6.28-grml: supposed to work (not verified though)
517
518 Using with LZMA compression:
519
520 * Kernel 2.6.23-grml: works
521 * Kernel 2.6.26-grml: does NOT work, please use zlib mode instead or switch
522   to Debian package squashfs-lzma-tools (see section above).
523 * Kernel 2.6.28-grml: does NOT work, please use zlib mode instead or switch
524   to Debian package squashfs-lzma-tools (see section above).
525
526 [[faq]]
527 FAQ
528 ---
529
530 [[deploy-on-debian]]
531 How do I deploy grml-live on a plain Debian installation?
532 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
533
534 The easiest way to get a running grml-live setup is to install grml or
535 grml-medium using grml2hd (for example inside KVM, Virtualbox, VMware,... if you
536 don't want to run it on a physical system). Of course using grml-live on a
537 plain, original Debian installation is supported as well. So there we go.
538
539 What we have: plain, original Debian Lenny (5.0).
540
541 What we want: build a grml-medium ISO based on Debian/squeeze for the i386
542 architecture using grml-live.
543
544 [IMPORTANT]
545
546 If you encounter any problems while booting the resulting ISO please be aware of
547 <<current_state,the 'current state of grml-live with squashfs-tools and kernel'
548 section>>.
549
550 Instructions
551 ^^^^^^^^^^^^
552
553   # adjust sources.list:
554   cat >> /etc/apt/sources.list << EOF
555
556   # grml stable repository:
557     deb     http://deb.grml.org/ grml-stable  main
558     deb-src http://deb.grml.org/ grml-stable  main
559
560   # grml testing/development repository:
561     deb     http://deb.grml.org/ grml-testing main
562     deb-src http://deb.grml.org/ grml-testing main
563   EOF
564
565   # adjust apt-pinning (only prefer squashfs stuff from grml):
566   cat >> /etc/apt/preferences << EOF
567   Package: *
568   Pin: origin deb.grml.org
569   Pin-Priority: 1
570
571   Package: squashfs-tools
572   Pin: origin deb.grml.org
573   Pin-Priority: 996
574
575   Package: squashfs-lzma-tools
576   Pin: origin deb.grml.org
577   Pin-Priority: 996
578   EOF
579
580   # get keyring for apt:
581   apt-get update
582   apt-get --allow-unauthenticated install grml-debian-keyring
583
584   # install basefile so we don't have to build basic chroot from scratch:
585   mkdir -p /etc/grml/fai/config/basefiles/
586   mv base.tgz /etc/grml/fai/config/basefiles/I386.tar.gz
587
588   # install relevant tools:
589   apt-get -o APT::Install-Recommends=false install grml-live squashfs-lzma-tools
590
591   # adjust grml-live configuration for our needs:
592   cat > /etc/grml/grml-live.local << EOF
593   # consider using lzma only for space reasons (resulting in longer
594   # build time but smaller ISO):
595   SQUASHFS_OPTIONS="-nolzma"
596   ## adjust if necessary (defaults to /grml/grml-live):
597   ## OUTPUT="/srv/grml-live"
598   FAI_DEBOOTSTRAP="squeeze http://ftp.de.debian.org/debian/"
599   ARCH="i386"
600   CLASSES="GRMLBASE,GRML_MEDIUM,I386"
601   ZERO_LOGFILE='1'
602   # ZERO_FAI_LOGFILE='1'
603   GRML_LIVE_SOURCES="
604   deb http://deb.grml.org/            grml-stable  main
605   deb http://deb.grml.org/            grml-testing main
606   deb http://ftp.de.debian.org/debian squeeze main contrib non-free
607   "
608   EOF
609
610   # just optional(!) - upgrade FAI to latest available version:
611   cat >> /etc/apt/sources.list << EOF
612   # fai:
613     deb http://www.informatik.uni-koeln.de/fai/download lenny koeln
614   EOF
615
616   # get gpg key of FAI repos and install current FAI version:
617   gpg -a --recv-keys AB9B66FD; gpg -a --export AB9B66FD | apt-key add -
618   apt-get update
619   apt-get install fai-client fai-server fai-doc
620
621 That's it. Now invoking 'grml-live -V' should build the ISO.  If everything
622 worked as expected the last line of the shell output should look like:
623
624   [*] Successfully finished execution of grml-live [running 687 seconds]
625
626 and the ISO can be found inside /grml-live/grml-live/grml_isos/ then.
627
628 [[fai-on-etch]]
629 Help, I'm using Debian etch and I don't have FAI version >3.2
630 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
631
632   wget http://www.informatik.uni-koeln.de/fai/download/etch/fai-client_3.2.8_all.deb \
633        http://www.informatik.uni-koeln.de/fai/download/etch/fai-server_3.2.8_all.deb \
634        http://www.informatik.uni-koeln.de/fai/download/etch/fai-doc_3.2.8_all.deb
635   dpkg -i fai-client_3.2.8_all.deb fai-server_3.2.8_all.deb fai-doc_3.2.8_all.deb
636
637 or check out the link:http://www.informatik.uni-koeln.de/fai/[FAI-homepage] for
638 further details.
639
640 [[how-to-debug]]
641 I've problems with the build process. How to start debugging?
642 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
643
644 Check out the logs inside /var/log/fai/... If you think it's a bug in grml-live
645 send a copy of your config, logs and the commandline with a short problem
646 description to <mika@grml.org>:
647
648   # history | grep grml-live > /etc/grml/grml_live.cmdline
649   # tar zcf grml_live_problem.tar.gz /etc/grml/grml-live.conf \
650             /etc/grml/grml-buildd.conf /var/log/fai /etc/grml/fai
651   -> finally mail grml_live_problem.tar.gz to <mika@grml.org>
652
653 If you need help with grml-live or would like to see new features as part of
654 grml-live you can get commercial support via
655 link:http://grml-solutions.com/[Grml Solutions].
656
657 [[local-debian-mirror]]
658 Can I use my own (local) Debian mirror?
659 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
660
661 Sure. Just adjust the variables GRML_LIVE_SOURCES and FAI_DEBOOTSTRAP (if not
662 already using NFSROOT's base.tgz) inside /etc/grml/grml-live.conf according to
663 your needs. Please don't forget that you should use the grml servers as well
664 (see default configuration) so all the grml packages can be downloaded as well.
665
666 If you want to use a local (for example NFS mount) mirror additionally, just
667 adjust MIRROR_DIRECTORY and MIRROR_SOURCES inside /etc/grml/grml-live.conf as
668 well.
669
670 Unless you specify GRML_LIVE_SOURCES and/or FAI_DEBOOTSTRAP the default from
671 /etc/grml/fai/apt/sources.list and /etc/grml/fai/make-fai-nfsroot.conf will be
672 taken. If you customise the variables in /etc/grml/grml-live.conf then the two
673 files will be adjusted during runtime automatically.
674
675 If MIRROR_DIRECTORY and MIRROR_SOURCES are specified the local mirror will be
676 taken as first entry in the generated sources.list so it's prefered over
677 non-local mirrors. Using a fallback mirror (via providing several mirrors in
678 GRML_LIVE_SOURCES as used by default) is a recommended setting.
679
680 [[add-additional-debian-packages]]
681 How do I add additional Debian package(s) to my CD/ISO?
682 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
683
684 Just create a new class (using the package_config directory):
685
686   # cat > /etc/grml/fai/config/package_config/MIKA << EOF
687   PACKAGES aptitude
688
689   vim
690   another_name_of_a_debian_package
691   and_another_one
692   EOF
693
694 and specify it when invoking grml-live then:
695
696   # grml-live -c GRMLBASE,GRML_SMALL,I386,MIKA
697
698 [[reset-grml-live-configuration]]
699 I fscked up my grml-live configuration. How do I reset it to the defaults?
700 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
701
702 Notice: this deletes all your grml-live configuration files. If that's really
703 what you are searching for just run:
704
705   rm -rf /etc/grml/fai /etc/grml/grml-live.conf
706   dpkg -i --force-confnew --force-confmiss /path/to/grml-live_..._all.deb
707
708 [NOTE]
709
710 If you don't control your /etc using a version control system (VCS) yet it's a
711 good chance to start using it now. Check out
712 link:http://michael-prokop.at/blog/2007/03/14/maintain-etc-with-mercurial-on-debian/[http://michael-prokop.at/blog/2007/03/14/maintain-etc-with-mercurial-on-debian/]
713 for more details how to maintain /etc using the mercurial VCS.
714
715 [[create-a-base-tgz]]
716 How do I create a base.tgz for use as NFSROOT?
717 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
718
719 First of all build the chroot system:
720
721   mkdir /tmp/nfsroot && cd /tmp/nfsroot
722   debootstrap lenny /tmp/nfsroot/ http://ftp.de.debian.org/debian
723   tar zcf base.tgz ./
724
725 Then check out where your NFSROOT is located:
726
727   # grep '^NFSROOT' /etc/grml/fai/make-fai-nfsroot.conf
728   NFSROOT=/grml/fai/nfsroot
729
730 So as /grml/fai/nfsroot is your NFSROOT place the file under
731 /grml/fai/nfsroot/live/filesystem.dir/var/tmp/:
732
733   mv base.tgz /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz
734
735 or even better use /etc/grml/fai/config/basefiles/$CLASSNAME.tar.gz instead.
736 Use I386 as $CLASSNAME for i386 builds and AMD64 for amd64 builds.
737
738 Now running "grml-live ..." will use this file as main system instead of
739 executing debootstrap. Check out the output for the following lines if using
740 NFSROOT:
741
742   [...]
743   Calling task_extrbase
744   Unpacking Debian base archive
745   Extracting /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz
746   Calling task_mirror
747   [...]
748
749 or if using /etc/grml/fai/config/basefiles/$CLASSNAME.tar.gz for:
750
751   [...]
752   ftar: extracting /etc/grml/fai/config/basefiles///AMD64.tar.gz to
753   /grml-live/grml-live_20071029.22138/grml_chroot//
754   [...]
755
756 [[apt-cacher]]
757 Set up apt-cacher / apt-cacher-ng for use with grml-live
758 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
759
760 Make sure /etc/grml/grml-live.conf provides according GRML_LIVE_SOURCES and
761 FAI_DEBOOTSTRAP:
762
763   # cat /etc/grml/grml-live.conf
764   [...]
765   GRML_LIVE_SOURCES="
766   deb http://localhost:3142/deb.grml.org grml-stable  main
767   deb http://localhost:3142/deb.grml.org grml-testing main
768   deb http://localhost:3142/ftp.de.debian.org/debian lenny main contrib non-free
769   "
770   [...]
771   FAI_DEBOOTSTRAP="lenny http://localhost:3142/ftp.de.debian.org/debian lenny main contrib non-free"
772
773 Make sure apt-cacher / apt-cacher-ng is running ('/etc/init.d/apt-cacher
774 restart' or '/etc/init.d/apt-cacher-ng restart'). That's it.  All downloaded
775 files will be cached in /var/cache/apt-cacher/ or /var/cache/apt-cacher-ng then.
776
777 [[approx]]
778 Set up approx for use with grml-live
779 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
780
781 Make sure /etc/grml/grml-live.conf provides according GRML_LIVE_SOURCES and
782 FAI_DEBOOTSTRAP:
783
784   # cat /etc/grml/grml-live.conf
785   [...]
786   GRML_LIVE_SOURCES="
787   deb http://localhost:9999/grml            grml-stable  main
788   deb http://localhost:9999/grml            grml-testing main
789   deb http://localhost:9999/debian lenny    main contrib non-free
790   "
791   FAI_DEBOOTSTRAP="lenny http://localhost:9999/debian"
792
793 Configure approx:
794
795   # cat /etc/approx/approx.conf
796   [...]
797   debian http://ftp.at.debian.org/debian
798   grml   http://deb.grml.org/
799
800 Don't forget to restart approx (/etc/init.d/approx restart). That's it.
801 All downloaded files will be cached in /var/cache/approx now.
802
803 [[question]]
804 I've a question which isn't answered by this document
805 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
806
807 Don't hesitate to ask on IRC (channel #grml on irc.freenode.org) or just drop me
808 a mail: <mika@grml.org>
809
810 [[download]]
811 Download / install grml-live as a Debian package
812 ------------------------------------------------
813
814 Debian packages are available through the grml-repository at
815 link:http://deb.grml.org/pool/main/g/grml-live/[deb.grml.org].  If you want to
816 build a Debian package on your own (using for example a specific version or the
817 current development tree), just execute:
818
819   git clone git://git.grml.org/grml-live
820   cd grml-live
821   debuild -us -uc
822
823 [[source]]
824 Source
825 ------
826
827 The source of grml-live is available at
828 link:http://git.grml.org/?p=grml-live.git[http://git.grml.org/?p=grml-live.git]
829
830 [[todo-list]]
831 TODO list
832 ---------
833
834 Check out link:http://wiki.grml.org/doku.php?id=grml-live[grml-live in the grml-wiki]
835 for details.
836
837 [[bugs]]
838 Bugs
839 ----
840
841 Please report feedback, link:http://grml.org/bugs/[bugreports] and wishes
842 link:http://grml.org/contact/[to the grml-team]!
843
844 [[authors]]
845 Authors
846 -------
847 Michael Prokop <mika@grml.org>
848
849 /////////////////////////////////////
850 // vim:ai tw=80 ft=asciidoc expandtab
851 /////////////////////////////////////