7 grml-live - build framework based on FAI for generating a grml and Debian based
8 Linux Live system (CD/ISO)
13 grml-live [-a <architecture>] [-c <classe[s]>] [-C <configfile>] [-g
14 <grml_name>] [-i <iso_name> ] [-o <output_directory>] [-r <release_name>] [-s
15 <suite>] [-t <template_directory>] [-v <version_number>] [-U <username>] [
18 CAUTION: Please check out <<current_state,the 'Current state of grml-live with
19 squashfs-tools and kernel' section>> for details about current state of involved
20 tools before starting with grml-live or if you encounter any problems.
25 grml-live provides the build system for creating a grml and Debian based Linux
26 Live-CD. The build system is based on
27 link:http://fai-project.org/[FAI] (Fully Automatic
28 Installation). grml-live uses the "fai dirinstall" feature to generate a chroot
29 system based on the class concept of FAI (see later sections for further
30 details) and provides the framework to be able to generate a full-featured ISO.
31 It does not use all the FAI features by default though and you don't have to
32 know FAI to be able to use it.
34 The use of FAI gives you the flexibility to choose the packages you would like
35 to include on your very own Linux Live-CD without having to deal with all the
36 details of a build process.
38 CAUTION: grml-live does **not** use /etc/fai for configuration but instead
39 provides and uses ${GRML_FAI_CONFIG} which is pointing to /etc/grml/fai by default
40 (unless overriden using the ''-D'' option). This ensures that it does not clash
41 with default FAI configuration and packages, so you can use grml-live and FAI
42 completely independent at the same time!
46 Please notice that you should have a fast network connection as all the Debian
47 packages will be downloaded and installed via network. If you want to use a
48 local mirror (strongly recommended if you plan to use grml-live more than once)
49 checkout mkdebmirror (see /usr/share/doc/grml-live/examples/mkdebmirror),
50 debmirror(1), reprepro(1) (see /usr/share/doc/grml-live/examples/reprepro/ for a
51 sample configuration), apt-cacher(1) and approx(8). To avoid downloading the
52 base system again and again check out FAI's NFSROOT (see FAQ of this document
60 Clean up output directories before attempting the build. Packs the chroot
61 into a tar archive, and removes chroot and iso build directories before exiting.
65 Use the specified architecture instead of the currently running one. This
66 allows building a 32bit system on a 64bit host (though you can't build a 64bit
67 system on a 32bit system/kernel of course). Please notice that real
68 crosscompiling (like building a ppc system on x86) isn't possible due to the
69 nature and the need of working in a chroot. Currently supported values: i386
74 Build the ISO without updating the chroot via FAI. This option is useful for
75 example when working on stable releases: if you have a working base
76 system/chroot and do not want to execute any further updates (via "-u" option)
77 but intend to only build the ISO.
81 Build the ISO without touching the chroot at all. This option is useful if
82 you modified anything that FAI or grml-live might adjust via grml's FAI
83 scripts. It's like the '-b' option but even more advanced. Use only if you
84 really know that you do not want to update the chroot.
88 Specify the CLASSES to be used for building the ISO via FAI. By default only
89 the classes GRMLBASE, GRML_MEDIUM and I386 are assumed, resulting in a small base
90 system (being about ~180MB total ISO size). If using a non-I386 system (like
91 AMD64) you should specify the appropriate architecture as well. Additionally you
92 can specify a class providing a grml-kernel (see
93 <<classes,the 'CLASSES' section in this document>> for details about available classes).
94 So instead of GRML_MEDIUM you can also use GRML_SMALL and GRML_FULL.
97 All class names should be written in uppercase letters. Do not use a dash, use
98 an underscore. So do not use "amd64" but "AMD64", do not use "FOO BAR" but
102 -C **CONFIGURATION_FILE**::
104 The specified file is used as configuration file for grml-live. By default
105 /etc/grml/grml-live.conf is used as default configuration. If a file named
106 /etc/grml/grml-live.local exists it is used as well (sourced after reading
107 /etc/grml/grml-live.conf meant as main file for local configuration). As a last
108 option the specified configuration file is sourced so it is possible to override
109 settings of /etc/grml/grml-live.conf as well as of /etc/grml/grml-live.local.
110 Please notice that all configuration files have to be adjusted during execution
111 of grml-live, so please make sure you use /etc/grml/grml-live.conf as a base for
112 your own configuration file (usually /etc/grml/grml-live.local). Please also
113 notice that the configuration file specified via this option is **not** (yet)
114 supported inside the scripts/hooks/classes at ${GRML_FAI_CONFIG}/config. Instead use
115 /etc/grml/grml-live.local for configuration stuff used inside
116 ${GRML_FAI_CONFIG}/config.
120 Use specified date as build date information on the ISO instead of the default.
121 The default is the date when grml-live is being executed (retrieved via
122 executing 'date +%Y-%m-%d'). The information is stored inside the file
123 /GRML/grml-version on the ISO, /etc/grml_version in the squashfs file and in all
124 the bootsplash related files. This option is useful if you want to provide an
125 ISO with release information for a specific date but have to build it in
126 advance. Usage example: '-d 2009-10-30'
128 -D **CONFIGURATION_DIRECTORY**::
130 The specified directory is used as configuration directory for grml-live and its
131 FAI. By default /etc/grml/fai is used as default configuration directory. If
132 you want to have different configuration scripts, package definitions, etc. with
133 without messing with the global configuration under /etc/grml/fai provided by
134 grml-live this option provides you the option to use your own configuration
135 directory. This directory is what's being referred to as ${GRML_FAI_CONFIG}
136 throughout this documentation.
140 Force execution and do not prompt for acknowledgment of configuration.
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.
150 Display short usage information and exit.
154 Specify name of ISO which will be available inside $OUTPUT_DIRECTORY/grml_isos
157 -I **CHROOT_INSTALL**::
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.
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.
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.
180 -o **OUTPUT_DIRECTORY**::
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).
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'.
195 Specify name of the release.
199 Specify the Debian suite you want to use for your live-system. Defaults to
200 "squeeze" (being current Debian/stable). Supported values are: etch, lenny,
201 squeeze, sid. Debian "squeeze" requires a recent base.tgz
202 (${GRML_FAI_CONFIG}/config/basefiles/$CLASSNAME.tar.gz) or a recent version of
205 -t **TEMPLATE_DIRECTORY**::
207 Specify place of the templates used for building the ISO. By default
208 (and if not manually specified) this is /usr/share/grml-live/templates/.
212 Update existing chroot instead of rebuilding it from scratch. This option is
213 based on the softupdate feature of FAI.
217 Sets ownership of all build output files to specified username before exiting.
219 -v **VERSION_NUMBER**::
221 Specify version number of the release.
225 Increase verbosity in the build process.
229 Use ZLIB instead of LZMA/XZ compression in mksquashfs part of the build process.
235 To get a small, Debian-stable and grml-based Live-CD using /grml/grml-live
236 as build and output directory just run:
240 To get a small Debian-unstable and grml-small based Live-CD using
241 /home/mika/grml-live as build and output directory just use:
243 # grml-live -s sid -c GRMLBASE,GRML_SMALL,I386 -o /home/mika/grml-live
245 To get a medium sized, Debian-unstable and grml-based Live-CD for i386
246 architecture using /grml/grml-live as build and output directory just run:
248 # grml-live -s sid -a i386 -c GRMLBASE,GRML_MEDIUM,I386
250 To get a small, Debian-unstable and grml-based Live-CD using /tmp as build and
251 output directory and use grml_0.0-3.iso as ISO name (placed inside
252 /tmp/grml_isos) just invoke:
254 # grml-live -o /tmp -c GRMLBASE,GRML_SMALL,I386 -s sid -i grml_0.0-3.iso
258 If you have about 700MB of free space inside /dev/shm (being a tmpfs, usually
259 you should have >=1GB of RAM) just run "mount -o remount,suid,dev,rw /dev/shm"
260 and use /dev/shm as build and output directory - resulting in very fast build
261 process. But please be aware of the fact that rebooting your system will result
262 in an empty /dev/shm, so please use another directory for $CHROOT_OUTPUT,
263 $BUILD_OUTPUT and $ISO_OUTPUT if you plan to create more persistent output. :)
266 Main features of grml-live
267 --------------------------
269 * create a grml-/Debian-based Linux Live-CD with one single command
271 * class based concept, providing a maximum of flexibility
273 * supports integration of own hooks, scripts and configuration
275 * supports use and integration of own Software and/or Kernels via simple use of
278 * native support of FAI features
280 * multi-arch support (work in progress)
286 grml-live uses FAI and its class based concept for adjusting configuration and
287 setup according to your needs. This gives you flexibility and strength without
288 losing the simplicity in the build process.
290 The main and base class provided by grml-live is named GRMLBASE. It's strongly
291 recommended to **always** use the class GRMLBASE when building an ISO using
292 grml-live, as well as the architecture dependent class which provides the kernel
293 (being 'I386' for x86_32 and 'AMD64' for x86_64) and a GRML_* class (like
294 GRML_SMALL, GRML_MEDIUM or GRML_FULL). The following files and directories are
295 relevant for class GRMLBASE by default:
297 ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/
298 ${GRML_FAI_CONFIG}/config/debconf/GRMLBASE
299 ${GRML_FAI_CONFIG}/config/class/GRMLBASE.var
300 ${GRML_FAI_CONFIG}/config/hooks/instsoft.GRMLBASE
301 ${GRML_FAI_CONFIG}/config/package_config/GRMLBASE
303 Take a look at the next section for information about the concept of those
306 If you want to use your own configuration, extend an existing configuration
307 and/or add additional packages to your ISO just invent a new class (or extend an
308 existing one). For example if you want to use your own class named "FOOBAR" just
309 set CLASSES="GRMLBASE,GRML_SMALL,I386,FOOBAR" inside /etc/grml/grml-live.local
310 or invoke grml-live using the classes option: "grml-live -c
311 GRMLBASE,GRML_SMALL,I386,FOOBAR ...".
313 More details regarding the class concept can be found in the documentation of
314 FAI itself (being available at /usr/share/doc/fai-doc/).
321 The package selection part of the classes can be found in
322 ${GRML_FAI_CONFIG}/config/package_config whereas some further classes are defined for
323 example in ${GRML_FAI_CONFIG}/config/scripts/ so specific feature sets can be
324 selected. The following classes are predefined:
326 * DEBORPHAN: get rid of all packages listed in output of Deborphan
328 * GRMLBASE: the main class responsible for getting a minimal subset of what's
329 defining a grml system. Important parts of the buildprocess are specified in
330 this class as well, so unless you have a really good reason you should always
333 * GRML_FULL: full featured grml, also known as the "normal", full grml.
335 * GRML_MEDIUM: medium sized grml version, known as grml-medium
337 * GRML_POWERPC: grml for PowerPC architecture, not supported yet (still work in
340 * GRML_SMALL: minimum sized grml version, known as grml-small
342 * LATEX: LaTeX(-related) packages like auctex, texlive,...
343 (which used to be shipped by grml before the LaTeX removal)
345 * LATEX_CLEANUP: get rid of several very large LaTeX directories
346 (like some /usr/share/doc/texlive-*, /usr/share/doc/texmf,...)
348 * LOCALES: use full featured locales setup (see /etc/locale.gen.grml). This
349 avoids to get rid of /usr/share/locale - which happens by default otherwise - as
352 * NO_ONLINE: do not run scripts during the chroot build process which require a
355 * RELEASE: run some specific scripts and commands to provide the workflow for an
356 official grml release
358 * REMOVE_DOCS: get rid of documentation directories (like /usr/share/doc,
359 /usr/share/man/, /usr/share/info,...)
361 * XORG: providing important packages for use with a base grml-featured X.org
368 Notice that grml-live ships FAI configuration files that do not use the same
369 namespace as the FAI packages itself. This ensures that grml-live does not clash
370 with your usual FAI configuration, so instead of /etc/fai/fai.conf (package
371 fai-client) grml uses ${GRML_FAI_CONFIG}/fai.conf instead. For more details see
372 below. To get an idea how another configuration or example files could look like
373 check out /usr/share/doc/fai-doc/examples/simple/ (provided by Debian package
374 fai-doc). Furthermore /usr/share/doc/fai-doc/fai-guide.html/ch-config.html
375 provides documentation regarding configuration possibilities.
379 Script for the main build process. Requires root permissions for execution.
381 /etc/grml/grml-live.conf
383 Main configuration file for grml-live which should be considered as a reference
384 configuration file only. Please use /etc/grml/grml-live.local for local
385 configuration instead.
387 /etc/grml/grml-live.local
389 All the local configuration should go to this file. This file overrides any
390 defaults of grml-live. Configurations via /etc/grml/grml-live.local are preferred
391 over the ones from /etc/grml/grml-live.conf. If you want to override settings
392 from /etc/grml/grml-live.local as well you have to specify them on the grml-live
395 ${GRML_FAI_CONFIG}/fai.conf
397 Main configuration file for FAI which specifies where all the configuration
398 files and scripts for FAI/grml-live can be found. By default the configuration
399 variables are FAI_CONFIG_SRC=file:///etc/grml/fai/config and
400 GRML_FAI_CONFIG=/etc/grml/fai/config - both pointing to a directory shipped by
401 grml-live out-of-the-box so you shouldn't have to configure anything in this
404 ${GRML_FAI_CONFIG}/make-fai-nfsroot.conf
406 This file is used by make-fai-nfsroot(8) only. Usually you don't have to change
407 anything inside this file. If you want to modify NFSROOT though you can adjust
410 ${GRML_FAI_CONFIG}/NFSROOT
412 This file specifies the package list for creating the NFSROOT.
414 ${GRML_FAI_CONFIG}/apt/sources.list
416 This file specifies which mirrors should be considered for retrieving the Debian
417 packages when creating the main chroot (including all the software you would
418 like to see included). Important: this file should *not* be adjusted manually!
419 Instead use the GRML_LIVE_SOURCES variable inside /etc/grml/grml-live.conf or
420 /etc/grml/grml-live.local which modifies ${GRML_FAI_CONFIG}/apt/sources.list
421 on-the-fly via grml-live then. If you want to generally adjust apt configuration
422 use FAI's fcopy command with ${GRML_FAI_CONFIG}/config/files instead.
424 ${GRML_FAI_CONFIG}/config/
426 The main directory for configuration of FAI/grml-live. More details below.
428 ${GRML_FAI_CONFIG}/config/class/
430 This directory contains files which specify main configuration variables for the
433 ${GRML_FAI_CONFIG}/config/debconf/
435 This directory provides the files for preseeding/configuration of debconf
438 ${GRML_FAI_CONFIG}/config/hooks/
440 This directory provides files for customising the build process through hooks.
441 Hooks are user defined programs or scripts, which are called during the
442 installation process.
444 ${GRML_FAI_CONFIG}/config/package_config/
446 Directory with lists of software packages to be installed or removed. The
447 different classes describe what should find its way to your ISO. When running
448 "grml-live -c GRMLBASE,GRML_SMALL,I386 ..." only the configuration of GRMLBASE,
449 GRML_SMALL and and I386 will be taken. If you use 'grml-live -c
450 GRMLBASE,GRML_SMALL,I386,FOOBAR ...' then the files of GRMLBASE, GRML_SMALL,
451 I386 **plus** the files from FOOBAR will be taken. So just create a new class to
452 adjust the package selection according to your needs. Please notice that the
453 directory GRMLBASE contains a package list defining a minimum but still
454 reasonable package configuration.
456 ${GRML_FAI_CONFIG}/config/scripts/
458 Scripts for customising the ISO within the build process.
460 ${GRML_FAI_CONFIG}/live-initramfs/
462 This directory provides the files used for building the initramfs/initrd via
469 grml-live itself logs to /var/log/grml-live.log. Unless you set PRESERVE_LOGFILE
470 in your grml-live configuration the file is cleared on each new invocation of
473 The FAI part of grml-live logs to /var/log/fai/$HOSTNAME/ - so the
474 default being /var/log/fai/grml/.
476 If you are using the grml-live buildd you will find the logs of the grml-live
477 run at /var/log/grml-buildd.log.
479 If you want to store build information in a database just install the
480 grml-live-db Debian package. Further details available in the grml-live-db
484 Requirements for the build system
485 ---------------------------------
487 * any Debian based system should be sufficient (if it doesn't work it's a bug,
488 please send us a bug report then) [a usual
489 link:http://grml.org/grml2hd/[grml2hd] harddisk installation (using grml or
490 grml-medium) ships all you need]. Check out <<deploy-on-debian,How do I deploy
491 grml-live on a plain Debian installation>> for details how to set up grml-live
492 on a plain, original Debian system.
494 * enough free disk space; at least 800MB are required for a minimal grml-live
495 run (\~400MB for the chroot [$CHROOT_OUTPUT], \~150MB for the build target
496 [$BUILD_OUTPUT] and \~150MB for the resulting ISO [$ISO_OUTPUT] plus some
497 temporary files), if you plan to use GRML_FULL you should have at least 4GB of
498 total free disk space
500 * fast network access for retrieving the Debian packages used for creating the
501 chroot (check out "local mirror" and "NFSROOT" to workaround this problem as far
504 For further information see next section.
508 Current state of grml-live with squashfs-tools and kernel
509 ---------------------------------------------------------
511 Use squashfs-tools >=4.2-1 (available from Grml repositories as well as from
512 Debian/unstable) to build Grml (based) ISOs featuring kernel version
515 ////////////////////////////////////////////////////////////////////////////////
516 Difference between squashfs-lzma-tools, squashfs-lzma-tools4 and squashfs-tools
517 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
519 Whereas the ZLIB compression is much faster in the build process, the LZMA
520 compression provides a smaller resulting ISO. If you're wondering: the official
521 Grml builds use the LZMA compression.
523 Squashfs-tools was introduced in Debian and once provided support for LZMA
524 compression. Sadly LZMA compression within squashfs-tools became unsupported and
525 therefore squashfs-lzma-tools[4] had to be introduced and maintained by the Grml
526 team. Different kernel versions provide different squashfs file formats. Kernel
527 versions until 2.6.28-grml[64] used the 3.x file format but those outdated
528 kernels aren't supported by grml-live automatically anymore nowdays (manual
529 handling through SQUASHFS_BINARY possible though). Kernel versions
530 2.6.31-grml[64] and 2.6.33-grml[64] use openwrt's squashfs lzma file format
531 version 4. Kernel versions starting with 2.6.35-grml[64] use the mainline ondisk
532 file format version 4.
534 If you're wondering which package supports what, here's a short overview:
536 * squashfs-lzma-tools4 4.0-x: ZLIB as default, LZMA support via '-comp lzma'
537 option (enabled by grml-live by default), file format version 4 (mainline
538 version), package maintained and available from Grml, recommended for current
539 grml-live builds featuring kernels >=2.6.35-grml[64]
541 * squashfs-lzma-tools 4.0-2: ZLIB as default, LZMA support via '-lzma' option
542 (enabled by grml-live by default), file format version 4 (openwrt style),
543 package maintained and available from Grml, recommended for any grml-live builds
544 with kernel versions 2.6.31-grml[64] and 2.6.33-grml[64]
546 * squashfs-tools 1:4.0-x: ZLIB as default, no LZMA support/options, file format
547 version 4, package maintained and available from Debian, recommended only for
548 ZLIB-only builds of any grml-live builds with kernel versions >=2.6.31-grml[64]
552 * squashfs-tools 1:3.3-7: ZLIB as default, no LZMA support/options, file format
555 * squashfs-tools 1:3.2r2-9exp1: LZMA as default, ZLIB support via '-nolzma'
556 option, file format version 3
558 * squashfs-lzma-tools 3.3-1: LZMA as default, ZLIB support via '-nolzma' option,
559 file format version 3
561 Now, depending on the kernel version you want to use you need different versions
562 of squashfs-tools/squashfs-lzma-tools[4]. Yes, that's a mess (don't ask how much
563 this sucks for us developers) - though we're putting lots of effort into our
564 toolchain to automatically handle this for you through the grml-live build
565 system and provide proper documentation. The situation is supposed to calm down
566 with the recent integration of the squashfs file format 4 in the mainline
567 kernel. Support for LZMA is pending and as soon as it's available mainline this
568 should dramatically simplify the situation for developers as well as users.
571 If you want to force usage of a specific mksquashfs binary just set the
572 SQUASHFS_BINARY configuration/environment variable. Set SQUASHFS_OPTIONS for
573 customizing the options that should be used by the mksquashfs binary during
576 Using squashfs-lzma-tools4 4.0-1 on the build system
577 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
579 squashfs-lzma-tools4 4.0-1 is available via the Grml repositories. It provides
580 the mksquashfs-lzma4 and unsquashfs-lzma4 binaries. The package does NOT
581 conflict with neither Debian's squashfs-tools package nor Grml's
582 squashfs-lzma-tools package, so you can install all of them at the same time and
583 the build system will try to figure out the best matching binary automatically
586 The packages can be downloaded from
587 link:http://deb.grml.org/pool/main/s/squashfs-lzma-tools4/[http://deb.grml.org/pool/main/s/squashfs-lzma-tools4/]
589 It provides support for the new squashfs file format version 4 (as available in
590 mainline, so *not* the one being used by squashfs-lzma-tools and kernel
591 2.6.33-grml) and therefore requires kernel versions starting with
592 2.6.35-grml[64]. It supports LZMA as well as ZLIB compression. Just use the
593 defaults for enabling LZMA or use grml-live's '-z' option if you want to use
594 ZLIB compression instead.
596 * Kernel 2.6.31-grml[64]: works with ZLIB compression, fails with LZMA
597 * Kernel 2.6.33-grml[64]: works with ZLIB compression, fails with LZMA
598 * Kernel 2.6.35-grml[64]: works with ZLIB *and* LZMA compression
599 * Kernel 2.6.36-grml[64]: works with ZLIB *and* LZMA compression
602 squashfs-tools >=4.1-1 and/or squashfs-lzma-tools4 are the recommended package
603 for building up2date ISOs with grml-live! Please use other squashfs-* packages
604 only if you want to build live systems providing kernel versions older than
605 2.6.35-grml*. Use squashfs-tools >=4.1-1 or squashfs-lzma-tools4 from Grml if
606 you want to remaster any Grml releases MORE RECENT than 2010.04.
608 Using squashfs-lzma-tools 4.0-2 on the build system
609 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
611 squashfs-lzma-tools 4.0-2 is available via the Grml repositories. It provides
612 the mksquashfs-lzma and unsquashfs-lzma binaries. The package does NOT conflict
613 with Debian's squashfs-tools package (you can install both of them at the same
616 The packages can be downloaded from
617 link:http://deb.grml.org/pool/main/s/squashfs-lzma-tools/[http://deb.grml.org/pool/main/s/squashfs-lzma-tools/]
619 It provides support for the new squashfs file format version 4 (based on openwrt
620 patches, this is *not* the mainline file format that's being used by kernel
621 2.6.35-grml and squashfs-lzma-tools4!) and therefore requires kernel versions
622 newer than 2.6.28-grml[64]. It supports LZMA as well as ZLIB compression. Just
623 use the defaults for enabling LZMA or use grml-live's '-z' option if you want to
626 * Kernel \<=2.6.28-grml[64]: does not work
627 * Kernel 2.6.31-grml[64]: works
628 * Kernel 2.6.33-grml[64]: works
629 * Kernel 2.6.35-grml[64]: works for ZLIB compression, fails for LZMA
632 Please use squashfs-lzma-tools >=4.0-2 from Grml only if you want to remaster
633 Grml releases 2009.10 and 2010.04 or live systems with their according kernel
636 Using squashfs-tools 1:4.0-X on the build system
637 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
639 squashfs-tools >=1:4.0-1 is available in Debian/unstable and Debian/testing. It
640 provides the mksquashfs and unsquashfs binaries. The package does NOT conflict
641 neither with the squashfs-lzma-tools 4.0-2 package nor with the
642 squashfs-lzma-tools4 package (so you can install all of them at the same time).
644 The packages can be downloaded from
645 link:ftp://ftp.de.debian.org/debian/pool/main/s/squashfs-tools/[ftp://ftp.de.debian.org/debian/pool/main/s/squashfs-tools/]
647 It provides support for the new squashfs file format version 4 and therefore
648 requires kernel versions newer than 2.6.28-grml[64].
650 It does NOT support LZMA compression (dropped with
651 link:http://packages.debian.org/changelogs/pool/main/s/squashfs-tools/current/changelog[version
652 1:3.3-4] and not yet re-integrated yet, see
653 link:http://bugs.debian.org/594595[#594595]). If you need LZMA support please
654 use Grml's squashfs-lzma-tools[4] (see sections above) instead.
656 * Kernels \<=2.6.28-grml[64]: does not work
657 * Kernel 2.6.31-grml[64]: works (ZLIB only)
658 * Kernel 2.6.33-grml[64]: works (ZLIB only)
659 * Kernel 2.6.35-grml[64]: works (ZLIB only)
660 * Kernel 2.6.36-grml[64]: works (ZLIB only)
663 Please use squashfs-tools between 4.0-1 and 4.1-1 only if you want to remaster
664 Grml releases starting with 2009.10 using the ZLIB compression, please use other
665 squashfs packages otherwise instead.
669 Using squashfs-lzma-tools 3.3-1 on the build system
670 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
672 squashfs-lzma-tools 3.3-1 from the Grml repository supports kernel
673 2.6.26-grml[64] and 2.6.28-grml[64] using both LZMA and ZLIB (-nolzma)
676 The packages can be downloaded from
677 link:http://deb.grml.org/pool/main/s/squashfs-lzma/[http://deb.grml.org/pool/main/s/squashfs-lzma/].
680 Please use squashfs-lzma-tools 3.3-1 only if you want to remaster Grml releases
683 Using squashfs-tools 1:3.3-7 on the build system
684 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
686 squashfs-tools 1:3.3-7 is available through
687 http://grml.org/squashfs/squashfs-tools_3.3-7_i386.deb (for x86) or
688 http://grml.org/squashfs/squashfs-tools_3.3-7_amd64.deb (for amd64) [both build
689 on and for Debian/etch but working with testing and unstable as well].
691 Please notice that squashfs-tools 1:3.3-7 does NOT support LZMA compression at
692 all (so you won't be able to remaster release 2008.11 and 2009.05 using LZMA for
693 example). The -nolzma option of mksquashfs is not available therefore (even
694 though grml-live will deactivate it for you automatically anyway). Please use
695 squashfs-lzma-tools instead.
697 * Kernel 2.6.23-grml: does NOT work, please use squashfs-tools 1:3.2r2-9exp1
698 instead if you still want to use kernel 2.6.23 (not
700 * Kernel 2.6.26-grml: works (without LZMA compression only of course!)
701 * Kernel 2.6.28-grml: works (without LZMA compression only of course!)
703 Using squashfs-tools 1:3.2r2-9exp1 on the build system
704 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
706 squashfs-tools 1:3.2r2-9exp1 is available via the grml-testing repository,
709 # aptitude install squashfs-tools=1:3.2r2-9exp1
711 or directly via downloading the files
712 http://grml.org/squashfs/squashfs-tools_3.2r2-9exp1_i386.deb (for x86) or
713 http://grml.org/squashfs/squashfs-tools_3.2r2-9exp1_amd64.deb (for amd64).
715 Using with ZLIB compression (SQUASHFS_OPTIONS='-nolzma' or -z
716 option in grml-live cmdline):
718 * Kernel 2.6.23-grml: works
719 * Kernel 2.6.26-grml: works
720 * Kernel 2.6.28-grml: supposed to work (not verified though)
722 Using with LZMA compression:
724 * Kernel 2.6.23-grml: works
725 * Kernel 2.6.26-grml: does NOT work, please use ZLIB mode instead or switch
726 to Debian package squashfs-lzma-tools 3.3-1 (see section above).
727 * Kernel 2.6.28-grml: does NOT work, please use ZLIB mode instead or switch
728 to Debian package squashfs-lzma-tools 3.3-1 (see section above).
729 //////////////////////////////////////////////////////////////////////////////////
736 How do I deploy grml-live on a plain Debian installation?
737 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
739 The easiest way to get a running grml-live setup is to install Grml or
740 grml-medium using grml2hd (for example inside KVM, Virtualbox, VMware,... if you
741 don't want to run it on a physical system). Of course using grml-live on a
742 plain, original Debian installation is supported as well. So there we go.
744 What we have: plain, original Debian Lenny (5.0).
746 What we want: build a grml-medium ISO based on Debian/squeeze for the i386
747 architecture using grml-live.
751 If you encounter any problems while booting the resulting ISO please be aware of
752 <<current_state,the 'current state of grml-live with squashfs-tools and kernel'
758 # adjust sources.list:
759 cat >> /etc/apt/sources.list << EOF
761 # grml stable repository:
762 deb http://deb.grml.org/ grml-stable main
763 # deb-src http://deb.grml.org/ grml-stable main
765 # grml testing/development repository:
766 deb http://deb.grml.org/ grml-testing main
767 # deb-src http://deb.grml.org/ grml-testing main
770 # adjust apt-pinning (only prefer squashfs stuff from grml):
771 cat >> /etc/apt/preferences << EOF
773 Pin: origin deb.grml.org
776 Package: squashfs-tools
777 Pin: origin deb.grml.org
781 # get keyring for apt:
783 apt-get --allow-unauthenticated install grml-debian-keyring
785 # optionally(!) install basefile so we don't have to build basic
786 # chroot from scratch, grab from http://daily.grml.org/
787 # mkdir -p /etc/grml/fai/config/basefiles/
788 # mv base.tgz /etc/grml/fai/config/basefiles/I386.tar.gz
789 # mv base64.tgz /etc/grml/fai/config/basefiles/AMD64.tar.gz
791 # install relevant tools
792 # please check out http://grml.org/grml-live/#current_state when encountering problems!
793 apt-get -o APT::Install-Recommends=false install grml-live squashfs-tools
795 # adjust grml-live configuration for our needs:
796 cat > /etc/grml/grml-live.local << EOF
797 ## want a faster build process and don't need smaller ISOs?
798 ## if so use zlib compression
799 # SQUASHFS_OPTIONS="-comp gzip -b 256k"
800 ## want to use a specific squashfs binary?
801 # SQUASHFS_BINARY='/usr/bin/mksquashfs'
802 # install local files into the chroot
803 CHROOT_INSTALL="/etc/grml/fai/chroot_install"
804 ## adjust if necessary (defaults to /grml/grml-live):
805 ## OUTPUT="/srv/grml-live"
806 FAI_DEBOOTSTRAP="squeeze http://cdn.debian.net/debian/"
808 CLASSES="GRMLBASE,GRML_MEDIUM,I386"
809 # PRESERVE_LOGFILE='1'
810 # ZERO_FAI_LOGFILE='1'
812 deb http://deb.grml.org/ grml-stable main
813 deb http://deb.grml.org/ grml-testing main
814 deb http://cdn.debian.net/debian squeeze main contrib non-free
818 # just optional(!) - upgrade FAI to latest available version:
819 cat >> /etc/apt/sources.list << EOF
821 deb http://fai-project.org/download lenny koeln
824 # get gpg key of FAI repos and install current FAI version:
825 gpg -a --recv-keys AB9B66FD; gpg -a --export AB9B66FD | apt-key add -
827 apt-get install fai-client fai-server fai-doc
829 That's it. Now invoking 'grml-live -V' should build the ISO. If everything
830 worked as expected the last line of the shell output should look like:
832 [*] Successfully finished execution of grml-live [running 687 seconds]
834 and the ISO can be found inside /grml-live/grml-live/grml_isos/ then.
836 [[grml_fai_config_variable]]
837 What is $GRML_FAI_CONFIG?
838 ~~~~~~~~~~~~~~~~~~~~~~~~~
840 The variable '$GRML_FAI_CONFIG' is pointing to the directory /etc/grml/fai by
841 default. To provide you a maximum of flexibility you can set up your own
842 configuration directory (e.g. based on /etc/grml/fai) and use this directory
843 running grml-live with the '-D <config_dir>' option. Now '$GRML_FAI_CONFIG'
844 points to the specified directory instead of using /etc/grml/fai and all the
845 configuration files, scripts and hooks will be taken from your
846 '$GRML_FAI_CONFIG' directory.
849 I've problems with the build process. How to start debugging?
850 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
852 Check out the logs inside /var/log/fai/... If you think it's a bug in grml-live
853 send a copy of your config, logs and the commandline with a short problem
854 description to <mika@grml.org>:
856 # history | grep grml-live > /etc/grml/grml_live.cmdline
857 # tar zcf grml_live_problem.tar.gz /etc/grml/grml-live.conf \
858 /etc/grml/grml_live.cmdline /etc/grml/grml-buildd.conf \
859 /var/log/fai /etc/grml/fai
860 -> finally mail grml_live_problem.tar.gz to <mika@grml.org>
862 If you need help with grml-live or would like to see new features as part of
863 grml-live you can get commercial support via
864 link:http://grml-solutions.com/[Grml Solutions].
867 How much is the difference between LZMA and ZLIB compression?
868 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
870 ISO size (bs = blocksize):
872 [width="45%",cols="3,^2,^2"]
873 |============================================================
874 |ISO |LZMA (256kB bs) |ZLIB
875 |grml_sid |666M | 771M
876 |grml_squeeze |659M | 761M
877 |grml_lenny |624M | 723M
878 |grml64_sid |677M | 791M
879 |grml64_squeeze |671M | 785M
880 |grml64_lenny |639M | 745M
881 |grml-medium_sid |208M | 236M
882 |grml-medium_squeeze |206M | 234M
883 |grml-medium_lenny |193M | 220M
884 |grml64-medium_sid |213M | 245M
885 |grml64-medium_squeeze |213M | 244M
886 |grml64-medium_lenny |201M | 231M
887 |grml-small_sid |102M | 118M
888 |grml-small_squeeze |101M | 117M
889 |grml-small_lenny |97M | 112M
890 |grml64-small_sid |103M | 120M
891 |grml64-small_squeeze |103M | 120M
892 |grml64-small_lenny |99M | 116M
893 |============================================================
895 Build time of grml-medium's squashfs file (depends on your system, though just
896 to get the ratio between the different options):
898 * 10 minutes and 4 seconds with LZMA default blocksize (128k)
899 * 7 minutes 27 seconds with LZMA and blocksize 256k
900 * 6 minutes and 8 seconds with LZMA blocksize 512k
901 * 1 minute and 40 seconds with ZLIB
903 [[install-local-files]]
904 How do I install further files into the chroot/ISO?
905 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
907 Just point the configuration variable CHROOT_INSTALL to the directory which
908 provides the files you would like to install. Note that the files are installed
909 under '/' in the chroot - so you have to create the rootfs structure on your
912 echo "CHROOT_INSTALL=\$GRML_FAI_CONFIG/chroot_install" >> /etc/grml/grml-live.local
913 mkdir -p /etc/grml/fai/chroot_install/usr/src/
914 wget example.org/foo.tar.gz
915 mv foo.tar.gz /etc/grml/fai/chroot_install/usr/src/
918 [[local-debian-mirror]]
919 Can I use my own (local) Debian mirror?
920 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
922 Sure. Just adjust the variables GRML_LIVE_SOURCES and FAI_DEBOOTSTRAP (if not
923 already using NFSROOT's base.tgz) inside /etc/grml/grml-live.conf according to
924 your needs. Please don't forget that you should use the grml servers as well
925 (see default configuration) so all the grml packages can be downloaded as well.
927 If you want to use a local (for example NFS mount) mirror additionally, just
928 adjust MIRROR_DIRECTORY and MIRROR_SOURCES inside /etc/grml/grml-live.conf as
931 Unless you specify GRML_LIVE_SOURCES and/or FAI_DEBOOTSTRAP the default from
932 ${GRML_FAI_CONFIG}/apt/sources.list and ${GRML_FAI_CONFIG}/make-fai-nfsroot.conf will be
933 taken. If you customise the variables in /etc/grml/grml-live.conf then the two
934 files will be adjusted during runtime automatically.
936 If MIRROR_DIRECTORY and MIRROR_SOURCES are specified the local mirror will be
937 taken as first entry in the generated sources.list so it's preferred over
938 non-local mirrors. Using a fallback mirror (via providing several mirrors in
939 GRML_LIVE_SOURCES as used by default) is a recommended setting.
941 If you want to use a HTTP Proxy (like apt-cacher-ng), set APT_PROXY. Example:
942 APT_PROXY="http://localhost:3142/"
944 [[add-additional-debian-packages]]
945 How do I add additional Debian package(s) to my CD/ISO?
946 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
948 Just create a new class (using the package_config directory):
950 # cat > /etc/grml/fai/config/package_config/MIKA << EOF
954 another_name_of_a_debian_package
958 and specify it when invoking grml-live then:
960 # grml-live -c GRMLBASE,GRML_SMALL,I386,MIKA
962 [[reset-grml-live-configuration]]
963 I fscked up my grml-live configuration. How do I reset it to the defaults?
964 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
966 Notice: this deletes all your grml-live configuration files. If that's really
967 what you are searching for just run:
969 rm -rf /etc/grml/fai /etc/grml/grml-live.conf
970 dpkg -i --force-confnew --force-confmiss /path/to/grml-live_..._all.deb
974 If you don't control your /etc using a version control system (VCS) yet it's a
975 good chance to start using it now. Check out
976 link:http://michael-prokop.at/blog/2007/03/14/maintain-etc-with-mercurial-on-debian/[http://michael-prokop.at/blog/2007/03/14/maintain-etc-with-mercurial-on-debian/]
977 for more details how to maintain /etc using the mercurial VCS.
979 [[create-a-base-tgz]]
980 How do I create a base.tgz for use as NFSROOT?
981 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
983 First of all build the chroot system:
985 mkdir /tmp/nfsroot && cd /tmp/nfsroot
986 debootstrap squeeze /tmp/nfsroot/ http://cdn.debian.net/debian
989 Then check out where your NFSROOT is located:
991 # grep '^NFSROOT' /etc/grml/fai/make-fai-nfsroot.conf
992 NFSROOT=/grml/fai/nfsroot
994 So as /grml/fai/nfsroot is your NFSROOT place the file under
995 /grml/fai/nfsroot/live/filesystem.dir/var/tmp/:
997 mv base.tgz /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz
999 or even better use /etc/grml/fai/config/basefiles/$CLASSNAME.tar.gz instead.
1000 Use I386 as $CLASSNAME for i386 builds and AMD64 for amd64 builds.
1002 Now running "grml-live ..." will use this file as main system instead of
1003 executing debootstrap. Check out the output for the following lines if using
1007 Calling task_extrbase
1008 Unpacking Debian base archive
1009 Extracting /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz
1013 or if using /etc/grml/fai/config/basefiles/$CLASSNAME.tar.gz for:
1016 ftar: extracting /etc/grml/fai/config/basefiles///AMD64.tar.gz to
1017 /grml-live/grml-live_20071029.22138/grml_chroot//
1021 Existing base.tgz can be found at http://daily.grml.org/
1024 Set up apt-cacher-ng for use with grml-live
1025 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1027 Make sure /etc/grml/grml-live.local provides according APT_PROXY and
1030 # cat /etc/grml/grml-live.local
1032 APT_PROXY="http://localhost:3142/"
1034 FAI_DEBOOTSTRAP="squeeze http://localhost:3142/cdn.debian.net/debian squeeze main contrib non-free"
1036 Make sure apt-cacher-ng is running ('/etc/init.d/apt-cacher-ng restart').
1037 That's it. All downloaded files will be cached in /var/cache/apt-cacher-ng then.
1040 Set up approx for use with grml-live
1041 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1043 Make sure /etc/grml/grml-live.conf provides according GRML_LIVE_SOURCES and
1046 # cat /etc/grml/grml-live.conf
1049 deb http://localhost:9999/grml grml-stable main
1050 deb http://localhost:9999/grml grml-testing main
1051 deb http://localhost:9999/debian squeeze main contrib non-free
1053 FAI_DEBOOTSTRAP="squeeze http://localhost:9999/debian"
1057 # cat /etc/approx/approx.conf
1059 debian http://ftp.at.debian.org/debian
1060 grml http://deb.grml.org/
1062 Don't forget to restart approx (/etc/init.d/approx restart). That's it.
1063 All downloaded files will be cached in /var/cache/approx now.
1066 How do I revert the manifold feature from an ISO?
1067 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1069 The so called manifold feature Grml ISOs use by default allows one to use the same
1070 ISO for CD boot and USB boot. If you notice any problems when booting just
1071 revert the manifold feature running:
1073 % dd if=/dev/zero of=grml.iso bs=512 count=1 conv=notrunc
1075 To switch from manifold to isohybrid mode (an alternative approach provided by
1076 syslinux) then just execute:
1078 % isohybrid grml.iso
1081 How do I create a base tar.gz (I386.tar.gz or AMD64.tar.gz)
1082 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1084 Execute the following commands (requires root):
1086 ARCH='amd64' # replace with i386 if necessary
1087 SUITE='squeeze' # using the current stable release should always work
1088 debootstrap --arch "$ARCH" --exclude=info,tasksel,tasksel-data "$SUITE" "$ARCH" http://debian.netcologne.de/debian
1090 rm var/cache/apt/archives/*.deb
1091 tar zcf ../"${ARCH}".tar.gz *
1093 And finally place the generated tarball in /etc/grml/fai/config/basefiles/ (note
1094 that it needs to be uppercase letters matching the class names, so: AMD64.tar.gz
1095 for amd64 and I386.tar.gz for i386).
1098 How do I set up an autobuild environment?
1099 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1101 If you want to set up a system like link:http://daily.grml.org/[daily.grml.org]
1102 the Debian package grml-live-buildd provides all you need to start. Start with
1103 figuring out the cron job script /usr/share/grml-live/buildd/cronjob.sh.
1105 If you want to automatically update the grml-live Debian package on your build
1106 system based on the git tree of grml-live (so you get bleeding edge of
1107 development which might is interesting for services like daily.grml.org) the
1108 provided release_helper.sh script provides everything you need. Execute as root:
1110 echo "deb file:/home/grml-live-git/grml-live.build-area/ ./" >> /etc/apt/sources.list.d/grml-live.list
1111 adduser --disabled-login --disabled-password grml-live-git
1113 Execute 'visudo' to update sudo configuration and add the following line:
1115 grml-live-git ALL=NOPASSWD: /usr/bin/apt-get
1117 Switch to user grml-live-git and configure the rest:
1120 mkdir grml-live.build-area
1121 git clone git://git.grml.org/grml-live.git
1122 git config --global user.name "Grml-Live Git Autobuild"
1123 git config --global user.email "grml-live-git@$(hostname)"
1125 Finally install a cron job (as user grml-live-git) like:
1127 30 00 * * * cd /home/grml-live-git/grml-live.git/ && env AUTOBUILD=1 scripts/release_helper.sh >/home/grml-live-git/grml-live-build.log
1129 Tip: To find out the build date of the installed grml-live package just execute:
1131 % apt-cache policy grml-live | grep 'Installed.*autobuild'
1132 Installed: 0.13.1~autobuild1300450381
1134 and run "date -ud @$STRING" where $STRING is the number behind the "autobuild",
1137 % date -ud @1300450081
1138 Fri Mar 18 12:08:01 UTC 2011
1141 I've a question which isn't answered by this document
1142 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1144 Don't hesitate to contact the author: <mika@grml.org>
1147 Download / install grml-live as a Debian package
1148 ------------------------------------------------
1150 Debian packages are available through the grml-repository at
1151 link:http://deb.grml.org/pool/main/g/grml-live/[deb.grml.org]. If you want to
1152 build a Debian package on your own (using for example a specific version or the
1153 current development tree), just execute:
1155 git clone git://git.grml.org/grml-live
1163 The source of grml-live is available at
1164 link:http://git.grml.org/?p=grml-live.git[http://git.grml.org/?p=grml-live.git]
1170 Check out the link:http://git.grml.org/?p=grml-live.git;a=blob;f=TODO;hb=HEAD[TODO file].
1176 Please report feedback, link:http://grml.org/bugs/[bugreports] and wishes
1177 link:http://grml.org/contact/[to the grml-team]!
1183 The most recent grml-live documentation is available online at
1184 http://grml.org/grml-live/ and for offline reading also available
1185 in different formats:
1187 * http://grml.org/grml-live/grml-live.epub
1188 * http://grml.org/grml-live/grml-live.pdf
1193 Michael Prokop <mika@grml.org>
1195 /////////////////////////////////////
1196 // vim:ai tw=80 ft=asciidoc expandtab
1197 /////////////////////////////////////