Add design.txt
[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>] [-g
14 <grml_name>] [-i <iso_name> ] [-o <output_directory>] [-r <release_name>] [-s
15 <suite>] [-t <template_directory>] [-v <version_number>] [-bFhquVz]
16
17 CAUTION: Please check out <<current_state,the 'Current state of grml-live with
18 squashfs-tools and kernel' section>> for details about current state of involved
19 tools before starting with grml-live or if you encounter any problems.
20
21 Description
22 -----------
23
24 grml-live provides the build system for creating a grml and Debian based Linux
25 Live-CD. The build system is based on
26 link:http://www.informatik.uni-koeln.de/fai/[FAI] (Fully Automatic
27 Installation). grml-live uses the "fai dirinstall" feature to generate a chroot
28 system based on the class concept of FAI (see later sections for further
29 details) and provides the framework to be able to generate a full-featured ISO.
30 It does not use all the FAI features by default though and you don't have to
31 know FAI to be able to use it.
32
33 The use of FAI gives you the flexibility to choose the packages you would like
34 to include on your very own Linux Live-CD without having to deal with all the
35 details of a build process.
36
37 CAUTION: grml-live does **not** use /etc/fai for configuration but instead
38 provides and uses /etc/grml/fai. This ensures that it does not clash with
39 default FAI configuration and packages, so you can use grml-live and FAI
40 completely independent at the same time!
41
42 [NOTE]
43
44 Please notice that you should have a fast network connection as all the Debian
45 packages will be downloaded and installed via network. If you want to use a
46 local mirror (strongly recommended if you plan to use grml-live more than once)
47 checkout mkdebmirror (see /usr/share/doc/grml-live/examples/mkdebmirror),
48 debmirror(1), reprepro(1) (see /usr/share/doc/grml-live/examples/reprepro/ for a
49 sample configuration), apt-cacher(1) and approx(8). To avoid downloading the
50 base system again and again check out FAI's NFSROOT (see FAQ of this document
51 for details).
52
53 Options
54 -------
55
56   -a **ARCHITECTURE**::
57
58 Use the specified architecture instead of the currently running one.  This
59 allows building a 32bit system on a 64bit host (though you can't build a 64bit
60 system on a 32bit system/kernel of course). Please notice that real
61 crosscompiling (like building a ppc system on x86) isn't possible due to the
62 nature and the need of working in a chroot. Currently supported values: i386
63 and amd64.
64
65   -b::
66
67 Build the ISO without updating the chroot via FAI. This option is useful for
68 example when working on stable releases: if you have a working base
69 system/chroot and do not want to execute any further updates (via "-u" option)
70 but intend to only build the ISO.
71
72   -c **CLASSES**::
73
74 Specify the CLASSES to be used for building the ISO via FAI.  By default only
75 the classes GRMLBASE, GRML_SMALL and I386 are assumed, resulting in a small base
76 system (being about ~150MB total ISO size). If using a non-I386 system (like
77 amd64) you should specify the appropriate architecture as well. Additionally you
78 can specify a class providing a grml-kernel (see
79 <<classes,the 'CLASSES' section in this document>> for details about available classes).
80 So instead of GRML_SMALL you can also use GRML_MEDIUM and GRML_FULL.
81
82   -C **CONFIGURATION_FILE**::
83
84 The specified file is used as configuration file for grml-live. By default
85 /etc/grml/grml-live.conf is used for main configuration. If a file named
86 /etc/grml/grml-live.local exists it is used as well (sourced after reading
87 /etc/grml/grml-live.conf to allow overriding settings). As a last option the
88 specified configuration file is sourced so it is possible to override settings
89 of /etc/grml/grml-live.conf as well as of /etc/grml/grml-live.local. Please
90 notice that all configuration files have to be adjusted during execution of
91 grml-live, so please make sure you use /etc/grml/grml-live.conf as a base for
92 your own configuration file. Please also notice that the configuration file
93 specified via this option is **not** (yet) supported inside the
94 scripts/hooks/classes at /etc/grml/fai/config. Instead use
95 /etc/grml/grml-live.conf and/or /etc/grml/grml-live.local for configuration
96 stuff used inside /etc/grml/fai/config.
97
98   -F::
99
100 Force execution and do not prompt for acknowledgment of configuration.
101
102   -g **GRML_NAME**::
103
104 Set the grml flavour name. Common usage examples: grml, grml-small, grml64.
105 Please do NOT use blanks and any special characters like '/', ';' inside
106 GRML_NAME, otherwise you might notice problems with booting.
107
108   -h::
109
110 Display short usage information and exit.
111
112   -i **ISO_NAME**::
113
114 Specify name of ISO which will be available inside $OUTPUT_DIRECTORY/grml_isos
115 by default.
116
117   -o **OUTPUT_DIRECTORY**::
118
119 Main output directory of the build process of FAI.  Some directories are created
120 inside this target directory, being: grml_cd (where the files for creating the
121 ISO are located, including the compressed squashfs file), grml_chroot (the
122 chroot system) and grml_isos (where the resulting ISO is stored).
123
124   -q::
125
126 Build the ISO without (re-)creating the squashfs compressed file using mksquashfs.
127 This option is useful if you just want to update parts outside the chroot in the ISO.
128 Consider combining this option with the build-only option '-b'.
129
130   -r **RELEASENAME**::
131
132 Specify name of the release.
133
134   -s **SUITE**::
135
136 Specify the Debian suite you want to use for your live-system.  Defaults to
137 "etch" (being current Debian/stable). Supported values are: etch, lenny, sid.
138
139   -t **TEMPLATE_DIRECTORY**::
140
141 Specify place of the templates used for building the ISO. By default
142 (and if not manually specified) this is /usr/share/grml-live/templates/.
143
144   -u::
145
146 Update existing chroot instead of rebuilding it from scratch. This option is
147 based on the softupdate feature of FAI.
148
149   -v **VERSION_NUMBER**::
150
151 Specify version number of the release.
152
153   -V::
154
155 Increase verbosity in the build process.
156
157   -z::
158
159 Use ZLIB instead of LZMA compression in mksquashfs part of the build process.
160
161 Usage examples
162 --------------
163
164 To get a small, Debian-stable and grml-based Live-CD using /grml/grml-live
165 as build and output directory just run:
166
167   # grml-live
168
169 To get a small Debian-unstable and grml-small based Live-CD using
170 /home/mika/grml-live as build and output directory just use:
171
172   # grml-live -s sid -c GRMLBASE,GRML_SMALL,I386 -o /home/mika/grml-live
173
174 To get a medium sized, Debian-unstable and grml-based Live-CD for i386
175 architecture using /grml/grml-live as build and output directory just run:
176
177   # grml-live -s sid -a i386 -c GRMLBASE,GRML_MEDIUM,I386
178
179 To get a small, Debian-unstable and grml-based Live-CD using /tmp as build and
180 output directory and use grml_0.0-3.iso as ISO name (placed inside
181 /tmp/grml_isos) just invoke:
182
183   # grml-live -o /tmp -c GRMLBASE,GRML_SMALL,I386 -s sid -i grml_0.0-3.iso
184
185 [NOTE]
186
187 If you have about 700MB of free space inside /dev/shm (being a tmpfs, usually
188 you should have >=1GB of RAM) just run "mount -o remount,suid,dev,rw /dev/shm"
189 and use /dev/shm as build and output directory - resulting in very fast build
190 process.  But please be aware of the fact that rebooting your system will result
191 in an empty /dev/shm, so please use another directory for $CHROOT_OUTPUT,
192 $BUILD_OUTPUT and $ISO_OUTPUT if you plan to create more persistent output. :)
193
194 Main features of grml-live
195 --------------------------
196
197 * create a grml-/Debian-based Linux Live-CD with one single command
198
199 * class based concept, providing a maximum of flexibility
200
201 * supports integration of own hooks, scripts and configuration
202
203 * supports use and integration of own Software and/or Kernels via simple use of
204 Debian repositories
205
206 * native support of FAI features
207
208 * multi-arch support (work in progress)
209
210 The class concept
211 -----------------
212
213 grml-live uses FAI and its class based concept for adjusting configuration and
214 setup according to your needs. This gives you flexibility and strength without
215 losing the simplicity in the build process.
216
217 The main and base class provided by grml-live is named GRMLBASE. It's strongly
218 recommended to **always** use the class GRMLBASE when building an ISO using
219 grml-live, as well as the architecture dependent class which provides the kernel
220 (being 'I386' for x86_32 and 'AMD64' for x86_64) and a GRML_* class (like
221 GRML_SMALL, GRML_MEDIUM or GRML_FULL). The following files and directories are
222 relevant for class GRMLBASE by default:
223
224   /etc/grml/fai/config/scripts/GRMLBASE/
225   /etc/grml/fai/config/debconf/GRMLBASE
226   /etc/grml/fai/config/class/GRMLBASE.var
227   /etc/grml/fai/config/hooks/instsoft.GRMLBASE
228   /etc/grml/fai/config/package_config/GRMLBASE
229
230 Take a look at the next section for information about the concept of those
231 files/directories.
232
233 If you want to use your own configuration, extend an existing configuration
234 and/or add additional packages to your ISO just invent a new class (or extend an
235 existing one). For example if you want to use your own class named "FOOBAR" just
236 extend CLASSES="GRMLBASE,GRML_SMALL,I386" inside /etc/grml/grml-live.conf to
237 CLASSES="GRMLBASE,GRML_SMALL,I386,FOOBAR" or invoke grml-live using the classes
238 option: "grml-live -c GRMLBASE,GRML_SMALL,I386,FOOBAR ...".
239
240 More details regarding the class concept can be found in the documentation of
241 FAI itself (being available at /usr/share/doc/fai-doc/).
242
243 [[X7]]
244 [[classes]]
245 Available classes
246 -----------------
247
248 The package selection part of the classes can be found in
249 /etc/grml/fai/config/package_config whereas some further classes are defined for
250 example in /etc/grml/fai/config/scripts/ so specific feature sets can be
251 selected. The following classes are predefined:
252
253 * DEBORPHAN: get rid of all packages listed in output of Deborphan
254
255 * GRMLBASE: the main class responsible for getting a minimal subset of what's
256 defining a grml system. Important parts of the buildprocess are specified in
257 this class as well, so unless you have a really good reason you should always
258 use this class.
259
260 * GRML_FORENSIC: tools for forensic investigations which has been created
261 by people from link:http://www.forensic-geeks.org/[forensic-geeks.org].
262
263 * GRML_FULL: full featured grml, also known as the "normal", full grml.
264
265 * GRML_MEDIUM: medium sized grml version, known as grml-medium
266
267 * GRML_POWERPC: grml for PowerPC architecture, not supported yet (still work in
268 progress)
269
270 * GRML_SMALL: minimum sized grml version, known as grml-small
271
272 * LATEX_CLEANUP: get rid of several very large LaTeX directories
273 (like some /usr/share/doc/texlive-*, /usr/share/doc/texmf,...)
274
275 * LOCALES: use full featured locales setup (see /etc/locale.gen.grml). This
276 avoids to get rid of /usr/share/locale - which happens by default otherwise - as
277 well.
278
279 * NO_ONLINE: do not run scripts during the chroot build process which require a
280 network connection
281
282 * RELEASE: run some specific scripts and commands to provide the workflow for an
283 official grml release
284
285 * REMOVE_DOCS: get rid of documentation directories (like /usr/share/doc,
286 /usr/share/man/, /usr/share/info,...)
287
288 * XORG: providing important packages for use with a base grml-featured X.org
289 setup
290
291 Files
292 -----
293
294 Notice that grml-live ships FAI configuration files that do not use the same
295 namespace as the FAI packages itself. This ensures that grml-live does not clash
296 with your usual FAI configuration, so instead of /etc/fai/fai.conf (package
297 fai-client) grml uses /etc/grml/fai/fai.conf instead. For more details see
298 below. To get an idea how another configuration or example files could look like
299 check out /usr/share/doc/fai-doc/examples/simple/ (provided by Debian package
300 fai-doc). Furthermore /usr/share/doc/fai-doc/fai-guide.html/ch-config.html
301 provides documentation regarding configuration possibilities.
302
303   /usr/sbin/grml-live
304
305 Script for the main build process. Requires root permissions for execution.
306
307   /etc/grml/grml-live.conf
308
309 Main configuration file for grml-live. All the important steps can be configured
310 at this stage.
311
312   /etc/grml/fai/fai.conf
313
314 Main configuration file for FAI which specifies where all the configuration
315 files and scripts for FAI/grml-live can be found. By default it is set to
316 FAI_CONFIGDIR=/etc/grml/fai/config, a directory shipped by grml-live
317 out-of-the-box so you shouldn't have to configure anything in this file.
318
319   /etc/grml/fai/make-fai-nfsroot.conf
320
321 This file is used by make-fai-nfsroot(8) only. Usually you don't have to change
322 anything inside this file. If you want to modify NFSROOT though you can adjust
323 it there.
324
325   /etc/grml/fai/NFSROOT
326
327 This file specifies the package list for creating the NFSROOT.
328
329   /etc/grml/fai/apt/sources.list
330
331 This file specifies which mirrors should be used for retreiving the Debian
332 packages used for creating the main chroot (including all the software you would
333 like to see included). If you want to use a local mirror you either have to
334 adjust this file or use the GRML_LIVE_SOURCES variable inside
335 /etc/grml/grml-live.conf which modifies /etc/grml/fai/apt/sources.list
336 on-the-fly then.
337
338   /etc/grml/fai/config/
339
340 The main directory for configuration of FAI/grml-live. More details below.
341
342   /etc/grml/fai/config/class/
343
344 This directory contains files which specify main configuration variables for the
345 FAI classes.
346
347   /etc/grml/fai/config/debconf/
348
349 This directory provides the files for preseeding/configuration of debconf
350 through files.
351
352   /etc/grml/fai/config/hooks/
353
354 This directory provides files for customising the build process through hooks.
355 Hooks are user defined programs or scripts, which are called during the
356 installation process.
357
358   /etc/grml/fai/config/package_config/
359
360 Directory with lists of software packages to be installed or removed.  The
361 different classes describe what should find its way to your ISO.  When running
362 "grml-live -c GRMLBASE,GRML_SMALL,I386 ..." only the configuration of GRMLBASE,
363 GRML_SMALL and and I386 will be taken. If you use 'grml-live -c
364 GRMLBASE,GRML_SMALL,I386,FOOBAR ...' then the files of GRMLBASE, GRML_SMALL,
365 I386 **plus** the files from FOOBAR will be taken. So just create a new class to
366 adjust the package selection according to your needs.  Please notice that the
367 directory GRMLBASE contains a package list defining a minimum but still
368 reasonable package configuration.
369
370   /etc/grml/fai/config/scripts/
371
372 Scripts for customising the ISO within the build process.
373
374   /etc/grml/fai/files/
375
376 This directory provides files used inside the scripts of
377 /etc/grml/fai/config/scripts/*. For a full documentation what happens with the
378 files please refer to the source of the scripts.
379
380   /etc/grml/fai/live-initramfs/
381
382 This directory provides the files used for building the initramfs/initrd via
383 live-initramfs(8).
384
385 Available log files
386 -------------------
387
388 grml-live itself logs to /var/log/grml-live.log. Unless you set ZERO_LOGFILE in
389 /etc/grml/grml-live.conf the output is appended to the file. If you set the
390 ZERO_LOGFILE configuration option the logfile will be truncated on each new
391 invocation of grml-live.
392
393 The FAI part of grml-live logs to /var/log/fai/$HOSTNAME/ - so the
394 default being /var/log/fai/grml/.
395
396 If you are using the grml-live buildd you will find the logs of the grml-live
397 run at /var/log/grml-buildd.stdout and /var/log/grml-buildd.stderr.
398
399 Requirements for the build system
400 ---------------------------------
401
402 * any Debian based system should be sufficient (if not it's a bug, so please
403 send us a bug report then) [a usual link:http://grml.org/grml2hd/[grml2hd]
404 harddisk installation ships all you need]
405
406 * enough free disk space; at least 800MB are required for a minimal grml-live
407 run (\~400MB for the chroot [$CHROOT_OUTPUT], \~150MB for the build target
408 [$BUILD_OUTPUT] and \~150MB for the resulting ISO [$ISO_OUTPUT] plus some
409 temporary files), if you plan to use GRML_FULL you should have at least 4GB of
410 total free disk space
411
412 * fast network access for retreiving the Debian packages used for creating the
413 chroot (check out "local mirror" and "NFSROOT" to workaround this problem as far
414 as possiblbe)
415
416 For further information see next section.
417
418 [[X8]]
419 [[current_state]]
420 Current state of grml-live with squashfs-tools and kernel
421 ---------------------------------------------------------
422
423 To make it easier to track problems this section documents current state of
424 grml-live playing together with squashfs-tools / squashfs-lzma-tools (for
425 building the compressed file) and the kernel version. Documentation of this
426 section is up2date by 27th of september 2008.
427
428 System
429 ~~~~~~
430
431 * grml-live, version 0.9.4
432
433 * building grml-medium (Debian/unstable)
434
435 * software versions used in the ISO (being installed automatically, recorded
436 just as a reference):
437
438   ii  busybox             1:1.10.2-2          Tiny utilities for small and embedded systems
439   ii  initramfs-tools     0.92f.grml01        tools for generating an initramfs
440   ii  klibc-utils         1.5.12-2            small utilities built with klibc for early boot
441   ii  live-initramfs      1.139.1-2grml.01    Debian Live initramfs hook
442   ii  lvm2                2.02.39-2           The Linux Logical Volume Manager
443   ii  mdadm               2.6.7-3.1           tool to administer Linux MD arrays (software RAID)
444   ii  udev                0.125-6grml0        /dev/ and hotplug management daemon
445
446 Using squashfs-lzma-tools 3.3-1 on the build system
447 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
448
449 squashfs-lzma-tools from the grml repository supports kernel 2.6.26-grml
450 (version >=grml.05) using both lzma and zlib (-nolzma) compression. It's the
451 recommended package for building ISOs with grml-live currently.
452
453 Using squashfs-tools 1:3.3-7 on the build system
454 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
455
456 squashfs-tools 1:3.3-7 is available via Debian/unstable and Debian/testing
457 (lenny) pool running:
458
459   # aptitude install squashfs-tools=1:3.3-7
460
461 or directly via downloading the files
462 http://grml.org/squashfs/squashfs-tools_3.3-7_i386.deb (for x86) or
463 http://grml.org/squashfs/squashfs-tools_3.3-7_amd64.deb (for amd64) [both build
464 on and for Debian/etch but working with testing and unstable as well].
465
466 Please notice that squashfs-tools 1:3.3-7 does NOT support LZMA compression at
467 all. The -nolzma option of mksquashfs is not available therefore (even
468 though grml-live will deactivate it for you automatically anyway). Please
469 use squashfs-lzma-tools instead.
470
471 * Kernel 2.6.23-grml: does NOT work, please use squashfs-tools 1:3.2r2-9exp1
472                     instead if you still want to use kernel 2.6.23
473 * Kernel 2.6.26-grml: works
474
475 Using squashfs-tools 1:3.2r2-9exp1 on the build system
476 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
477
478 squashfs-tools 1:3.2r2-9exp1 is available via the grml-testing repository,
479 running:
480
481   # aptitude install squashfs-tools=1:3.2r2-9exp1
482
483 or directly via downloading the files
484 http://grml.org/squashfs/squashfs-tools_3.2r2-9exp1_i386.deb (for x86) or
485 http://grml.org/squashfs/squashfs-tools_3.2r2-9exp1_amd64.deb (for amd64).
486
487 Versions with ZLIB compression (SQUASHFS_OPTIONS='-nolzma' or -z
488 option in grml-live cmdline):
489
490 * Kernel 2.6.23-grml: works
491 * Kernel 2.6.26-grml: works
492
493 Versions with LZMA compression:
494
495 * Kernel 2.6.23-grml: works
496 * Kernel 2.6.26-grml: does NOT work, please use zlib mode instead or switch
497   to Debian package squashfs-lzma-tools (see section above).
498
499 FAQ
500 ---
501
502 Help, I'm using Debian etch and I don't have FAI version >3.2
503 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
504
505   wget http://www.informatik.uni-koeln.de/fai/download/etch/fai-client_3.2.8_all.deb \
506        http://www.informatik.uni-koeln.de/fai/download/etch/fai-server_3.2.8_all.deb \
507        http://www.informatik.uni-koeln.de/fai/download/etch/fai-doc_3.2.8_all.deb
508   dpkg -i fai-client_3.2.8_all.deb fai-server_3.2.8_all.deb fai-doc_3.2.8_all.deb
509
510 or check out the link:http://www.informatik.uni-koeln.de/fai/[FAI-homepage] for
511 further details.
512
513 I've problems with the build process. How to start debugging?
514 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
515
516 Check out the logs inside /var/log/fai/... If you don't have the time to debug
517 the problem in further detail or don't know how to proceed just send a copy of
518 your config, logs and the commandline with a short problem description to
519 <mika@grml.org>:
520
521   # history | grep grml-live > /etc/grml/grml_live.cmdline
522   # tar zcf grml_live_problem.tar.gz /etc/grml/grml-live.conf \
523             /etc/grml/grml-buildd.conf /var/log/fai /etc/grml/fai
524
525 Can I use my own (local) Debian mirror?
526 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
527
528 Sure. Just adjust the variables GRML_LIVE_SOURCES and FAI_DEBOOTSTRAP (if not
529 already using NFSROOT's base.tgz) inside /etc/grml/grml-live.conf according to
530 your needs. Please don't forget that you should use the grml servers as well
531 (see default configuration) so all the grml packages can be downloaded as well.
532
533 If you want to use a local (for example NFS mount) mirror additionally, just
534 adjust MIRROR_DIRECTORY and MIRROR_SOURCES inside /etc/grml/grml-live.conf as
535 well.
536
537 Unless you specify GRML_LIVE_SOURCES and/or FAI_DEBOOTSTRAP the default from
538 /etc/grml/fai/apt/sources.list and /etc/grml/fai/make-fai-nfsroot.conf will be
539 taken. If you customise the variables in /etc/grml/grml-live.conf then the two
540 files will be adjusted during runtime automatically.
541
542 If MIRROR_DIRECTORY and MIRROR_SOURCES are specified the local mirror will be
543 taken as first entry in the generated sources.list so it's prefered over
544 non-local mirrors. Using a fallback mirror (via providing several mirrors in
545 GRML_LIVE_SOURCES as used by default) is a recommended setting.
546
547 How do I add additional Debian package(s) to my CD/ISO?
548 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
549
550 Just create a new class (using the package_config directory):
551
552   # cat > /etc/grml/fai/config/package_config/MIKA << EOF
553   PACKAGES aptitude
554
555   vim
556   another_name_of_a_debian_package
557   and_another_one
558   EOF
559
560 and specify it when invoking grml-live then:
561
562   # grml-live -c GRMLBASE,GRML_SMALL,I386,MIKA
563
564 I fscked up my grml-live configuration. How do I reset it to the defaults?
565 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
566
567 Notice: this deletes all your grml-live configuration files. If that's really
568 what you are searching for just run:
569
570   rm -rf /etc/grml/fai /etc/grml/grml-live.conf
571   dpkg -i --force-confnew --force-confmiss /path/to/grml-live_..._all.deb
572
573 [NOTE]
574
575 If you don't control your /etc using a version control system (VCS) yet it's a
576 good chance to start using it now. Check out
577 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/]
578 for more details how to maintain /etc using the mercurial VCS.
579
580 How do I create a base.tgz for use as NFSROOT?
581 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
582
583 First of all build the chroot system:
584
585   mkdir /tmp/nfsroot && cd /tmp/nfsroot
586   debootstrap etch /tmp/nfsroot/ http://ftp.de.debian.org/debian
587   tar zcf base.tgz ./
588
589 Then check out where your NFSROOT is located:
590
591   # grep '^NFSROOT' /etc/grml/fai/make-fai-nfsroot.conf
592   NFSROOT=/grml/fai/nfsroot
593
594 So as /grml/fai/nfsroot is your NFSROOT place the file under
595 /grml/fai/nfsroot/live/filesystem.dir/var/tmp/:
596
597   mv base.tgz /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz
598
599 or even better use /etc/grml/fai/config/basefiles/$CLASSNAME.tar.gz instead.
600 Use I386 as $CLASSNAME for i386 builds and AMD64 for amd64 builds.
601
602 Now running "grml-live ..." will use this file as main system instead of
603 executing debootstrap. Check out the output for the following lines if using
604 NFSROOT:
605
606   [...]
607   Calling task_extrbase
608   Unpacking Debian base archive
609   Extracting /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz
610   Calling task_mirror
611   [...]
612
613 or if using /etc/grml/fai/config/basefiles/$CLASSNAME.tar.gz for:
614
615   [...]
616   ftar: extracting /etc/grml/fai/config/basefiles///AMD64.tar.gz to
617   /grml-live/grml-live_20071029.22138/grml_chroot//
618   [...]
619
620 Set up apt-cacher for use with grml-live
621 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
622
623 Make sure /etc/grml/grml-live.conf provides according GRML_LIVE_SOURCES and
624 FAI_DEBOOTSTRAP:
625
626   # cat /etc/grml/grml-live.conf
627   [...]
628   GRML_LIVE_SOURCES="
629   deb http://localhost:3142/deb.grml.org grml-stable  main
630   deb http://localhost:3142/deb.grml.org grml-testing main
631   deb http://localhost:3142/ftp.de.debian.org/debian etch main contrib non-free
632   "
633   [...]
634   FAI_DEBOOTSTRAP="etch http://localhost:3142/ftp.de.debian.org/debian etch main contrib non-free"
635
636 Make sure apt-cacher is running (/etc/init.d/apt-cacher restart). That's it.
637 All downloaded files will be cached in /var/cache/apt-cacher/ now.
638
639 Set up approx for use with grml-live
640 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
641
642 Make sure /etc/grml/grml-live.conf provides according GRML_LIVE_SOURCES and
643 FAI_DEBOOTSTRAP:
644
645   # cat /etc/grml/grml-live.conf
646   [...]
647   GRML_LIVE_SOURCES="
648   deb http://localhost:9999/grml            grml-stable  main
649   deb http://localhost:9999/grml            grml-testing main
650   deb http://localhost:9999/debian etch     main contrib non-free
651   "
652   FAI_DEBOOTSTRAP="etch http://localhost:9999/debian"
653
654 Configure approx:
655
656   # cat /etc/approx/approx.conf
657   [...]
658   debian http://ftp.at.debian.org/debian
659   grml   http://deb.grml.org/
660
661 Don't forget to restart approx (/etc/init.d/approx restart). That's it.
662 All downloaded files will be cached in /var/cache/approx now.
663
664 I've a question which isn't answered by this document
665 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
666
667 Don't hesitate to ask on IRC (channel #grml on irc.freenode.org) or just drop me
668 a mail: <mika@grml.org>
669
670 Download / install grml-live as a Debian package
671 ------------------------------------------------
672
673 Debian packages are available through the grml-repository at
674 link:http://deb.grml.org/pool/main/g/grml-live/[deb.grml.org].  If you want to
675 build a Debian package on your own (using for example a specific version or the
676 current development tree), just execute:
677
678   git clone git://git.grml.org/grml-live
679   cd grml-live
680   debuild -us -uc
681
682 Source
683 ------
684
685 The source of grml-live is available at
686 link:http://git.grml.org/?p=grml-live.git[http://git.grml.org/?p=grml-live.git]
687
688 TODO list
689 ---------
690
691 Check out link:http://wiki.grml.org/doku.php?id=grml-live[grml-live in the grml-wiki]
692 for details.
693
694 Bugs
695 ----
696
697 Please report feedback, link:http://grml.org/bugs/[bugreports] and wishes
698 link:http://grml.org/contact/[to the grml-team]!
699
700 Authors
701 -------
702 Michael Prokop <mika@grml.org>
703
704 /////////////////////////////////////
705 // vim:ai tw=80 ft=asciidoc expandtab
706 /////////////////////////////////////