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