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