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