docs: add squashfs-tools to default apt-get list for deployments on Debian.
[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 [IMPORTANT]
90 All class names should be written in uppercase letters. Do not use a dash, use
91 an underscore. So do not use "amd64" but "AMD64", do not use "FOO BAR" but
92 "FOO_BAR".
93
94
95   -C **CONFIGURATION_FILE**::
96
97 The specified file is used as configuration file for grml-live. By default
98 /etc/grml/grml-live.conf is used as default configuration. If a file named
99 /etc/grml/grml-live.local exists it is used as well (sourced after reading
100 /etc/grml/grml-live.conf meant as main file for local configuration). As a last
101 option the specified configuration file is sourced so it is possible to override
102 settings of /etc/grml/grml-live.conf as well as of /etc/grml/grml-live.local.
103 Please notice that all configuration files have to be adjusted during execution
104 of grml-live, so please make sure you use /etc/grml/grml-live.conf as a base for
105 your own configuration file (usually /etc/grml/grml-live.local). Please also
106 notice that the configuration file specified via this option is **not** (yet)
107 supported inside the scripts/hooks/classes at /etc/grml/fai/config. Instead use
108 /etc/grml/grml-live.local for configuration stuff used inside
109 /etc/grml/fai/config.
110
111   -d **DATE**::
112
113 Use specified date as build date information on the ISO instead of the default.
114 The default is the date when grml-live is being executed (retrieved via
115 executing 'date +%Y-%m-%d'). The information is stored inside the file
116 /GRML/grml-version on the ISO, /etc/grml_version in the squashfs file and in all
117 the bootsplash related files. This option is useful if you want to provide an
118 ISO with release information for a specific date but have to build it in
119 advance. Usage example: '-d 2009-10-30'
120
121   -F::
122
123 Force execution and do not prompt for acknowledgment of configuration.
124
125   -g **GRML_NAME**::
126
127 Set the grml flavour name. Common usage examples: grml, grml-small, grml64.
128 Please do NOT use blanks and any special characters like '/', ';' inside
129 GRML_NAME, otherwise you might notice problems while booting.
130
131   -h::
132
133 Display short usage information and exit.
134
135   -i **ISO_NAME**::
136
137 Specify name of ISO which will be available inside $OUTPUT_DIRECTORY/grml_isos
138 by default.
139
140   -I **CHROOT_INSTALL**::
141
142 Specify name of source directory which provides files that should become part of
143 the chroot/ISO. Not enabled by default. Note: the files are installed under '/'
144 in the chroot so you have to create the rootfs structure on your own.
145
146   -n::
147
148 Skip creation of the ISO file. This option is useful if you want to build/update
149 the chroot and/or recreate the squashfs file without building an ISO file.
150
151   -o **OUTPUT_DIRECTORY**::
152
153 Main output directory of the build process of FAI.  Some directories are created
154 inside this target directory, being: grml_cd (where the files for creating the
155 ISO are located, including the compressed squashfs file), grml_chroot (the
156 chroot system) and grml_isos (where the resulting ISO is stored).
157
158   -q::
159
160 Build the ISO without (re-)creating the squashfs compressed file using mksquashfs.
161 This option is useful if you just want to update parts outside the chroot in the ISO.
162 Consider combining this option with the build-only option '-b'.
163
164   -r **RELEASENAME**::
165
166 Specify name of the release.
167
168   -s **SUITE**::
169
170 Specify the Debian suite you want to use for your live-system.  Defaults to
171 "lenny" (being current Debian/stable). Supported values are: etch, lenny, sid.
172 Debian "squeeze" (current Debian/testing) requires base.tgz
173 (/etc/grml/fai/config/basefiles/....tar.gz) or a recent version of debootstrap.
174
175   -t **TEMPLATE_DIRECTORY**::
176
177 Specify place of the templates used for building the ISO. By default
178 (and if not manually specified) this is /usr/share/grml-live/templates/.
179
180   -u::
181
182 Update existing chroot instead of rebuilding it from scratch. This option is
183 based on the softupdate feature of FAI.
184
185   -v **VERSION_NUMBER**::
186
187 Specify version number of the release.
188
189   -V::
190
191 Increase verbosity in the build process.
192
193   -z::
194
195 Use ZLIB instead of LZMA compression in mksquashfs part of the build process.
196
197 [[usage-examples]]
198 Usage examples
199 --------------
200
201 To get a small, Debian-stable and grml-based Live-CD using /grml/grml-live
202 as build and output directory just run:
203
204   # grml-live
205
206 To get a small Debian-unstable and grml-small based Live-CD using
207 /home/mika/grml-live as build and output directory just use:
208
209   # grml-live -s sid -c GRMLBASE,GRML_SMALL,I386 -o /home/mika/grml-live
210
211 To get a medium sized, Debian-unstable and grml-based Live-CD for i386
212 architecture using /grml/grml-live as build and output directory just run:
213
214   # grml-live -s sid -a i386 -c GRMLBASE,GRML_MEDIUM,I386
215
216 To get a small, Debian-unstable and grml-based Live-CD using /tmp as build and
217 output directory and use grml_0.0-3.iso as ISO name (placed inside
218 /tmp/grml_isos) just invoke:
219
220   # grml-live -o /tmp -c GRMLBASE,GRML_SMALL,I386 -s sid -i grml_0.0-3.iso
221
222 [NOTE]
223
224 If you have about 700MB of free space inside /dev/shm (being a tmpfs, usually
225 you should have >=1GB of RAM) just run "mount -o remount,suid,dev,rw /dev/shm"
226 and use /dev/shm as build and output directory - resulting in very fast build
227 process.  But please be aware of the fact that rebooting your system will result
228 in an empty /dev/shm, so please use another directory for $CHROOT_OUTPUT,
229 $BUILD_OUTPUT and $ISO_OUTPUT if you plan to create more persistent output. :)
230
231 [[main-features]]
232 Main features of grml-live
233 --------------------------
234
235 * create a grml-/Debian-based Linux Live-CD with one single command
236
237 * class based concept, providing a maximum of flexibility
238
239 * supports integration of own hooks, scripts and configuration
240
241 * supports use and integration of own Software and/or Kernels via simple use of
242 Debian repositories
243
244 * native support of FAI features
245
246 * multi-arch support (work in progress)
247
248 [[class-concept]]
249 The class concept
250 -----------------
251
252 grml-live uses FAI and its class based concept for adjusting configuration and
253 setup according to your needs. This gives you flexibility and strength without
254 losing the simplicity in the build process.
255
256 The main and base class provided by grml-live is named GRMLBASE. It's strongly
257 recommended to **always** use the class GRMLBASE when building an ISO using
258 grml-live, as well as the architecture dependent class which provides the kernel
259 (being 'I386' for x86_32 and 'AMD64' for x86_64) and a GRML_* class (like
260 GRML_SMALL, GRML_MEDIUM or GRML_FULL). The following files and directories are
261 relevant for class GRMLBASE by default:
262
263   /etc/grml/fai/config/scripts/GRMLBASE/
264   /etc/grml/fai/config/debconf/GRMLBASE
265   /etc/grml/fai/config/class/GRMLBASE.var
266   /etc/grml/fai/config/hooks/instsoft.GRMLBASE
267   /etc/grml/fai/config/package_config/GRMLBASE
268
269 Take a look at the next section for information about the concept of those
270 files/directories.
271
272 If you want to use your own configuration, extend an existing configuration
273 and/or add additional packages to your ISO just invent a new class (or extend an
274 existing one). For example if you want to use your own class named "FOOBAR" just
275 set CLASSES="GRMLBASE,GRML_SMALL,I386" inside /etc/grml/grml-live.local or
276 invoke grml-live using the classes option: "grml-live -c
277 GRMLBASE,GRML_SMALL,I386,FOOBAR ...".
278
279 More details regarding the class concept can be found in the documentation of
280 FAI itself (being available at /usr/share/doc/fai-doc/).
281
282 [[X7]]
283 [[classes]]
284 Available classes
285 -----------------
286
287 The package selection part of the classes can be found in
288 /etc/grml/fai/config/package_config whereas some further classes are defined for
289 example in /etc/grml/fai/config/scripts/ so specific feature sets can be
290 selected. The following classes are predefined:
291
292 * DEBORPHAN: get rid of all packages listed in output of Deborphan
293
294 * GRMLBASE: the main class responsible for getting a minimal subset of what's
295 defining a grml system. Important parts of the buildprocess are specified in
296 this class as well, so unless you have a really good reason you should always
297 use this class.
298
299 * GRML_FULL: full featured grml, also known as the "normal", full grml.
300
301 * GRML_MEDIUM: medium sized grml version, known as grml-medium
302
303 * GRML_POWERPC: grml for PowerPC architecture, not supported yet (still work in
304 progress)
305
306 * GRML_SMALL: minimum sized grml version, known as grml-small
307
308 * LATEX: LaTeX(-related) packages like auctex, texlive,...
309 (which used to be shipped by grml before the LaTeX removal)
310
311 * LATEX_CLEANUP: get rid of several very large LaTeX directories
312 (like some /usr/share/doc/texlive-*, /usr/share/doc/texmf,...)
313
314 * LOCALES: use full featured locales setup (see /etc/locale.gen.grml). This
315 avoids to get rid of /usr/share/locale - which happens by default otherwise - as
316 well.
317
318 * NO_ONLINE: do not run scripts during the chroot build process which require a
319 network connection
320
321 * RELEASE: run some specific scripts and commands to provide the workflow for an
322 official grml release
323
324 * REMOVE_DOCS: get rid of documentation directories (like /usr/share/doc,
325 /usr/share/man/, /usr/share/info,...)
326
327 * XORG: providing important packages for use with a base grml-featured X.org
328 setup
329
330 [[files]]
331 Files
332 -----
333
334 Notice that grml-live ships FAI configuration files that do not use the same
335 namespace as the FAI packages itself. This ensures that grml-live does not clash
336 with your usual FAI configuration, so instead of /etc/fai/fai.conf (package
337 fai-client) grml uses /etc/grml/fai/fai.conf instead. For more details see
338 below. To get an idea how another configuration or example files could look like
339 check out /usr/share/doc/fai-doc/examples/simple/ (provided by Debian package
340 fai-doc). Furthermore /usr/share/doc/fai-doc/fai-guide.html/ch-config.html
341 provides documentation regarding configuration possibilities.
342
343   /usr/sbin/grml-live
344
345 Script for the main build process. Requires root permissions for execution.
346
347   /etc/grml/grml-live.conf
348
349 Main configuration file for grml-live which should be considered as a reference
350 configuration file only. Please use /etc/grml/grml-live.local for local
351 configuration instead.
352
353   /etc/grml/grml-live.local
354
355 All the local configuration should go to this file. This file overrides any
356 defaults of grml-live. Configurations via /etc/grml/grml-live.local are preferred
357 over the ones from /etc/grml/grml-live.conf. If you want to override settings
358 from /etc/grml/grml-live.local as well you have to specify them on the grml-live
359 commandline.
360
361   /etc/grml/fai/fai.conf
362
363 Main configuration file for FAI which specifies where all the configuration
364 files and scripts for FAI/grml-live can be found. By default the configuration
365 variables are FAI_CONFIG_SRC=file:///etc/grml/fai/config and
366 FAI_CONFIGDIR=/etc/grml/fai/config - both pointing to a directory shipped by
367 grml-live out-of-the-box so you shouldn't have to configure anything in this
368 file.
369
370   /etc/grml/fai/make-fai-nfsroot.conf
371
372 This file is used by make-fai-nfsroot(8) only. Usually you don't have to change
373 anything inside this file. If you want to modify NFSROOT though you can adjust
374 it there.
375
376   /etc/grml/fai/NFSROOT
377
378 This file specifies the package list for creating the NFSROOT.
379
380   /etc/grml/fai/apt/sources.list
381
382 This file specifies which mirrors should be considered for retrieving the Debian
383 packages when creating the main chroot (including all the software you would
384 like to see included). Important: this file should *not* be adjusted manually!
385 Instead use the GRML_LIVE_SOURCES variable inside /etc/grml/grml-live.conf or
386 /etc/grml/grml-live.local which modifies /etc/grml/fai/apt/sources.list
387 on-the-fly via grml-live then. If you want to generally adjust apt configuration
388 use FAI's fcopy command with /etc/grml/fai/config/files instead.
389
390   /etc/grml/fai/config/
391
392 The main directory for configuration of FAI/grml-live. More details below.
393
394   /etc/grml/fai/config/class/
395
396 This directory contains files which specify main configuration variables for the
397 FAI classes.
398
399   /etc/grml/fai/config/debconf/
400
401 This directory provides the files for preseeding/configuration of debconf
402 through files.
403
404   /etc/grml/fai/config/hooks/
405
406 This directory provides files for customising the build process through hooks.
407 Hooks are user defined programs or scripts, which are called during the
408 installation process.
409
410   /etc/grml/fai/config/package_config/
411
412 Directory with lists of software packages to be installed or removed.  The
413 different classes describe what should find its way to your ISO.  When running
414 "grml-live -c GRMLBASE,GRML_SMALL,I386 ..." only the configuration of GRMLBASE,
415 GRML_SMALL and and I386 will be taken. If you use 'grml-live -c
416 GRMLBASE,GRML_SMALL,I386,FOOBAR ...' then the files of GRMLBASE, GRML_SMALL,
417 I386 **plus** the files from FOOBAR will be taken. So just create a new class to
418 adjust the package selection according to your needs.  Please notice that the
419 directory GRMLBASE contains a package list defining a minimum but still
420 reasonable package configuration.
421
422   /etc/grml/fai/config/scripts/
423
424 Scripts for customising the ISO within the build process.
425
426   /etc/grml/fai/live-initramfs/
427
428 This directory provides the files used for building the initramfs/initrd via
429 live-initramfs(8).
430
431 [[log-files]]
432 Available log files
433 -------------------
434
435 grml-live itself logs to /var/log/grml-live.log. Unless you set PRESERVE_LOGFILE
436 in your grml-live configuration the file is cleared on each new invocation of
437 grml-live.
438
439 The FAI part of grml-live logs to /var/log/fai/$HOSTNAME/ - so the
440 default being /var/log/fai/grml/.
441
442 If you are using the grml-live buildd you will find the logs of the grml-live
443 run at /var/log/grml-buildd.stdout and /var/log/grml-buildd.stderr.
444
445 If you want to store build information in a database just install the
446 grml-live-db Debian package. Further details available in the grml-live-db
447 manpage.
448
449 [[requirements]]
450 Requirements for the build system
451 ---------------------------------
452
453 * any Debian based system should be sufficient (if it doesn't work it's a bug,
454 please send us a bug report then) [a usual
455 link:http://grml.org/grml2hd/[grml2hd] harddisk installation (using grml or
456 grml-medium) ships all you need]. Check out <<deploy-on-debian,How do I deploy
457 grml-live on a plain Debian installation>> for details how to set up grml-live
458 on a plain, original Debian system.
459
460 * enough free disk space; at least 800MB are required for a minimal grml-live
461 run (\~400MB for the chroot [$CHROOT_OUTPUT], \~150MB for the build target
462 [$BUILD_OUTPUT] and \~150MB for the resulting ISO [$ISO_OUTPUT] plus some
463 temporary files), if you plan to use GRML_FULL you should have at least 4GB of
464 total free disk space
465
466 * fast network access for retrieving the Debian packages used for creating the
467 chroot (check out "local mirror" and "NFSROOT" to workaround this problem as far
468 as possible)
469
470 For further information see next section.
471
472 [[X8]]
473 [[current_state]]
474 Current state of grml-live with squashfs-tools and kernel
475 ---------------------------------------------------------
476
477 To make it easier to track problems this section documents current state of
478 grml-live playing together with squashfs-tools / squashfs-lzma-tools (for
479 building the compressed file) and the kernel version. Documentation of this
480 section is up2date by 7rd of september 2009, please report any bugs you
481 encounter.
482
483 Difference between squashfs-lzma-tools and squashfs-tools
484 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
485
486 Whereas the ZLIB compression is much faster in the build process, the LZMA
487 compression provides a smaller resulting ISO. If you're wondering: the official
488 Grml builds use the LZMA compression.
489
490 Squashfs-tools was introduced in Debian and once provided support for LZMA
491 compression. Sadly LZMA compression within squashfs-tools became unsupported and
492 therefore squashfs-lzma-tools had to be introduced by the Grml team. Different
493 kernel versions provide different squashfs file formats (version 3.x for kernel
494 versions until 2.6.28-grml[64], since kernel 2.6.31-grml[64] it's the 4.x
495 format).
496
497 If you're wondering which package supports what, here's a short overview:
498
499 * squashfs-tools 1:4.0-1: ZLIB as default, no LZMA support/options, file format
500 version 4
501
502 * squashfs-tools 1:3.3-7: ZLIB as default, no LZMA support/options, file format
503 version 3
504
505 * squashfs-tools 1:3.2r2-9exp1: LZMA as default, ZLIB support via -nolzma
506 option, file format version 3
507
508 * squashfs-lzma-tools 4.0-2: ZLIB as default, LZMA support via -lzma option,
509 file format version 4
510
511 * squashfs-lzma-tools 3.3-1: LZMA as default, ZLIB support via -nolzma option,
512 file format version 3
513
514 Depending on the kernel version you want to use you need different versions
515 squashfs-tools/squashfs-lzma-tools. Yes, that's pretty a mess (don't ask how
516 much this sucks for us developers) - though this is supposed to calm down with
517 the recent integration of squashfs file format 4 in the mainline kernel. Support
518 for LZMA is pending and should dramatically simplify the situation for
519 developers as well as users as soon as it's available mainline.
520
521 Using squashfs-lzma-tools 4.0-2 on the build system
522 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
523
524 squashfs-lzma-tools 4.0-2 is available via the grml repositories. It provides
525 the mksquashfs-lzma and unsquashfs-lzma binaries. The package does NOT conflict
526 with Debian's squashfs-tools package (you can install both of them at the same
527 time).
528
529 The packages can be downloaded from
530 link:http://deb.grml.org/pool/main/s/squashfs-lzma-tools/[http://deb.grml.org/pool/main/s/squashfs-lzma-tools/]
531
532 It provides support for the new squashfs file format version 4 and therefore
533 requires kernel versions newer than 2.6.28-grml[64]. It supports LZMA as well as
534 ZLIB compression. Just use the defaults for enabling LZMA or use grml-live's
535 '-z' option if you want to use ZLIB instead.
536
537 * Kernel 2.6.23-grml[64]: does not work
538 * Kernel 2.6.26-grml[64]: does not work
539 * Kernel 2.6.28-grml[64]: does not work
540 * Kernel 2.6.31-grml[64]: works
541 * Kernel 2.6.33-grml[64]: works
542
543 [NOTE]
544
545 Please use squashfs-lzma-tools >=4.0-2 from Grml if you want to remaster any
546 grml release being MORE RECENT than 2009.05.
547
548 Using squashfs-tools 1:4.0-X on the build system
549 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
550
551 squashfs-tools >=1:4.0-1 is available in Debian/unstable and Debian/testing. It
552 provides the mksquashfs and unsquashfs binaries. The package does NOT
553 conflict with the squashfs-lzma-tools 4.0-2 package (you can install both of
554 them at the same time).
555
556 The packages can be downloaded from
557 link:ftp://ftp.de.debian.org/debian/pool/main/s/squashfs-tools/[ftp://ftp.de.debian.org/debian/pool/main/s/squashfs-tools/]
558
559 It provides support for the new squashfs file format version 4 and therefore
560 requires kernel versions newer than 2.6.28-grml[64].
561
562 It does NOT support LZMA compression. If you need LZMA support please use
563 Grml's squashfs-lzma-tools (see section above) instead.
564
565 * Kernel 2.6.23-grml[64]: does not work
566 * Kernel 2.6.26-grml[64]: does not work
567 * Kernel 2.6.28-grml[64]: does not work
568 * Kernel 2.6.31-grml[64]: works
569 * Kernel 2.6.33-grml[64]: works
570
571 [NOTE]
572 Please use squashfs-tools >=1:4.0-1 only if you want to remaster grml releases
573 MORE RECENT than 2009.05 using the ZLIB compression.
574
575 Using squashfs-lzma-tools 3.3-1 on the build system
576 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
577
578 squashfs-lzma-tools 3.3-1 from the grml repository supports kernel
579 2.6.26-grml[64] and 2.6.28-grml[64] using both LZMA and ZLIB (-nolzma)
580 compression. It's the recommended package for building ISOs with grml-live
581 currently!
582
583 The packages can be downloaded from
584 link:http://deb.grml.org/pool/main/s/squashfs-lzma/[http://deb.grml.org/pool/main/s/squashfs-lzma/].
585
586 [NOTE]
587 Please use squashfs-lzma-tools 3.3-1 if you want to remaster grml release
588 2008.11 or 2009.05.
589
590 Using squashfs-tools 1:3.3-7 on the build system
591 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
592
593 squashfs-tools 1:3.3-7 is available through
594 http://grml.org/squashfs/squashfs-tools_3.3-7_i386.deb (for x86) or
595 http://grml.org/squashfs/squashfs-tools_3.3-7_amd64.deb (for amd64) [both build
596 on and for Debian/etch but working with testing and unstable as well].
597
598 Please notice that squashfs-tools 1:3.3-7 does NOT support LZMA compression at
599 all (so you won't be able to remaster release 2008.11 and 2009.05 using LZMA for
600 example). The -nolzma option of mksquashfs is not available therefore (even
601 though grml-live will deactivate it for you automatically anyway). Please use
602 squashfs-lzma-tools instead.
603
604 * Kernel 2.6.23-grml: does NOT work, please use squashfs-tools 1:3.2r2-9exp1
605                       instead if you still want to use kernel 2.6.23 (not
606                       recommended)
607 * Kernel 2.6.26-grml: works (without LZMA compression only of course!)
608 * Kernel 2.6.28-grml: works (without LZMA compression only of course!)
609
610 Using squashfs-tools 1:3.2r2-9exp1 on the build system
611 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
612
613 squashfs-tools 1:3.2r2-9exp1 is available via the grml-testing repository,
614 running:
615
616   # aptitude install squashfs-tools=1:3.2r2-9exp1
617
618 or directly via downloading the files
619 http://grml.org/squashfs/squashfs-tools_3.2r2-9exp1_i386.deb (for x86) or
620 http://grml.org/squashfs/squashfs-tools_3.2r2-9exp1_amd64.deb (for amd64).
621
622 Using with ZLIB compression (SQUASHFS_OPTIONS='-nolzma' or -z
623 option in grml-live cmdline):
624
625 * Kernel 2.6.23-grml: works
626 * Kernel 2.6.26-grml: works
627 * Kernel 2.6.28-grml: supposed to work (not verified though)
628
629 Using with LZMA compression:
630
631 * Kernel 2.6.23-grml: works
632 * Kernel 2.6.26-grml: does NOT work, please use ZLIB mode instead or switch
633   to Debian package squashfs-lzma-tools 3.3-1 (see section above).
634 * Kernel 2.6.28-grml: does NOT work, please use ZLIB mode instead or switch
635   to Debian package squashfs-lzma-tools 3.3-1 (see section above).
636
637 [[faq]]
638 FAQ
639 ---
640
641 [[deploy-on-debian]]
642 How do I deploy grml-live on a plain Debian installation?
643 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
644
645 The easiest way to get a running grml-live setup is to install grml or
646 grml-medium using grml2hd (for example inside KVM, Virtualbox, VMware,... if you
647 don't want to run it on a physical system). Of course using grml-live on a
648 plain, original Debian installation is supported as well. So there we go.
649
650 What we have: plain, original Debian Lenny (5.0).
651
652 What we want: build a grml-medium ISO based on Debian/squeeze for the i386
653 architecture using grml-live.
654
655 [IMPORTANT]
656
657 If you encounter any problems while booting the resulting ISO please be aware of
658 <<current_state,the 'current state of grml-live with squashfs-tools and kernel'
659 section>>.
660
661 Instructions
662 ^^^^^^^^^^^^
663
664   # adjust sources.list:
665   cat >> /etc/apt/sources.list << EOF
666
667   # grml stable repository:
668     deb     http://deb.grml.org/ grml-stable  main
669   # deb-src http://deb.grml.org/ grml-stable  main
670
671   # grml testing/development repository:
672     deb     http://deb.grml.org/ grml-testing main
673   # deb-src http://deb.grml.org/ grml-testing main
674   EOF
675
676   # adjust apt-pinning (only prefer squashfs stuff from grml):
677   cat >> /etc/apt/preferences << EOF
678   Package: *
679   Pin: origin deb.grml.org
680   Pin-Priority: 1
681
682   Package: squashfs-tools
683   Pin: origin deb.grml.org
684   Pin-Priority: 996
685
686   Package: squashfs-lzma-tools
687   Pin: origin deb.grml.org
688   Pin-Priority: 996
689   EOF
690
691   # get keyring for apt:
692   apt-get update
693   apt-get --allow-unauthenticated install grml-debian-keyring
694
695   # install basefile so we don't have to build basic chroot from scratch:
696   mkdir -p /etc/grml/fai/config/basefiles/
697   mv base.tgz /etc/grml/fai/config/basefiles/I386.tar.gz
698
699   # install relevant tools
700   # please check out http://grml.org/grml-live/#current_state when encountering problems!
701   apt-get -o APT::Install-Recommends=false install grml-live squashfs-tools squashfs-lzma-tools
702
703   # adjust grml-live configuration for our needs:
704   cat > /etc/grml/grml-live.local << EOF
705   # consider using LZMA only for space reasons (resulting in longer
706   # build time but smaller ISO):
707   SQUASHFS_OPTIONS="-nolzma"
708   # install local files into the chroot
709   CHROOT_INSTALL="/etc/grml/fai/chroot_install"
710   ## adjust if necessary (defaults to /grml/grml-live):
711   ## OUTPUT="/srv/grml-live"
712   FAI_DEBOOTSTRAP="squeeze http://cdn.debian.net/debian/"
713   ARCH="i386"
714   CLASSES="GRMLBASE,GRML_MEDIUM,I386"
715   # PRESERVE_LOGFILE='1'
716   # ZERO_FAI_LOGFILE='1'
717   GRML_LIVE_SOURCES="
718   deb http://deb.grml.org/            grml-stable  main
719   deb http://deb.grml.org/            grml-testing main
720   deb http://cdn.debian.net/debian squeeze main contrib non-free
721   "
722   EOF
723
724   # just optional(!) - upgrade FAI to latest available version:
725   cat >> /etc/apt/sources.list << EOF
726   # fai:
727     deb http://www.informatik.uni-koeln.de/fai/download lenny koeln
728   EOF
729
730   # get gpg key of FAI repos and install current FAI version:
731   gpg -a --recv-keys AB9B66FD; gpg -a --export AB9B66FD | apt-key add -
732   apt-get update
733   apt-get install fai-client fai-server fai-doc
734
735 That's it. Now invoking 'grml-live -V' should build the ISO.  If everything
736 worked as expected the last line of the shell output should look like:
737
738   [*] Successfully finished execution of grml-live [running 687 seconds]
739
740 and the ISO can be found inside /grml-live/grml-live/grml_isos/ then.
741
742 [[fai-on-etch]]
743 Help, I'm using Debian etch and I don't have FAI version >3.2
744 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
745
746   wget http://www.informatik.uni-koeln.de/fai/download/etch/fai-client_3.2.8_all.deb \
747        http://www.informatik.uni-koeln.de/fai/download/etch/fai-server_3.2.8_all.deb \
748        http://www.informatik.uni-koeln.de/fai/download/etch/fai-doc_3.2.8_all.deb
749   dpkg -i fai-client_3.2.8_all.deb fai-server_3.2.8_all.deb fai-doc_3.2.8_all.deb
750
751 or check out the link:http://www.informatik.uni-koeln.de/fai/[FAI-homepage] for
752 further details.
753
754 [[how-to-debug]]
755 I've problems with the build process. How to start debugging?
756 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
757
758 Check out the logs inside /var/log/fai/... If you think it's a bug in grml-live
759 send a copy of your config, logs and the commandline with a short problem
760 description to <mika@grml.org>:
761
762   # history | grep grml-live > /etc/grml/grml_live.cmdline
763   # tar zcf grml_live_problem.tar.gz /etc/grml/grml-live.conf \
764             /etc/grml/grml_live.cmdline /etc/grml/grml-buildd.conf \
765             /var/log/fai /etc/grml/fai
766   -> finally mail grml_live_problem.tar.gz to <mika@grml.org>
767
768 If you need help with grml-live or would like to see new features as part of
769 grml-live you can get commercial support via
770 link:http://grml-solutions.com/[Grml Solutions].
771
772 [[lzma-vs-zlib]]
773 How much is the difference between LZMA and ZLIB compression?
774 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
775
776 ISO size (bs = blocksize):
777
778 [width="45%",cols="3,^2,^2"]
779 |============================================================
780 |ISO                   |LZMA (256kB bs) |ZLIB
781 |grml_sid              |666M | 771M
782 |grml_squeeze          |659M | 761M
783 |grml_lenny            |624M | 723M
784 |grml64_sid            |677M | 791M
785 |grml64_squeeze        |671M | 785M
786 |grml64_lenny          |639M | 745M
787 |grml-medium_sid       |208M | 236M
788 |grml-medium_squeeze   |206M | 234M
789 |grml-medium_lenny     |193M | 220M
790 |grml64-medium_sid     |213M | 245M
791 |grml64-medium_squeeze |213M | 244M
792 |grml64-medium_lenny   |201M | 231M
793 |grml-small_sid        |102M | 118M
794 |grml-small_squeeze    |101M | 117M
795 |grml-small_lenny      |97M  | 112M
796 |grml64-small_sid      |103M | 120M
797 |grml64-small_squeeze  |103M | 120M
798 |grml64-small_lenny    |99M  | 116M
799 |============================================================
800
801 Build time of grml-medium's squashfs file (depends on your system, though just
802 to get the ratio between the different options):
803
804 * 10 minutes and 4 seconds with LZMA default blocksize (128k)
805 * 7 minutes 27 seconds with LZMA and blocksize 256k
806 * 6 minutes and 8 seconds with LZMA blocksize 512k
807 * 1 minute and 40 seconds with ZLIB
808
809 [[install-local-files]]
810 How to I install further files into the chroot/ISO?
811 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
812
813 Just point the configuration variable CHROOT_INSTALL to the directory which
814 provides the files you would like to install. Note that the files are installed
815 under '/' in the chroot - so you have to create the rootfs structure on your
816 own. Usage example:
817
818   echo "CHROOT_INSTALL=\$GRML_FAI_CONFIG/chroot_install" >> /etc/grml/grml-live.local
819   mkdir -p /etc/grml/fai/chroot_install/usr/src/
820   wget example.org/foo.tar.gz
821   mv foo.tar.gz /etc/grml/fai/chroot_install/usr/src/
822   grml-live ...
823
824 [[local-debian-mirror]]
825 Can I use my own (local) Debian mirror?
826 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
827
828 Sure. Just adjust the variables GRML_LIVE_SOURCES and FAI_DEBOOTSTRAP (if not
829 already using NFSROOT's base.tgz) inside /etc/grml/grml-live.conf according to
830 your needs. Please don't forget that you should use the grml servers as well
831 (see default configuration) so all the grml packages can be downloaded as well.
832
833 If you want to use a local (for example NFS mount) mirror additionally, just
834 adjust MIRROR_DIRECTORY and MIRROR_SOURCES inside /etc/grml/grml-live.conf as
835 well.
836
837 Unless you specify GRML_LIVE_SOURCES and/or FAI_DEBOOTSTRAP the default from
838 /etc/grml/fai/apt/sources.list and /etc/grml/fai/make-fai-nfsroot.conf will be
839 taken. If you customise the variables in /etc/grml/grml-live.conf then the two
840 files will be adjusted during runtime automatically.
841
842 If MIRROR_DIRECTORY and MIRROR_SOURCES are specified the local mirror will be
843 taken as first entry in the generated sources.list so it's preferred over
844 non-local mirrors. Using a fallback mirror (via providing several mirrors in
845 GRML_LIVE_SOURCES as used by default) is a recommended setting.
846
847 [[add-additional-debian-packages]]
848 How do I add additional Debian package(s) to my CD/ISO?
849 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
850
851 Just create a new class (using the package_config directory):
852
853   # cat > /etc/grml/fai/config/package_config/MIKA << EOF
854   PACKAGES aptitude
855
856   vim
857   another_name_of_a_debian_package
858   and_another_one
859   EOF
860
861 and specify it when invoking grml-live then:
862
863   # grml-live -c GRMLBASE,GRML_SMALL,I386,MIKA
864
865 [[reset-grml-live-configuration]]
866 I fscked up my grml-live configuration. How do I reset it to the defaults?
867 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
868
869 Notice: this deletes all your grml-live configuration files. If that's really
870 what you are searching for just run:
871
872   rm -rf /etc/grml/fai /etc/grml/grml-live.conf
873   dpkg -i --force-confnew --force-confmiss /path/to/grml-live_..._all.deb
874
875 [NOTE]
876
877 If you don't control your /etc using a version control system (VCS) yet it's a
878 good chance to start using it now. Check out
879 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/]
880 for more details how to maintain /etc using the mercurial VCS.
881
882 [[create-a-base-tgz]]
883 How do I create a base.tgz for use as NFSROOT?
884 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
885
886 First of all build the chroot system:
887
888   mkdir /tmp/nfsroot && cd /tmp/nfsroot
889   debootstrap lenny /tmp/nfsroot/ http://cdn.debian.net/debian
890   tar zcf base.tgz ./
891
892 Then check out where your NFSROOT is located:
893
894   # grep '^NFSROOT' /etc/grml/fai/make-fai-nfsroot.conf
895   NFSROOT=/grml/fai/nfsroot
896
897 So as /grml/fai/nfsroot is your NFSROOT place the file under
898 /grml/fai/nfsroot/live/filesystem.dir/var/tmp/:
899
900   mv base.tgz /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz
901
902 or even better use /etc/grml/fai/config/basefiles/$CLASSNAME.tar.gz instead.
903 Use I386 as $CLASSNAME for i386 builds and AMD64 for amd64 builds.
904
905 Now running "grml-live ..." will use this file as main system instead of
906 executing debootstrap. Check out the output for the following lines if using
907 NFSROOT:
908
909   [...]
910   Calling task_extrbase
911   Unpacking Debian base archive
912   Extracting /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz
913   Calling task_mirror
914   [...]
915
916 or if using /etc/grml/fai/config/basefiles/$CLASSNAME.tar.gz for:
917
918   [...]
919   ftar: extracting /etc/grml/fai/config/basefiles///AMD64.tar.gz to
920   /grml-live/grml-live_20071029.22138/grml_chroot//
921   [...]
922
923 [[apt-cacher]]
924 Set up apt-cacher / apt-cacher-ng for use with grml-live
925 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
926
927 Make sure /etc/grml/grml-live.conf provides according GRML_LIVE_SOURCES and
928 FAI_DEBOOTSTRAP:
929
930   # cat /etc/grml/grml-live.conf
931   [...]
932   GRML_LIVE_SOURCES="
933   deb http://localhost:3142/deb.grml.org grml-stable  main
934   deb http://localhost:3142/deb.grml.org grml-testing main
935   deb http://localhost:3142/cdn.debian.net/debian lenny main contrib non-free
936   "
937   [...]
938   FAI_DEBOOTSTRAP="lenny http://localhost:3142/cdn.debian.net/debian lenny main contrib non-free"
939
940 Make sure apt-cacher / apt-cacher-ng is running ('/etc/init.d/apt-cacher
941 restart' or '/etc/init.d/apt-cacher-ng restart'). That's it.  All downloaded
942 files will be cached in /var/cache/apt-cacher/ or /var/cache/apt-cacher-ng then.
943
944 [[approx]]
945 Set up approx for use with grml-live
946 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
947
948 Make sure /etc/grml/grml-live.conf provides according GRML_LIVE_SOURCES and
949 FAI_DEBOOTSTRAP:
950
951   # cat /etc/grml/grml-live.conf
952   [...]
953   GRML_LIVE_SOURCES="
954   deb http://localhost:9999/grml            grml-stable  main
955   deb http://localhost:9999/grml            grml-testing main
956   deb http://localhost:9999/debian lenny    main contrib non-free
957   "
958   FAI_DEBOOTSTRAP="lenny http://localhost:9999/debian"
959
960 Configure approx:
961
962   # cat /etc/approx/approx.conf
963   [...]
964   debian http://ftp.at.debian.org/debian
965   grml   http://deb.grml.org/
966
967 Don't forget to restart approx (/etc/init.d/approx restart). That's it.
968 All downloaded files will be cached in /var/cache/approx now.
969
970 [[question]]
971 I've a question which isn't answered by this document
972 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
973
974 Don't hesitate to contact the author: <mika@grml.org>
975
976 [[download]]
977 Download / install grml-live as a Debian package
978 ------------------------------------------------
979
980 Debian packages are available through the grml-repository at
981 link:http://deb.grml.org/pool/main/g/grml-live/[deb.grml.org].  If you want to
982 build a Debian package on your own (using for example a specific version or the
983 current development tree), just execute:
984
985   git clone git://git.grml.org/grml-live
986   cd grml-live
987   debuild -us -uc
988
989 [[source]]
990 Source
991 ------
992
993 The source of grml-live is available at
994 link:http://git.grml.org/?p=grml-live.git[http://git.grml.org/?p=grml-live.git]
995
996 [[todo-list]]
997 TODO list
998 ---------
999
1000 Check out the link:http://git.grml.org/?p=grml-live.git;a=blob;f=TODO;hb=HEAD[TODO file].
1001
1002 [[bugs]]
1003 Bugs
1004 ----
1005
1006 Please report feedback, link:http://grml.org/bugs/[bugreports] and wishes
1007 link:http://grml.org/contact/[to the grml-team]!
1008
1009 [[authors]]
1010 Authors
1011 -------
1012 Michael Prokop <mika@grml.org>
1013
1014 /////////////////////////////////////
1015 // vim:ai tw=80 ft=asciidoc expandtab
1016 /////////////////////////////////////