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