X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=docs%2Fgrml-live.txt;h=f5bfbd4ad3b039fc536a7352e75ecaba5441c194;hp=66eb297d337366b109be36ca8a01d85e1c0f6ac9;hb=18de83fa6503c91a261c71ff05a7d407892d63ce;hpb=f6622a66a385587b2dec9524cc7f2a67460cbab6 diff --git a/docs/grml-live.txt b/docs/grml-live.txt index 66eb297..f5bfbd4 100644 --- a/docs/grml-live.txt +++ b/docs/grml-live.txt @@ -89,18 +89,18 @@ So instead of GRML_MEDIUM you can also use GRML_SMALL and GRML_FULL. -C **CONFIGURATION_FILE**:: The specified file is used as configuration file for grml-live. By default -/etc/grml/grml-live.conf is used for main configuration. If a file named +/etc/grml/grml-live.conf is used as default configuration. If a file named /etc/grml/grml-live.local exists it is used as well (sourced after reading -/etc/grml/grml-live.conf to allow overriding settings). As a last option the -specified configuration file is sourced so it is possible to override settings -of /etc/grml/grml-live.conf as well as of /etc/grml/grml-live.local. Please -notice that all configuration files have to be adjusted during execution of -grml-live, so please make sure you use /etc/grml/grml-live.conf as a base for -your own configuration file. Please also notice that the configuration file -specified via this option is **not** (yet) supported inside the -scripts/hooks/classes at /etc/grml/fai/config. Instead use -/etc/grml/grml-live.conf and/or /etc/grml/grml-live.local for configuration -stuff used inside /etc/grml/fai/config. +/etc/grml/grml-live.conf meant as main file for local configuration). As a last +option the specified configuration file is sourced so it is possible to override +settings of /etc/grml/grml-live.conf as well as of /etc/grml/grml-live.local. +Please notice that all configuration files have to be adjusted during execution +of grml-live, so please make sure you use /etc/grml/grml-live.conf as a base for +your own configuration file (usually /etc/grml/grml-live.local). Please also +notice that the configuration file specified via this option is **not** (yet) +supported inside the scripts/hooks/classes at /etc/grml/fai/config. Instead use +/etc/grml/grml-live.local for configuration stuff used inside +/etc/grml/fai/config. -F:: @@ -110,7 +110,7 @@ Force execution and do not prompt for acknowledgment of configuration. Set the grml flavour name. Common usage examples: grml, grml-small, grml64. Please do NOT use blanks and any special characters like '/', ';' inside -GRML_NAME, otherwise you might notice problems with booting. +GRML_NAME, otherwise you might notice problems while booting. -h:: @@ -121,6 +121,12 @@ Display short usage information and exit. Specify name of ISO which will be available inside $OUTPUT_DIRECTORY/grml_isos by default. + -I **CHROOT_INSTALL**:: + +Specify name of source directory which provides files that should become part of +the chroot/ISO. Not enabled by default. Note: the files are installed under '/' +in the chroot so you have to create the rootfs structure on your own. + -o **OUTPUT_DIRECTORY**:: Main output directory of the build process of FAI. Some directories are created @@ -143,7 +149,7 @@ Specify name of the release. Specify the Debian suite you want to use for your live-system. Defaults to "lenny" (being current Debian/stable). Supported values are: etch, lenny, sid. Debian "squeeze" (current Debian/testing) requires base.tgz -(/etc/grml/fai/config/basefiles/....tar.gz) until it's supported by debootstrap. +(/etc/grml/fai/config/basefiles/....tar.gz) or a recent version of debootstrap. -t **TEMPLATE_DIRECTORY**:: @@ -167,6 +173,7 @@ Increase verbosity in the build process. Use ZLIB instead of LZMA compression in mksquashfs part of the build process. +[[usage-examples]] Usage examples -------------- @@ -200,6 +207,7 @@ process. But please be aware of the fact that rebooting your system will result in an empty /dev/shm, so please use another directory for $CHROOT_OUTPUT, $BUILD_OUTPUT and $ISO_OUTPUT if you plan to create more persistent output. :) +[[main-features]] Main features of grml-live -------------------------- @@ -216,6 +224,7 @@ Debian repositories * multi-arch support (work in progress) +[[class-concept]] The class concept ----------------- @@ -242,9 +251,9 @@ files/directories. If you want to use your own configuration, extend an existing configuration and/or add additional packages to your ISO just invent a new class (or extend an existing one). For example if you want to use your own class named "FOOBAR" just -extend CLASSES="GRMLBASE,GRML_SMALL,I386" inside /etc/grml/grml-live.conf to -CLASSES="GRMLBASE,GRML_SMALL,I386,FOOBAR" or invoke grml-live using the classes -option: "grml-live -c GRMLBASE,GRML_SMALL,I386,FOOBAR ...". +set CLASSES="GRMLBASE,GRML_SMALL,I386" inside /etc/grml/grml-live.local or +invoke grml-live using the classes option: "grml-live -c +GRMLBASE,GRML_SMALL,I386,FOOBAR ...". More details regarding the class concept can be found in the documentation of FAI itself (being available at /usr/share/doc/fai-doc/). @@ -300,6 +309,7 @@ official grml release * XORG: providing important packages for use with a base grml-featured X.org setup +[[files]] Files ----- @@ -318,8 +328,17 @@ Script for the main build process. Requires root permissions for execution. /etc/grml/grml-live.conf -Main configuration file for grml-live. All the important steps can be configured -at this stage. +Main configuration file for grml-live which should be considered as a reference +configuration file only. Please use /etc/grml/grml-live.local for local +configuration instead. + + /etc/grml/grml-live.local + +All the local configuration should go to this file. This file overrides any +defaults of grml-live. Configurations via /etc/grml/grml-live.local are prefered +over the ones from /etc/grml/grml-live.conf. If you want to override settings +from /etc/grml/grml-live.local as well you have to specify them on the grml-live +commandline. /etc/grml/fai/fai.conf @@ -395,6 +414,7 @@ files please refer to the source of the scripts. This directory provides the files used for building the initramfs/initrd via live-initramfs(8). +[[log-files]] Available log files ------------------- @@ -409,12 +429,16 @@ default being /var/log/fai/grml/. If you are using the grml-live buildd you will find the logs of the grml-live run at /var/log/grml-buildd.stdout and /var/log/grml-buildd.stderr. +[[requirements]] Requirements for the build system --------------------------------- -* any Debian based system should be sufficient (if not it's a bug, so please -send us a bug report then) [a usual link:http://grml.org/grml2hd/[grml2hd] -harddisk installation ships all you need] +* any Debian based system should be sufficient (if it doesn't work it's a bug, +please send us a bug report then) [a usual +link:http://grml.org/grml2hd/[grml2hd] harddisk installation (using grml or +grml-medium) ships all you need]. Check out <> for details how to set up grml-live +on a plain, original Debian system. * enough free disk space; at least 800MB are required for a minimal grml-live run (\~400MB for the chroot [$CHROOT_OUTPUT], \~150MB for the build target @@ -436,45 +460,28 @@ Current state of grml-live with squashfs-tools and kernel To make it easier to track problems this section documents current state of grml-live playing together with squashfs-tools / squashfs-lzma-tools (for building the compressed file) and the kernel version. Documentation of this -section is up2date by 02nd of december 2008, please report any bugs you +section is up2date by 04nd of august 2009, please report any bugs you encounter. -System -~~~~~~ - -* grml-live, version 0.9.6 - -* building grml-medium (Debian/unstable) - -* software versions used in the ISO (being installed automatically, recorded -just as a reference): - - ii busybox 1:1.10.2-2 Tiny utilities for small and embedded systems - ii initramfs-tools 0.92f.grml01 tools for generating an initramfs - ii klibc-utils 1.5.12-2 small utilities built with klibc for early boot - ii live-initramfs 1.139.1-4grml.03 Debian Live initramfs hook - ii lvm2 2.02.39-2 The Linux Logical Volume Manager - ii mdadm 2.6.7.1-1 tool to administer Linux MD arrays (software RAID) - ii udev 0.125-6grml0 /dev/ and hotplug management daemon - Using squashfs-lzma-tools 3.3-1 on the build system ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -squashfs-lzma-tools from the grml repository supports kernel 2.6.26-grml[64] -(version >=grml.05) using both lzma and zlib (-nolzma) compression. It's the +squashfs-lzma-tools from the grml repository supports kernel 2.6.26-grml[64] and +2.6.28-grml[64] using both lzma and zlib (-nolzma) compression. It's the recommended package for building ISOs with grml-live currently! The packages can be downloaded from link:http://deb.grml.org/pool/main/s/squashfs-lzma/[http://deb.grml.org/pool/main/s/squashfs-lzma/]. [NOTE] -Please use squashfs-lzma-tools 3.3-1 if you want to remaster release 2008.11 of grml. +Please use squashfs-lzma-tools 3.3-1 if you want to remaster grml release +2008.11 or 2009.05. Using squashfs-tools 1:3.3-7 on the build system ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -squashfs-tools 1:3.3-7 is available via Debian/unstable and Debian/testing -(lenny) pool running: +squashfs-tools 1:3.3-7 is available via the official Debian/unstable and +Debian/testing (Lenny) pool running: # aptitude install squashfs-tools=1:3.3-7 @@ -483,15 +490,17 @@ http://grml.org/squashfs/squashfs-tools_3.3-7_i386.deb (for x86) or http://grml.org/squashfs/squashfs-tools_3.3-7_amd64.deb (for amd64) [both build on and for Debian/etch but working with testing and unstable as well]. -Please notice that squashfs-tools 1:3.3-7 does NOT support LZMA compression -at all (so you won't be able to remaster release 2008.11 for example). The --nolzma option of mksquashfs is not available therefore (even though -grml-live will deactivate it for you automatically anyway). Please use +Please notice that squashfs-tools 1:3.3-7 does NOT support LZMA compression at +all (so you won't be able to remaster release 2008.11 and 2009.05 using LZMA for +example). The -nolzma option of mksquashfs is not available therefore (even +though grml-live will deactivate it for you automatically anyway). Please use squashfs-lzma-tools instead. * Kernel 2.6.23-grml: does NOT work, please use squashfs-tools 1:3.2r2-9exp1 - instead if you still want to use kernel 2.6.23 -* Kernel 2.6.26-grml: works (without LZMA compression of course!) + instead if you still want to use kernel 2.6.23 (not + recommended) +* Kernel 2.6.26-grml: works (without LZMA compression only of course!) +* Kernel 2.6.28-grml: works (without LZMA compression only of course!) Using squashfs-tools 1:3.2r2-9exp1 on the build system ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -505,21 +514,126 @@ or directly via downloading the files http://grml.org/squashfs/squashfs-tools_3.2r2-9exp1_i386.deb (for x86) or http://grml.org/squashfs/squashfs-tools_3.2r2-9exp1_amd64.deb (for amd64). -Versions with ZLIB compression (SQUASHFS_OPTIONS='-nolzma' or -z +Using with ZLIB compression (SQUASHFS_OPTIONS='-nolzma' or -z option in grml-live cmdline): * Kernel 2.6.23-grml: works * Kernel 2.6.26-grml: works +* Kernel 2.6.28-grml: supposed to work (not verified though) -Versions with LZMA compression: +Using with LZMA compression: * Kernel 2.6.23-grml: works * Kernel 2.6.26-grml: does NOT work, please use zlib mode instead or switch to Debian package squashfs-lzma-tools (see section above). +* Kernel 2.6.28-grml: does NOT work, please use zlib mode instead or switch + to Debian package squashfs-lzma-tools (see section above). +[[faq]] FAQ --- +[[deploy-on-debian]] +How do I deploy grml-live on a plain Debian installation? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The easiest way to get a running grml-live setup is to install grml or +grml-medium using grml2hd (for example inside KVM, Virtualbox, VMware,... if you +don't want to run it on a physical system). Of course using grml-live on a +plain, original Debian installation is supported as well. So there we go. + +What we have: plain, original Debian Lenny (5.0). + +What we want: build a grml-medium ISO based on Debian/squeeze for the i386 +architecture using grml-live. + +[IMPORTANT] + +If you encounter any problems while booting the resulting ISO please be aware of +<>. + +Instructions +^^^^^^^^^^^^ + + # adjust sources.list: + cat >> /etc/apt/sources.list << EOF + + # grml stable repository: + deb http://deb.grml.org/ grml-stable main + deb-src http://deb.grml.org/ grml-stable main + + # grml testing/development repository: + deb http://deb.grml.org/ grml-testing main + deb-src http://deb.grml.org/ grml-testing main + EOF + + # adjust apt-pinning (only prefer squashfs stuff from grml): + cat >> /etc/apt/preferences << EOF + Package: * + Pin: origin deb.grml.org + Pin-Priority: 1 + + Package: squashfs-tools + Pin: origin deb.grml.org + Pin-Priority: 996 + + Package: squashfs-lzma-tools + Pin: origin deb.grml.org + Pin-Priority: 996 + EOF + + # get keyring for apt: + apt-get update + apt-get --allow-unauthenticated install grml-debian-keyring + + # install basefile so we don't have to build basic chroot from scratch: + mkdir -p /etc/grml/fai/config/basefiles/ + mv base.tgz /etc/grml/fai/config/basefiles/I386.tar.gz + + # install relevant tools: + apt-get -o APT::Install-Recommends=false install grml-live squashfs-lzma-tools + + # adjust grml-live configuration for our needs: + cat > /etc/grml/grml-live.local << EOF + # consider using lzma only for space reasons (resulting in longer + # build time but smaller ISO): + SQUASHFS_OPTIONS="-nolzma" + # install local files into the chroot + CHROOT_INSTALL="/etc/grml/fai/chroot_install" + ## adjust if necessary (defaults to /grml/grml-live): + ## OUTPUT="/srv/grml-live" + FAI_DEBOOTSTRAP="squeeze http://ftp.de.debian.org/debian/" + ARCH="i386" + CLASSES="GRMLBASE,GRML_MEDIUM,I386" + ZERO_LOGFILE='1' + # ZERO_FAI_LOGFILE='1' + GRML_LIVE_SOURCES=" + deb http://deb.grml.org/ grml-stable main + deb http://deb.grml.org/ grml-testing main + deb http://ftp.de.debian.org/debian squeeze main contrib non-free + " + EOF + + # just optional(!) - upgrade FAI to latest available version: + cat >> /etc/apt/sources.list << EOF + # fai: + deb http://www.informatik.uni-koeln.de/fai/download lenny koeln + EOF + + # get gpg key of FAI repos and install current FAI version: + gpg -a --recv-keys AB9B66FD; gpg -a --export AB9B66FD | apt-key add - + apt-get update + apt-get install fai-client fai-server fai-doc + +That's it. Now invoking 'grml-live -V' should build the ISO. If everything +worked as expected the last line of the shell output should look like: + + [*] Successfully finished execution of grml-live [running 687 seconds] + +and the ISO can be found inside /grml-live/grml-live/grml_isos/ then. + +[[fai-on-etch]] Help, I'm using Debian etch and I don't have FAI version >3.2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -531,18 +645,39 @@ Help, I'm using Debian etch and I don't have FAI version >3.2 or check out the link:http://www.informatik.uni-koeln.de/fai/[FAI-homepage] for further details. +[[how-to-debug]] I've problems with the build process. How to start debugging? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Check out the logs inside /var/log/fai/... If you don't have the time to debug -the problem in further detail or don't know how to proceed just send a copy of -your config, logs and the commandline with a short problem description to -: +Check out the logs inside /var/log/fai/... If you think it's a bug in grml-live +send a copy of your config, logs and the commandline with a short problem +description to : # history | grep grml-live > /etc/grml/grml_live.cmdline # tar zcf grml_live_problem.tar.gz /etc/grml/grml-live.conf \ /etc/grml/grml-buildd.conf /var/log/fai /etc/grml/fai + -> finally mail grml_live_problem.tar.gz to + +If you need help with grml-live or would like to see new features as part of +grml-live you can get commercial support via +link:http://grml-solutions.com/[Grml Solutions]. + +[[install-local-files]] +How to I install further files into the chroot/ISO? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Just point the configuration variable CHROOT_INSTALL to the directory which +provides the files you would like to install. Note that the files are installed +under '/' in the chroot - so you have to create the rootfs structure on your +own. Usage example: + + echo "CHROOT_INSTALL=\$GRML_FAI_CONFIG/chroot_install" >> /etc/grml/grml-live.local + mkdir -p /etc/grml/fai/chroot_install/usr/src/ + wget example.org/foo.tar.gz + mv foo.tar.gz /etc/grml/fai/chroot_install/usr/src/ + grml-live ... +[[local-debian-mirror]] Can I use my own (local) Debian mirror? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -565,6 +700,7 @@ taken as first entry in the generated sources.list so it's prefered over non-local mirrors. Using a fallback mirror (via providing several mirrors in GRML_LIVE_SOURCES as used by default) is a recommended setting. +[[add-additional-debian-packages]] How do I add additional Debian package(s) to my CD/ISO? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -582,6 +718,7 @@ and specify it when invoking grml-live then: # grml-live -c GRMLBASE,GRML_SMALL,I386,MIKA +[[reset-grml-live-configuration]] I fscked up my grml-live configuration. How do I reset it to the defaults? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -598,6 +735,7 @@ good chance to start using it now. Check out 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/] for more details how to maintain /etc using the mercurial VCS. +[[create-a-base-tgz]] How do I create a base.tgz for use as NFSROOT? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -638,6 +776,7 @@ or if using /etc/grml/fai/config/basefiles/$CLASSNAME.tar.gz for: /grml-live/grml-live_20071029.22138/grml_chroot// [...] +[[apt-cacher]] Set up apt-cacher / apt-cacher-ng for use with grml-live ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -658,6 +797,7 @@ Make sure apt-cacher / apt-cacher-ng is running ('/etc/init.d/apt-cacher restart' or '/etc/init.d/apt-cacher-ng restart'). That's it. All downloaded files will be cached in /var/cache/apt-cacher/ or /var/cache/apt-cacher-ng then. +[[approx]] Set up approx for use with grml-live ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -683,12 +823,14 @@ Configure approx: Don't forget to restart approx (/etc/init.d/approx restart). That's it. All downloaded files will be cached in /var/cache/approx now. +[[question]] I've a question which isn't answered by this document ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Don't hesitate to ask on IRC (channel #grml on irc.freenode.org) or just drop me a mail: +[[download]] Download / install grml-live as a Debian package ------------------------------------------------ @@ -701,24 +843,28 @@ current development tree), just execute: cd grml-live debuild -us -uc +[[source]] Source ------ The source of grml-live is available at link:http://git.grml.org/?p=grml-live.git[http://git.grml.org/?p=grml-live.git] +[[todo-list]] TODO list --------- Check out link:http://wiki.grml.org/doku.php?id=grml-live[grml-live in the grml-wiki] for details. +[[bugs]] Bugs ---- Please report feedback, link:http://grml.org/bugs/[bugreports] and wishes link:http://grml.org/contact/[to the grml-team]! +[[authors]] Authors ------- Michael Prokop