7 grml-live - build framework based on FAI for generating a grml and Debian based
8 Linux Live system (CD/ISO)
13 grml-live [-c <classe[s]>] [-t <target_directory>] [-s <suite>] [-Fvh]
15 *******************************************************************************
16 Important! This document is growing as requested. If you have questions which
17 aren't answered by this document yet please let me know: <mika@grml.org>!
18 *******************************************************************************
23 grml-live provides the build system for creating a grml and Debian based Linux
24 Live-CD. The build system is based on
25 link:http://www.informatik.uni-koeln.de/fai/[FAI] (Fully Automatic
26 Installation). grml-live uses the "fai dirinstall" feature to generate a chroot
27 system based on the class concept of FAI (see later sections for further
28 details) and provides the framework to be able to generate a full-featured ISO.
29 It does not use all the FAI features by default though and you don't have to
30 know FAI to be able to use it.
32 The use of FAI gives you the flexibility to choose the packages you would like
33 to include on your very own Linux Live-CD without having to deal with all the
34 details of a build process.
36 CAUTION: grml-live does **not** use /etc/fai for configuration but instead
37 provides and uses /etc/grml/fai. This ensures that it does not clash with
38 default FAI configuration and packages, so you can use grml-live and FAI
39 completely independent at the same time!
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) and approx(8). To avoid downloading the base system again
49 and again check out FAI's NFSROOT (see FAQ of this document for details).
56 Specify the CLASSES to be used for building the ISO via FAI. By default only
57 the classes GRMLBASE and I386 are assumed, resulting in a small base system
58 (being about ~150MB total ISO size) for x86 (32bit).
62 Specify the Debian suite you want to use for your live-system. Defaults to
63 "etch" (being current Debian/stable). Supported values are: etch, lenny, sid,
64 stable, testing, unstable.
66 -t **TARGET_DIRECTORY**::
68 Main output directory of the build process of FAI. Some directories are created
69 inside this target directory, being: grml_cd (where the files for creating the
70 ISO are located, including the compressed squashfs file), grml_chroot (the
71 chroot system) and grml_isos (where the resulting ISO is stored).
75 Force execution and do not prompt for acknowledgment of configuration.
79 Display short usage information and exit.
83 Increase verbosity in the build process.
85 How to get your own Live-CD - the easy, fast and simple way
86 -----------------------------------------------------------
88 To get a small, Debian-stable and grml-based Live-CD using /grml/grml-live
89 as build and output directory just run:
93 To get a small Debian-unstable and grml-small based Live-CD using
94 /home/mika/grml-live as build and output directory just use:
96 # grml-live -c GRMLBASE,GRML_SMALL,I386 -t /home/mika/grml-live
100 If you have about 700MB of free space inside /dev/shm (being a tmpfs, usually
101 you should have >=1GB of RAM) just run "mount -o remount,suid,dev,rw /dev/shm"
102 and use /dev/shm as build and output directory - resulting in very fast build
103 process. But please be aware of the fact that rebooting your system will result
104 in an empty /dev/shm, so please another directory for $CHROOT_TARGET,
105 $BUILD_TARGET and $ISO_TARGET if you plan to create more persistent output. :)
107 Main features of grml-live
108 --------------------------
110 * create a grml-/Debian-based Linux Live-CD with one single command
112 * class based concept, providing a maximum of flexibility
114 * supports integration of own hooks, scripts and configuration
116 * supports use and integration of own Software and/or Kernels via simple use of
119 * native support of FAI features
121 * multi-arch support (work in progress)
126 grml-live uses FAI and its class based concept for adjusting configuration and
127 setup according to your needs. This gives you flexibility and strength without
128 losing the simplicity in the build process.
130 The main and base class provided by grml-live is named GRMLBASE. It's strongly
131 recommended to **always** use the class GRMLBASE when building an ISO using
132 grml-live, as well as the architecture dependend class which provides the kernel
133 (being 'I386' for x86_32 currently only). The following files and directories
134 are relevant for class GRMLBASE by default:
136 /etc/grml/fai/config/scripts/GRMLBASE/
137 /etc/grml/fai/config/debconf/GRMLBASE
138 /etc/grml/fai/config/class/GRMLBASE.var
139 /etc/grml/fai/config/hooks/instsoft.GRMLBASE
140 /etc/grml/fai/config/package_config/GRMLBASE
142 Take a look at the next section for information about the concept of those
145 If you want to use your own configuration, extend an existing configuration
146 and/or add additional packages to your ISO just invent a new class (or extend an
147 existing one). For example if you want to use your own class named "FOOBAR" just
148 extend CLASSES="GRMLBASE,I386" inside /etc/grml/grml-live.conf to
149 CLASSES="GRMLBASE,I386,FOOBAR" or invoke grml-live using the classes option:
150 "grml-live -c GRMLBASE,I386,FOOBAR ...".
152 More details regarding the class concept can be found in the documentation of
153 FAI itself (being available at /usr/share/doc/fai-doc/).
158 Notice that grml-live ships FAI configuration files that do not use the same
159 namespace as the FAI packages itself. This ensures that grml-live does not clash
160 with your usual FAI configuration, so instead of /etc/fai/fai.conf (package
161 fai-client) grml uses /etc/grml/fai/fai.conf instead. For more details see
162 below. To get an idea how another configuration or example files could look like
163 check out /usr/share/doc/fai-doc/examples/simple/ (provided by Debian package
164 fai-doc). Furthermore /usr/share/doc/fai-doc/fai-guide.html/ch-config.html
165 provides documentation regarding configuration possibilities.
169 Script for the main build process. Requires root permissions for execution.
171 /etc/grml/grml-live.conf
173 Main configuration file for grml-live. All the important steps can be configured
176 /etc/grml/fai/fai.conf
178 Main configuration file for FAI which specifies where all the configuration
179 files and scripts for FAI/grml-live can be found. By default it is set to
180 FAI_CONFIGDIR=/etc/grml/fai/config, a directory shipped by grml-live
181 out-of-the-box so you shouldn't have to configure anything in this file.
183 /etc/grml/fai/make-fai-nfsroot.conf
185 This file is used by make-fai-nfsroot(8) only. Usually you don't have to change
186 anything inside this file. If you want to modify NFSROOT though you can adjust
189 /etc/grml/fai/NFSROOT
191 This file specifies the package list for creating the NFSROOT.
193 /etc/grml/fai/apt/sources.list
195 This file specifies which mirrors should be used for retreiving the Debian
196 packages used for creating the main chroot (including all the software you would
197 like to see included). If you want to use a local mirror you either have to
198 adjust this file or use the GRML_LIVE_SOURCES variable inside
199 /etc/grml/grml-live.conf which modifies /etc/grml/fai/apt/sources.list
202 /etc/grml/fai/config/
204 The main directory for configuration of FAI/grml-live. More details below.
206 /etc/grml/fai/config/class/
208 This directory contains files which specify main configuration variables for the
211 /etc/grml/fai/config/debconf/
213 This directory provides the files for preseeding/configuration of debconf
216 /etc/grml/fai/config/hooks/
218 This directory provides files for customising the build process through hooks.
219 Hooks are user defined programs or scripts, which are called during the
220 installation process.
222 /etc/grml/fai/config/package_config/
224 Directory with lists of software packages to be installed or removed. The
225 different classes describe what should find its way to your ISO. When running
226 "grml-live -c GRMLBASE,I386 ..." only the files from the directories GRMLBASE
227 and I386 will be taken, if you use 'grml-live -c GRMLBASE,I386,FOOBAR ...' then
228 the files of GRMLBASE, I386 **plus** the files from FOOBAR will be taken. So
229 just create a new class to adjust the package selection according to your needs.
230 Please notice that the directory GRMLBASE contains a package list defining a
231 minimum but still reasonable package configuration.
233 /etc/grml/fai/config/scripts/
235 Scripts for customising the ISO within the build process.
239 This directory provides files used inside the scripts of
240 /etc/grml/fai/config/scripts/*. For a full documentation what happens with the
241 files please refer to the source of the scripts.
243 /etc/grml/fai/live-initramfs/
245 This directory provides the files used for building the initramfs/initrd via
248 Requirements for the build system
249 ---------------------------------
251 * any Debian based system should be sufficient (if not it's a bug, so please
252 send us a bug report then) [a usual link:http://grml.org/grml2hd/[grml2hd]
253 harddisk installation ships all you need]
255 * enough free disk space; at least 800MB are required for a minimal grml-live
256 run (\~400MB for the chroot [$CHROOT_TARGET], \~150MB for the build target
257 [$BUILD_TARGET] and \~150MB for the resulting ISO [$ISO_TARGET] plus some
258 temporary files), if you plan to use GRML_FULL you should have at least 4GB of
259 total free disk space
261 * fast network access for retreiving the Debian packages used for creating the
262 chroot (check out "local mirror" and "NFSROOT" to workaround this problem as far
268 Help, I'm using Debian etch and I don't have FAI version >3.2
269 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
271 wget http://www.informatik.uni-koeln.de/fai/download/etch/fai-client_3.2.1_all.deb \
272 http://www.informatik.uni-koeln.de/fai/download/etch/fai-server_3.2.1_all.deb
273 dpkg -i fai-client_3.2.1_all.deb fai-server_3.2.1_all.deb
275 or check out the link:http://www.informatik.uni-koeln.de/fai/[FAI-homepage] for
278 I've problems with the build process. How to start debugging?
279 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
281 Check out the logs inside /var/log/fai/dirinstall/... If you don't have the time
282 to debug the problem in further detail or don't know how to proceed just send a
283 copy of your config, logs and the commandline with a short problem description
286 # history | grep grml-live > /etc/grml/grml_live.cmdline
287 # tar zcf grml_live_problem.tar.gz /etc/grml/grml-live.conf \
288 /var/log/fai/dirinstall /etc/grml/fai
290 Can I use my own (local) Debian mirror?
291 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
293 Sure. Just adjust the variables GRML_LIVE_SOURCES and FAI_DEBOOTSTRAP (if not
294 already using NFSROOT's base.tgz) inside /etc/grml/grml-live.conf according to
295 your needs. Please don't forget that you should use the grml servers as well
296 (see default configuration) so all the grml packages can be downloaded as well.
298 If you want to use a local (for example NFS mount) mirror additionally, just
299 adjust MIRROR_DIRECTORY and MIRROR_SOURCES insede /etc/grml/grml-live.conf as
302 Unless you specify GRML_LIVE_SOURCES and/or FAI_DEBOOTSTRAP the default from
303 /etc/grml/fai/apt/sources.list and /etc/grml/fai/make-fai-nfsroot.conf will be
304 taken. If you customise the variables in /etc/grml/grml-live.conf then the two
305 files will be adjusted during runtime automatically.
307 If MIRROR_DIRECTORY and MIRROR_SOURCES are specified the local mirror will be
308 taken as first entry in the generated sources.list so it's prefered over
309 non-local mirrors. Using a fallback mirror (via providing several mirrors in
310 GRML_LIVE_SOURCES as used by default) is a recommended setting.
312 How do I add additional Debian package(s) to my CD/ISO?
313 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315 Just create a new class (using the package_config directory):
317 # cat > /etc/grml/fai/config/package_config/MIKA << EOF
321 another_name_of_a_debian_package
325 and specify it when invoking grml-live then:
327 # grml-live -c GRMLBASE,I386,MIKA
329 I fscked up my grml-live configuration. How do I reset it to the defaults?
330 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
332 Notice: this deletes all your grml-live configuration files. If that's really
333 what you are searching for just run:
335 rm -rf /etc/grml/fai /etc/grml/grml-live.conf
336 dpkg -i --force-confnew --force-confmiss /path/to/grml-live_..._all.deb
340 If you don't control your /etc using a version control system (VCS) yet it's a
341 good chance to start using it now. Check out
342 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/]
343 for more details how to maintain /etc using the mercurial VCS.
345 How do I create a base.tgz for use as NFSROOT?
346 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
348 First of all build the chroot system:
350 mkdir /tmp/nfsroot && cd /tmp/nfsroot
351 debootstrap etch /tmp/nfsroot/ http://ftp.de.debian.org/debian
354 Then check out where your NFSROOT is located:
356 # grep '^NFSROOT' /etc/grml/fai/make-fai-nfsroot.conf
357 NFSROOT=/grml/fai/nfsroot
359 So as /grml/fai/nfsroot is your NFSROOT place the file under
360 /grml/fai/nfsroot/live/filesystem.dir/var/tmp/:
362 mv base.tgz /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz
364 Now running "grml-live ..." will use this file as main system instead of
365 executing debootstrap. Check out the output for the following lines:
368 Calling task_extrbase
369 Unpacking Debian base archive
370 Extracting /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz
374 I've a question which isn't answered by this document
375 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
377 Don't hesitate to ask on IRC (channel #grml on irc.freenode.org) or just drop me
378 a mail: <mika@grml.org>
383 * "fai dirinstall" does not seem to always exit according to what happend during
384 the build; make sure to exit on any error (check logs for stuff like "dpkg:
385 error processing" [software.log], "FAILED with exit code" [shell.log],...)
387 * support something like a directory /etc/grml/fai/packages to install
388 additional Debian packages without the need for a Debian repository
390 * document the available classes in more detail (GRMLBASE, LATEX_CLEANUP,
391 NO_ONLINE, REMOVE_DOCS, GRML_SMALL,...)
393 * add a check to make sure $TARGET is mounted rw,suid,dev?
395 * add support for amd64 [gebi?] + ppc [formorer?] (and identify all packages
396 that are arch specific so we have a clean package list in all classes)
398 * support different grml-flavours through classes right out-of-the-box (being:
399 grml and grml-small (done), each for x86, amd64 and ppc)
401 * support signed apt repositories (currently it's deactivated via FAI's
402 FAI_ALLOW_UNSIGNED=1 for some packages in the toolchain)
404 * support setting stuff like ISO name, version,... on-the-fly (especially for
405 stuff inside boot/isolinux/*)
407 * support "final builds" (including stuff like generating md5sums, gpg,... -
408 create a grml_release-directory including all the details about the build
409 process like dpkg selection, logs,...)
411 * the grml-live class(es) should send output to stdout and stderr as used inside
412 FAI as well (so it's not as verbose unless you specify it, make it configurable
413 though); check for errors inside the logs then as well
415 * provide possibility for cleanup of all created build directories and
416 a smart summary of the buildprocess (including "took ... minutes/seconds to
419 * check out how FAI_DEBMIRROR of /etc/grml/fai/fai.conf could be merged with our
420 MIRROR_DIRECTORY and MIRROR_SOURCES feature of /etc/grml/grml-live.conf
422 * support hooks to allow further customisation of the build process
427 * Provide all upcoming grml releases based on grml-live.
429 * Provide a console interface (using dialog) for easy and common use of
432 * Provide a graphical interface (for example using pygtk) for easy and common
435 Download / install grml-live as a Debian package
436 ------------------------------------------------
438 Debian packages will be available through the grml-repository at
439 link:http://deb.grml.org/[http://deb.grml.org/] as soon as the grml-team
440 considers grml-live as stable enough. In the meantime just build the package on
443 hg clone http://hg.grml.org/grml-live
450 The source of grml-live is available at
451 link:http://hg.grml.org/grml-live/[http://hg.grml.org/grml-live/]
456 Please report feedback, link:http://grml.org/bugs/[bugreports] and wishes
457 link:http://grml.org/contact/[to the grml-team]!
461 Michael Prokop <mika@grml.org>.
463 /////////////////////////////////////
464 // vim:ai tw=80 ft=asciidoc expandtab
465 /////////////////////////////////////