<div class="sect1">\r
<h2 id="_synopsis">2. Synopsis</h2>\r
<div class="sectionbody">\r
-<div class="paragraph"><p>grml-live [-a <architecture>] [-c <classe[s]>] [-C <configfile>] [-g\r
-<grml_name>] [-i <iso_name> ] [-o <output_directory>] [-r <release_name>] [-s\r
-<suite>] [-t <template_directory>] [-v <version_number>] [-U <username>] [\r
+<div class="paragraph"><p>grml-live [-a <architecture>] [-c <classe[s]>] [-C <configfile>] [\r
+-e <extract_iso_name>] [-g <grml_name>] [-i <iso_name>] [\r
+-o <output_directory>] [-r <release_name>] [-s <suite>] [\r
+-t <template_directory>] [-v <version_number>] [-U <username>] [\r
-AbBFnNqQuVz]</p></div>\r
</div>\r
</div>\r
</dt>\r
<dd>\r
<p>\r
-Clean up output directories before attempting the build. Packs the chroot\r
-into a tar archive, and removes chroot and ISO build directories before exiting.\r
+Clean up all output directories before running the build process. After finishing,\r
+clean up the Chroot target and Build target directories.\r
</p>\r
</dd>\r
<dt class="hdlist1">\r
</p>\r
</dd>\r
<dt class="hdlist1">\r
+-e <strong>EXTRACT_ISO_NAME</strong>\r
+</dt>\r
+<dd>\r
+<p>\r
+The squashfs inside the specified ISO will be extracted and used as the chroot.\r
+This option is useful for remastering, in combination with -A and -b or -u.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
-F\r
</dt>\r
<dd>\r
</p>\r
</dd>\r
<dt class="hdlist1">\r
--T <strong>CHROOT_ARCHIVE</strong>\r
-</dt>\r
-<dd>\r
-<p>\r
-Unpack chroot tar archive before starting. Most useful in combination with\r
--A and -b or -u.\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-u\r
</dt>\r
<dd>\r
<td class="icon">\r
<img src="./images/icons/note.png" alt="Note" />\r
</td>\r
-<td class="content">If you have enough free space inside /dev/shm (being a tmpfs, usually you should\r
-have >=1GB of RAM) just run "mount -o remount,suid,dev,rw /dev/shm" and use\r
-/dev/shm as build and output directory - resulting in very fast build process.\r
-But please be aware of the fact that rebooting your system will result in an\r
-empty /dev/shm, so please use another directory for $CHROOT_OUTPUT,\r
-$BUILD_OUTPUT and $ISO_OUTPUT if you plan to create more persistent output. :)</td>\r
+<td class="content">If you have enough RAM, just run "mount -t tmpfs none /media/ramdisk" to get a\r
+tmpfs ("RAMDISK"), and use /media/ramdisk as build and output directory - this\r
+results in a very fast build process. Note that these files will be gone when\r
+rebooting.</td>\r
</tr></table>\r
</div>\r
</div>\r
<div class="paragraph"><p>The easiest way to get a running grml-live setup is to just use Grml.\r
Of course using grml-live on a plain, original Debian installation is supported\r
as well. So there we go.</p></div>\r
-<div class="paragraph"><p>What we have: plain, original Debian squeeze (6.0).</p></div>\r
+<div class="paragraph"><p>What we have: plain, original Debian squeeze (6.0) with debian-backports\r
+enabled. (This is important for squashfs-tools.)</p></div>\r
<div class="paragraph"><p>What we want: build a Grml ISO based on Debian/wheezy for the amd64 architecture\r
using grml-live.</p></div>\r
<div class="sect3">\r
</div></div>\r
<div class="literalblock">\r
<div class="content">\r
-<pre><tt># adjust apt-pinning (only prefer squashfs stuff from grml):\r
-cat >> /etc/apt/preferences << EOF\r
-Package: *\r
-Pin: origin deb.grml.org\r
-Pin-Priority: 1</tt></pre>\r
-</div></div>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><tt>Package: squashfs-tools\r
-Pin: origin deb.grml.org\r
-Pin-Priority: 996\r
-EOF</tt></pre>\r
-</div></div>\r
-<div class="literalblock">\r
-<div class="content">\r
<pre><tt># get keyring for apt:\r
apt-get update\r
apt-get --allow-unauthenticated install grml-debian-keyring</tt></pre>\r
<pre><tt># optionally(!) install basefile so we don't have to build basic\r
# chroot from scratch, grab from http://daily.grml.org/\r
# mkdir -p /etc/grml/fai/config/basefiles/\r
-# mv base.tgz /etc/grml/fai/config/basefiles/I386.tar.gz\r
-# mv base64.tgz /etc/grml/fai/config/basefiles/AMD64.tar.gz</tt></pre>\r
+# mv I386.tar.gz /etc/grml/fai/config/basefiles/\r
+# mv AMD64.tar.gz /etc/grml/fai/config/basefiles/</tt></pre>\r
</div></div>\r
<div class="literalblock">\r
<div class="content">\r
<pre><tt># install relevant tools\r
-# please check out http://grml.org/grml-live/#current_state when encountering problems!\r
-apt-get -o APT::Install-Recommends=false install grml-live squashfs-tools</tt></pre>\r
+apt-get install -t squeeze-backports squashfs-tools\r
+apt-get --no-install-recommends install grml-live</tt></pre>\r
</div></div>\r
<div class="literalblock">\r
<div class="content">\r
</div></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="create-a-base-tgz">13.8. How do I create a base.tgz for use as NFSROOT?</h3>\r
-<div class="paragraph"><p>First of all build the chroot system:</p></div>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><tt>mkdir /tmp/nfsroot && cd /tmp/nfsroot\r
-debootstrap squeeze /tmp/nfsroot/ http://cdn.debian.net/debian\r
-tar zcf base.tgz ./</tt></pre>\r
-</div></div>\r
-<div class="paragraph"><p>Then check out where your NFSROOT is located:</p></div>\r
+<h3 id="create-a-base-tgz">13.8. How do I create a base.tgz?</h3>\r
+<div class="paragraph"><p>First of all create the chroot using debootstrap:</p></div>\r
<div class="literalblock">\r
<div class="content">\r
-<pre><tt># grep '^NFSROOT' /etc/grml/fai/make-fai-nfsroot.conf\r
-NFSROOT=/grml/fai/nfsroot</tt></pre>\r
+<pre><tt>BASECHROOT='/tmp/basefile'\r
+debootstrap squeeze "$BASECHROOT" http://cdn.debian.net/debian\r
+tar -C "$BASECHROOT" --exclude='var/cache/apt/archives/*.deb' -zcf base.tar.gz ./</tt></pre>\r
</div></div>\r
-<div class="paragraph"><p>So as /grml/fai/nfsroot is your NFSROOT place the file under\r
-/grml/fai/nfsroot/live/filesystem.dir/var/tmp/:</p></div>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><tt>mv base.tgz /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz</tt></pre>\r
-</div></div>\r
-<div class="paragraph"><p>or even better use /etc/grml/fai/config/basefiles/$CLASSNAME.tar.gz instead.\r
-Use I386 as $CLASSNAME for i386 builds and AMD64 for amd64 builds.</p></div>\r
-<div class="paragraph"><p>Now running "grml-live …" will use this file as main system instead of\r
-executing debootstrap. Check out the output for the following lines if using\r
-NFSROOT:</p></div>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><tt>[...]\r
-Calling task_extrbase\r
-Unpacking Debian base archive\r
-Extracting /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz\r
-Calling task_mirror\r
-[...]</tt></pre>\r
-</div></div>\r
-<div class="paragraph"><p>or if using /etc/grml/fai/config/basefiles/$CLASSNAME.tar.gz for:</p></div>\r
+<div class="admonitionblock">\r
+<table><tr>\r
+<td class="icon">\r
+<img src="./images/icons/tip.png" alt="Tip" />\r
+</td>\r
+<td class="content">By default debootstrap builds a chroot matching the architecture of the running\r
+host system. If you’re using an amd64 system and want to build an i386 base.tgz\r
+then invoke debootstrap using the <em>--arch i386</em> option. Disclaimer: building an\r
+AMD64 base.tgz won’t work if you are using a 32bit kernel system of course.</td>\r
+</tr></table>\r
+</div>\r
+<div class="paragraph"><p>Then move the base.tar.gz to /etc/grml/fai/config/basefiles/$CLASSNAME.tar.gz.\r
+Use e.g. I386 as $CLASSNAME for i386 chroots and AMD64 for amd64 chroots.</p></div>\r
+<div class="paragraph"><p>Now executing grml-live should use this file as base system instead of executing\r
+debootstrap. Check out the output for something like:</p></div>\r
<div class="literalblock">\r
<div class="content">\r
<pre><tt>[...]\r
-ftar: extracting /etc/grml/fai/config/basefiles///AMD64.tar.gz to\r
-/grml-live/grml-live_20071029.22138/grml_chroot//\r
+ftar: extracting //etc/grml/fai/config/basefiles///AMD64.tar.gz to /srv/grml64_testing/grml_chroot//\r
[...]</tt></pre>\r
</div></div>\r
<div class="admonitionblock">\r
that it needs to be uppercase letters matching the class names, so: AMD64.tar.gz\r
for amd64 and I386.tar.gz for i386).</p></div>\r
</div>\r
-<div class="sect2">\r
-<h3 id="autobuild">13.12. How do I set up an autobuild environment?</h3>\r
-<div class="paragraph"><p>If you want to set up a system like <a href="http://daily.grml.org/">daily.grml.org</a>\r
-the Debian package grml-live-buildd provides all you need to start. Start with\r
-figuring out the cron job script /usr/share/grml-live/buildd/cronjob.sh.</p></div>\r
-<div class="paragraph"><p>If you want to automatically update the grml-live Debian package on your build\r
-system based on the git tree of grml-live (so you get bleeding edge of\r
-development which might is interesting for services like daily.grml.org) the\r
-provided release_helper.sh script provides everything you need. Execute as root:</p></div>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><tt>echo "deb file:/home/grml-live-git/grml-live.build-area/ ./" >> /etc/apt/sources.list.d/grml-live.list\r
-adduser --disabled-login --disabled-password grml-live-git</tt></pre>\r
-</div></div>\r
-<div class="paragraph"><p>Execute <em>visudo</em> to update sudo configuration and add the following line:</p></div>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><tt>grml-live-git ALL=NOPASSWD: /usr/bin/apt-get</tt></pre>\r
-</div></div>\r
-<div class="paragraph"><p>Switch to user grml-live-git and configure the rest:</p></div>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><tt>su - grml-live-git\r
-mkdir grml-live.build-area\r
-git clone git://git.grml.org/grml-live.git\r
-git config --global user.name "Grml-Live Git Autobuild"\r
-git config --global user.email "grml-live-git@$(hostname)"</tt></pre>\r
-</div></div>\r
-<div class="paragraph"><p>Finally install a cron job (as user grml-live-git) like:</p></div>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><tt>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</tt></pre>\r
-</div></div>\r
-<div class="paragraph"><p>Tip: To find out the build date of the installed grml-live package just execute:</p></div>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><tt>% apt-cache policy grml-live | grep 'Installed.*autobuild'\r
- Installed: 0.13.1~autobuild1300450381</tt></pre>\r
-</div></div>\r
-<div class="paragraph"><p>and run "date -ud @$STRING" where $STRING is the number behind the "autobuild",\r
-like:</p></div>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><tt>% date -ud @1300450081\r
-Fri Mar 18 12:08:01 UTC 2011</tt></pre>\r
-</div></div>\r
-</div>\r
</div>\r
</div>\r
<div class="sect1">\r
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2011-12-12 16:10:01 CET\r
+Last updated 2012-01-19 13:18:45 CET\r
</div>\r
</div>\r
</body>\r