1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
\r
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
\r
5 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
\r
6 <meta name="generator" content="AsciiDoc 8.6.4" />
\r
7 <title>grml-autoconfig(1)</title>
\r
8 <style type="text/css">
\r
9 /* Sans-serif font. */
\r
10 h1, h2, h3, h4, h5, h6,
\r
11 div.title, caption.title,
\r
12 thead, p.table.header,
\r
14 span#author, span#revnumber, span#revdate, span#revremark,
\r
16 font-family: Arial,Helvetica,sans-serif;
\r
21 font-family: Georgia,"Times New Roman",Times,serif;
\r
24 /* Monospace font. */
\r
30 margin: 1em 5% 1em 5%;
\r
35 text-decoration: underline;
\r
56 h1, h2, h3, h4, h5, h6 {
\r
59 margin-bottom: 0.5em;
\r
64 border-bottom: 2px solid silver;
\r
81 border: 1px solid silver;
\r
86 margin-bottom: 0.5em;
\r
92 ul > li { color: #aaa; }
\r
93 ul > li > * { color: black; }
\r
107 span#revnumber, span#revdate, span#revremark {
\r
112 border-top: 2px solid silver;
\r
113 padding-top: 0.5em;
\r
118 padding-bottom: 0.5em;
\r
120 div#footer-badges {
\r
122 padding-bottom: 0.5em;
\r
127 margin-bottom: 1.5em;
\r
129 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
\r
130 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
\r
131 div.admonitionblock {
\r
133 margin-bottom: 1.5em;
\r
135 div.admonitionblock {
\r
137 margin-bottom: 2.0em;
\r
142 div.content { /* Block element content. */
\r
146 /* Block element titles. */
\r
147 div.title, caption.title {
\r
152 margin-bottom: 0.5em;
\r
158 td div.title:first-child {
\r
161 div.content div.title:first-child {
\r
164 div.content + div.title {
\r
168 div.sidebarblock > div.content {
\r
169 background: #ffffee;
\r
170 border: 1px solid #dddddd;
\r
171 border-left: 4px solid #f0f0f0;
\r
175 div.listingblock > div.content {
\r
176 border: 1px solid #dddddd;
\r
177 border-left: 5px solid #f0f0f0;
\r
178 background: #f8f8f8;
\r
182 div.quoteblock, div.verseblock {
\r
183 padding-left: 1.0em;
\r
184 margin-left: 1.0em;
\r
186 border-left: 5px solid #f0f0f0;
\r
190 div.quoteblock > div.attribution {
\r
191 padding-top: 0.5em;
\r
195 div.verseblock > pre.content {
\r
196 font-family: inherit;
\r
197 font-size: inherit;
\r
199 div.verseblock > div.attribution {
\r
200 padding-top: 0.75em;
\r
203 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
\r
204 div.verseblock + div.attribution {
\r
208 div.admonitionblock .icon {
\r
209 vertical-align: top;
\r
212 text-decoration: underline;
\r
214 padding-right: 0.5em;
\r
216 div.admonitionblock td.content {
\r
217 padding-left: 0.5em;
\r
218 border-left: 3px solid #dddddd;
\r
221 div.exampleblock > div.content {
\r
222 border-left: 3px solid #dddddd;
\r
223 padding-left: 0.5em;
\r
226 div.imageblock div.content { padding-left: 0; }
\r
227 span.image img { border-style: none; }
\r
228 a.image:visited { color: white; }
\r
232 margin-bottom: 0.8em;
\r
237 font-style: normal;
\r
240 dd > *:first-child {
\r
245 list-style-position: outside;
\r
248 list-style-type: decimal;
\r
251 list-style-type: lower-alpha;
\r
254 list-style-type: upper-alpha;
\r
257 list-style-type: lower-roman;
\r
260 list-style-type: upper-roman;
\r
263 div.compact ul, div.compact ol,
\r
264 div.compact p, div.compact p,
\r
265 div.compact div, div.compact div {
\r
267 margin-bottom: 0.1em;
\r
270 div.tableblock > table {
\r
271 border: 3px solid #527bbd;
\r
273 thead, p.table.header {
\r
286 /* Because the table frame attribute is overriden by CSS in most browsers. */
\r
287 div.tableblock > table[frame="void"] {
\r
288 border-style: none;
\r
290 div.tableblock > table[frame="hsides"] {
\r
291 border-left-style: none;
\r
292 border-right-style: none;
\r
294 div.tableblock > table[frame="vsides"] {
\r
295 border-top-style: none;
\r
296 border-bottom-style: none;
\r
302 margin-bottom: 0.8em;
\r
305 padding-bottom: 15px;
\r
307 dt.hdlist1.strong, td.hdlist1.strong {
\r
311 vertical-align: top;
\r
312 font-style: normal;
\r
313 padding-right: 0.8em;
\r
317 vertical-align: top;
\r
319 div.hdlist.compact tr {
\r
325 background: yellow;
\r
328 .footnote, .footnoteref {
\r
332 span.footnote, span.footnoteref {
\r
333 vertical-align: super;
\r
337 margin: 20px 0 20px 0;
\r
338 padding: 7px 0 0 0;
\r
341 #footnotes div.footnote {
\r
347 border-top: 1px solid silver;
\r
356 padding-right: 0.5em;
\r
357 padding-bottom: 0.3em;
\r
358 vertical-align: top;
\r
360 div.colist td img {
\r
365 div#footer-badges { display: none; }
\r
369 margin-bottom: 2.5em;
\r
377 margin-bottom: 0.1em;
\r
380 div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
\r
397 span.aqua { color: aqua; }
\r
398 span.black { color: black; }
\r
399 span.blue { color: blue; }
\r
400 span.fuchsia { color: fuchsia; }
\r
401 span.gray { color: gray; }
\r
402 span.green { color: green; }
\r
403 span.lime { color: lime; }
\r
404 span.maroon { color: maroon; }
\r
405 span.navy { color: navy; }
\r
406 span.olive { color: olive; }
\r
407 span.purple { color: purple; }
\r
408 span.red { color: red; }
\r
409 span.silver { color: silver; }
\r
410 span.teal { color: teal; }
\r
411 span.white { color: white; }
\r
412 span.yellow { color: yellow; }
\r
414 span.aqua-background { background: aqua; }
\r
415 span.black-background { background: black; }
\r
416 span.blue-background { background: blue; }
\r
417 span.fuchsia-background { background: fuchsia; }
\r
418 span.gray-background { background: gray; }
\r
419 span.green-background { background: green; }
\r
420 span.lime-background { background: lime; }
\r
421 span.maroon-background { background: maroon; }
\r
422 span.navy-background { background: navy; }
\r
423 span.olive-background { background: olive; }
\r
424 span.purple-background { background: purple; }
\r
425 span.red-background { background: red; }
\r
426 span.silver-background { background: silver; }
\r
427 span.teal-background { background: teal; }
\r
428 span.white-background { background: white; }
\r
429 span.yellow-background { background: yellow; }
\r
431 span.big { font-size: 2em; }
\r
432 span.small { font-size: 0.6em; }
\r
434 <script type="text/javascript">
\r
436 window.onload = function(){asciidoc.footnotes();}
\r
437 var asciidoc = { // Namespace.
\r
439 /////////////////////////////////////////////////////////////////////
\r
440 // Table Of Contents generator
\r
441 /////////////////////////////////////////////////////////////////////
\r
443 /* Author: Mihai Bazon, September 2002
\r
444 * http://students.infoiasi.ro/~mishoo
\r
446 * Table Of Content generator
\r
449 * Feel free to use this script under the terms of the GNU General Public
\r
450 * License, as long as you do not remove or alter this notice.
\r
453 /* modified by Troy D. Hanson, September 2006. License: GPL */
\r
454 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
\r
456 // toclevels = 1..4.
\r
457 toc: function (toclevels) {
\r
459 function getText(el) {
\r
461 for (var i = el.firstChild; i != null; i = i.nextSibling) {
\r
462 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
\r
464 else if (i.firstChild != null)
\r
465 text += getText(i);
\r
470 function TocEntry(el, text, toclevel) {
\r
473 this.toclevel = toclevel;
\r
476 function tocEntries(el, toclevels) {
\r
477 var result = new Array;
\r
478 var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
\r
479 // Function that scans the DOM tree for header elements (the DOM2
\r
480 // nodeIterator API would be a better technique but not supported by all
\r
482 var iterate = function (el) {
\r
483 for (var i = el.firstChild; i != null; i = i.nextSibling) {
\r
484 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
\r
485 var mo = re.exec(i.tagName);
\r
486 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
\r
487 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
\r
497 var toc = document.getElementById("toc");
\r
498 var entries = tocEntries(document.getElementById("content"), toclevels);
\r
499 for (var i = 0; i < entries.length; ++i) {
\r
500 var entry = entries[i];
\r
501 if (entry.element.id == "")
\r
502 entry.element.id = "_toc_" + i;
\r
503 var a = document.createElement("a");
\r
504 a.href = "#" + entry.element.id;
\r
505 a.appendChild(document.createTextNode(entry.text));
\r
506 var div = document.createElement("div");
\r
507 div.appendChild(a);
\r
508 div.className = "toclevel" + entry.toclevel;
\r
509 toc.appendChild(div);
\r
511 if (entries.length == 0)
\r
512 toc.parentNode.removeChild(toc);
\r
516 /////////////////////////////////////////////////////////////////////
\r
517 // Footnotes generator
\r
518 /////////////////////////////////////////////////////////////////////
\r
520 /* Based on footnote generation code from:
\r
521 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
\r
524 footnotes: function () {
\r
525 var cont = document.getElementById("content");
\r
526 var noteholder = document.getElementById("footnotes");
\r
527 var spans = cont.getElementsByTagName("span");
\r
530 for (i=0; i<spans.length; i++) {
\r
531 if (spans[i].className == "footnote") {
\r
533 // Use [\s\S] in place of . so multi-line matches work.
\r
534 // Because JavaScript has no s (dotall) regex flag.
\r
535 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
\r
536 noteholder.innerHTML +=
\r
537 "<div class='footnote' id='_footnote_" + n + "'>" +
\r
538 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
\r
539 n + "</a>. " + note + "</div>";
\r
540 spans[i].innerHTML =
\r
541 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
\r
542 "' title='View footnote' class='footnote'>" + n + "</a>]";
\r
543 var id =spans[i].getAttribute("id");
\r
544 if (id != null) refs["#"+id] = n;
\r
548 noteholder.parentNode.removeChild(noteholder);
\r
550 // Process footnoterefs.
\r
551 for (i=0; i<spans.length; i++) {
\r
552 if (spans[i].className == "footnoteref") {
\r
553 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
\r
554 href = href.match(/#.*/)[0]; // Because IE return full URL.
\r
556 spans[i].innerHTML =
\r
557 "[<a href='#_footnote_" + n +
\r
558 "' title='View footnote' class='footnote'>" + n + "</a>]";
\r
568 <body class="article">
\r
570 <h1>grml-autoconfig(1)</h1>
\r
573 <div class="sect1">
\r
574 <h2 id="_name">Name</h2>
\r
575 <div class="sectionbody">
\r
576 <div class="paragraph"><p>grml-autoconfig - main bootup process of a grml system</p></div>
\r
579 <div class="sect1">
\r
580 <h2 id="_synopsis">Synopsis</h2>
\r
581 <div class="sectionbody">
\r
582 <div class="paragraph"><p>None - it is a framework. See grml-autoconfig(8) for information regarding
\r
583 the interface script.</p></div>
\r
586 <div class="sect1">
\r
587 <h2 id="_introduction">Introduction</h2>
\r
588 <div class="sectionbody">
\r
589 <div class="paragraph"><p>By using the config framework, it is possible to customize Grml’s startup in a
\r
590 multitude of ways. It allows to:</p></div>
\r
591 <div class="ulist"><ul>
\r
594 execute one or more scripts on startup
\r
599 install Debian packages from deb files on startup
\r
604 unpack configuration on startup
\r
608 <div class="paragraph"><p>The combination of Debs, Configuration and Scripts is called DCS in Grml. DCS
\r
609 can be read from the Live Image itself, from an arbitrary file system on the
\r
610 local system which is marked with the volume label GRMLCFG, or from the file
\r
611 system pointed to by the myconfig boot parameter.</p></div>
\r
612 <div class="paragraph"><p>The DCS handling is controlled by a number of boot parameters.</p></div>
\r
613 <div class="paragraph"><p>The scripts save-config and restore-config can be used to create and handle
\r
614 files called <em>grml configuration archive</em>, abbreviated GCA. save-config stores
\r
615 the running configuration inside a GCA; restore-config is a script to restore a
\r
616 configuration from a GCA.</p></div>
\r
617 <div class="admonitionblock">
\r
620 <div class="title">Tip</div>
\r
622 <td class="content">A GCA is a plain bzip2 compressed tar archive. All the files are generated
\r
623 starting from the root-directory <em>/</em> so it is easy to handle. You can generate
\r
624 configuration archives manually as well. save-config is just a frontend which
\r
625 should make it easier to use.</td>
\r
628 <div class="admonitionblock">
\r
631 <div class="title">Important</div>
\r
633 <td class="content">Starting with Grml release 2009.05 its possible to use root persistency on grml.
\r
634 This means you can store your settings and reuse them on reboot, without having
\r
635 to deal with this config framework. Visit
\r
636 <a href="http://wiki.grml.org/doku.php?id=persistency">http://wiki.grml.org/doku.php?id=persistency</a> for further information.</td>
\r
641 <div class="sect1">
\r
642 <h2 id="current-versions">Behavior in current Grml versions</h2>
\r
643 <div class="sectionbody">
\r
644 <div class="paragraph"><p>This section applies to all Grml versions newer than release 2009.05.</p></div>
\r
645 <div class="paragraph"><p>The central concept of grml-autoconfig is the DCS directory which holds debs,
\r
646 configuration and scripts which are used during system startup.</p></div>
\r
647 <div class="sect2">
\r
648 <h3 id="_determination_of_dcs_directory">Determination of DCS directory</h3>
\r
649 <div class="paragraph"><p>The DCS directory defaults to the root directory of the GRML live image. If a
\r
650 file system labeled GRMLCFG is found, the DCS directory is the root directory of
\r
651 that file system. Alternatively, the myconfig boot parameter can be used to
\r
652 directly specify a device which is then taken as DCS directory
\r
653 (myconfig=/dev/sda1, for example). If your device is labeled different to
\r
654 GRMLCFG the proper label can be set via the autoconfig boot parameter
\r
655 (autoconfig=SOMELABEL, for example).</p></div>
\r
656 <div class="paragraph"><p>Without any additional boot parameters, the GCA at DCSDIR/config.tbz is
\r
657 automatically unpacked and DCSDIR/scrips/grml.sh is automatically executed on
\r
658 system startup. The <em>noautoconfig</em> boot parameter disables this automatic
\r
659 behavior.</p></div>
\r
661 <div class="sect2">
\r
662 <h3 id="_boot_parameters">Boot Parameters</h3>
\r
663 <div class="paragraph"><p>The following boot parameters are supported. Use them at the (isolinux)
\r
664 bootprompt as documented here.</p></div>
\r
665 <div class="dlist"><dl>
\r
666 <dt class="hdlist1">
\r
671 This parameter directly sets DCSDIR to the root directory of the specified
\r
672 device. Usage examples:
\r
674 <div class="literalblock">
\r
675 <div class="content">
\r
676 <pre><tt>myconfig=/dev/sda1 => read DCS from usb-device
\r
677 myconfig=/dev/fd0 => read DCS from floppy-disk</tt></pre>
\r
680 <dt class="hdlist1">
\r
685 This parameter specifies the label used to determine the DCS device.
\r
686 If undefined the label GRMLCFG is used to find the DCS device.
\r
688 <div class="literalblock">
\r
689 <div class="content">
\r
690 <pre><tt>autoconfig=SOMELABEL => search for device labeled SOMELABEL to use as
\r
691 DCS device.</tt></pre>
\r
694 <dt class="hdlist1">
\r
699 This parameter is for setting a specific partition as home directory. Usage
\r
702 <div class="literalblock">
\r
703 <div class="content">
\r
704 <pre><tt>home=/dev/sda3 => use /dev/sda3 as the homepartition
\r
705 home=scan => scan through the available partitions and search
\r
706 for file grml.img</tt></pre>
\r
709 <dt class="hdlist1">
\r
714 This parameter mounts the specified device in read-only mode and tries to
\r
715 copy all files specified in /etc/grml/partconf to the Grml system. This
\r
716 provides the possibility to use the configuration of a harddisk
\r
717 installation. For example using the network configuration (which is
\r
718 specified in /etc/network) is possible using this boot parameter. Usage
\r
721 <div class="literalblock">
\r
722 <div class="content">
\r
723 <pre><tt>partconf=/dev/sda2 => try to mount /dev/sda2 and copy files specified
\r
724 in /etc/grml/partconf to the booted Grml system</tt></pre>
\r
727 <dt class="hdlist1">
\r
732 Use this parameter to restore configuration using wget to download a GCA
\r
733 from the specified destination. You can also add variables to change the
\r
734 file name depending on the host configuration. Predefined and useful
\r
735 variables are $ARCH, $HOSTNAME and $KERNEL. Usage example:
\r
737 <div class="literalblock">
\r
738 <div class="content">
\r
739 <pre><tt>netconfig=server.tld/path/to/config.tbz => restore configuration using wget to download file config.tbz
\r
740 netconfig=server.tld/config-$ARCH.tbz => download config for specified architecture</tt></pre>
\r
743 <dt class="hdlist1">
\r
748 Use this parameter to download and run a script from specified destination:
\r
749 You can also add variables to change the file name depending on the host
\r
750 configuration. Predefined and useful variables are $ARCH, $HOSTNAME and
\r
751 $KERNEL. The environment variable NETSCRIPT is set to the specified URI.
\r
752 This can be used to detect if the script is executed via the netscript bootoption.
\r
755 <div class="literalblock">
\r
756 <div class="content">
\r
757 <pre><tt>netcript=server.tld/path/to/script => download and run script/executable from server
\r
758 netscript=server.tld/script-$HOSTNAME => download and run script/executable for specific host</tt></pre>
\r
761 <dt class="hdlist1">
\r
766 Extract specific directories from the GCA which needs to be specified by
\r
769 <div class="literalblock">
\r
770 <div class="content">
\r
771 <pre><tt>extract=/home/grml => extract only /home/grml from archive
\r
772 extract=/etc => extract only /etc from archive
\r
773 extract=/home/grml/config => extract only $HOME/config from archive</tt></pre>
\r
776 <dt class="hdlist1">
\r
781 This parameter executes scripts. If an optional path is given, it is
\r
782 relative to DCSDIR. If the path points to a file, this single file is
\r
783 executed. If no path is given, it defaults to scripts/grml.sh.
\r
784 If the given name points to a directory, all scripts inside it are
\r
785 executed, but the run-parts name restrictions apply: script names must
\r
786 consist entirely of upper and lower case letters, digits, underscores,
\r
787 and hyphens. Usage examples:
\r
789 <div class="literalblock">
\r
790 <div class="content">
\r
791 <pre><tt>scripts => run script DCSDIR/scripts/grml.sh
\r
792 scripts=foobar.sh => run script foobar.sh in DCSDIR
\r
793 scripts=foobar => run all scripts inside DCSDIR/foobar directory</tt></pre>
\r
796 <dt class="hdlist1">
\r
801 This parameter restores a configuration using a GCA. If an optional path is
\r
802 given, it is relative to DCSDIR. If no path is given, it defaults to
\r
803 DCSDIR/config.tbz. Usage examples:
\r
805 <div class="literalblock">
\r
806 <div class="content">
\r
807 <pre><tt>config => restore configuration using file DCSDIR/config.tbz
\r
808 config=config_foobar.tbz => restore configuration using file DCSDIR/config_foobar.tbz</tt></pre>
\r
811 <dt class="hdlist1">
\r
816 This parameter allows automatic installation of deb packages while booting.
\r
817 The path is relative to DCSDIR, not optional and is a shell wildcard. All
\r
818 Files matching the wildcard are installed in a single dpkg --install call.
\r
819 For backwards compatibility, if no slash is contained in the path, it is
\r
820 taken relative to DCSDIR/debs.
\r
822 <div class="literalblock">
\r
823 <div class="content">
\r
824 <pre><tt>Usage examples:</tt></pre>
\r
826 <div class="literalblock">
\r
827 <div class="content">
\r
828 <pre><tt>debs=*.deb => install all debian packages (suffix .deb) from directory DCSDIR/debs/
\r
829 debs=foo/01*.deb => install all debian packages (suffix .deb) starting with 01 in the filename from directory DCSDIR/foo</tt></pre>
\r
832 <dt class="hdlist1">
\r
837 Search all local partitions and dm devices for file /etc/network/interfaces and
\r
838 copy the directory /etc/network to the grml system and restart networking.
\r
841 <dt class="hdlist1">
\r
846 Deactivate automounting. By default the scripts try to mount a device with
\r
847 label <em>GRMLCFG</em>. If you specify the noautoconfig bootparam this automounting
\r
848 will be deactivated.
\r
850 <div class="literalblock">
\r
851 <div class="content">
\r
852 <pre><tt>noautoconfig => disables auto mounting of label 'GRMLCFG'</tt></pre>
\r
857 <div class="sect2">
\r
858 <h3 id="_permanently_adjust_boot_parameters">Permanently adjust boot parameters</h3>
\r
859 <div class="paragraph"><p>As you probably know you can adjust boot parameters on the bootprompt. You want
\r
860 to set some boot parameters permanently? That’s possible via adding a directory
\r
861 named <em>bootparams</em> to the Grml ISO which has to be located at the root-directory
\r
862 /bootparams/ (note: the directory is known as /live/image/bootparams/ on a
\r
863 <em>running</em> Grml system then). Place a textfile inside the directory containing
\r
864 the boot parameters which should be appended to default ones (this corresponds
\r
865 to booting without any special parameters).</p></div>
\r
866 <div class="literalblock">
\r
867 <div class="content">
\r
868 <pre><tt>mkdir bootparams
\r
869 echo lang=de > bootparams/my_bootparams</tt></pre>
\r
871 <div class="paragraph"><p>Then burn a multisession CD where directory bootparams is located in the root
\r
872 directory of the CD.</p></div>
\r
873 <div class="admonitionblock">
\r
876 <div class="title">Note</div>
\r
878 <td class="content">Not all boot parameters can be used via /bootparams/. This is a limitation of
\r
879 the way the kernel and userspace retrieve boot parameters. Boot parameter
\r
880 regarding the kernel definitely do <strong>NOT</strong> work. Boot parameter related to
\r
881 grml-autoconfig (the main part of the boot process in Grml running in userspace,
\r
882 being all the stuff after startup of udev) are expected to work. Boot parameter
\r
883 related to initrd/initramfs (the part between <em>Searching for GRML file</em> and
\r
884 startup of udev) are <strong>NOT</strong> covered by /bootparams/ as well yet.</td>
\r
887 <div class="admonitionblock">
\r
890 <div class="title">Tip</div>
\r
892 <td class="content">the application k3b (not available on the live-CD but available through the
\r
893 Debian repositories) provides an easy to use interface for doing the
\r
894 multisession task.</td>
\r
898 <div class="sect2">
\r
899 <h3 id="_permanently_adjust_boot_parameters_2">Permanently adjust boot parameters</h3>
\r
900 <div class="paragraph"><p>As you probably know you can adjust boot parameters on the bootprompt. You want
\r
901 to set some boot parameters permanently? That’s possible via adding a directory
\r
902 named <em>bootparams</em> to the Grml ISO which has to be located at the root-directory
\r
903 /bootparams/ (note: the directory is known as /live/image/bootparams/ on a
\r
904 <em>running</em> Grml system then). Place a textfile inside the directory containing
\r
905 the boot parameters which should be appended to default ones (this corresponds
\r
906 to booting without any special parameters).</p></div>
\r
907 <div class="literalblock">
\r
908 <div class="content">
\r
909 <pre><tt>mkdir bootparams
\r
910 echo lang=de > bootparams/my_bootparams</tt></pre>
\r
912 <div class="paragraph"><p>Then burn a multisession CD where directory bootparams is located in the root
\r
913 directory of the CD.</p></div>
\r
914 <div class="admonitionblock">
\r
917 <div class="title">Note</div>
\r
919 <td class="content">Not all boot parameters can be used via /bootparams/. This is a limitation of
\r
920 the way the kernel and userspace retrieve boot parameters. Boot parameter
\r
921 regarding the kernel definitely do <strong>NOT</strong> work. Boot parameter related to
\r
922 grml-autoconfig (the main part of the boot process in Grml running in userspace,
\r
923 being all the stuff after startup of udev) are expected to work. Boot parameter
\r
924 related to initrd/initramfs (the part between <em>Searching for GRML file</em> and
\r
925 startup of udev) are <strong>NOT</strong> covered by /bootparams/ as well yet.</td>
\r
928 <div class="admonitionblock">
\r
931 <div class="title">Tip</div>
\r
933 <td class="content">the application k3b (not available on the live-CD but available through the
\r
934 Debian repositories) provides an easy to use interface for doing the
\r
935 multisession task.</td>
\r
941 <div class="sect1">
\r
942 <h2 id="X7">Usage scenarios</h2>
\r
943 <div class="sectionbody">
\r
944 <div class="sect2">
\r
945 <h3 id="_personal_configuration_files">Personal configuration files</h3>
\r
946 <div class="paragraph"><p>You are a fan of the editor vim? Great. You probably have your own <sub>/.vimrc and
\r
947 want to use it on the Grml system. You also don’t like the default zsh
\r
948 configuration and want to use your own </sub>/.zshrc? How to procede? Copy your
\r
949 .vimrc and .zshrc to $HOME of user <em>grml</em>. Place additional files in
\r
950 $HOME/config. Now create a configuration for your files running:</p></div>
\r
951 <div class="literalblock">
\r
952 <div class="content">
\r
953 <pre><tt>save-config -home -configdir</tt></pre>
\r
955 <div class="paragraph"><p>Now you should have a file named config.tbz containing your configuration files.
\r
956 You can copy the archive to a webserver and restore it via downloading during
\r
957 reboot using the following commandline on bootprompt:</p></div>
\r
958 <div class="literalblock">
\r
959 <div class="content">
\r
960 <pre><tt>grml netconfig=server.tld/path/to/config.tbz</tt></pre>
\r
962 <div class="paragraph"><p>You don’t have network access but own a floppy drive? Copy the file to a floppy
\r
963 disk and boot with:</p></div>
\r
964 <div class="literalblock">
\r
965 <div class="content">
\r
966 <pre><tt>grml myconfig=/dev/fd0</tt></pre>
\r
968 <div class="paragraph"><p>Floppy is to small or to slow? Ok, let’s use a usb device:</p></div>
\r
969 <div class="literalblock">
\r
970 <div class="content">
\r
971 <pre><tt>grml myconfig=/dev/sda1</tt></pre>
\r
974 <div class="sect2">
\r
975 <h3 id="_network_configuration">Network configuration</h3>
\r
976 <div class="paragraph"><p>You need a specific network setup and want to use your own
\r
977 /etc/network/interfaces by default? Generate the configuration archive running
\r
978 the following command as user root:</p></div>
\r
979 <div class="literalblock">
\r
980 <div class="content">
\r
981 <pre><tt>save-config -etc</tt></pre>
\r
983 <div class="paragraph"><p>Now you should have a file named config.tbz containing your configuration files.
\r
984 If you want to use it with a floppy disk copy the file to a floppy and boot via
\r
985 using the following command on bootprompt:</p></div>
\r
986 <div class="literalblock">
\r
987 <div class="content">
\r
988 <pre><tt>grml myconfig=/dev/fd0</tt></pre>
\r
990 <div class="paragraph"><p>Floppy is to small or to slow? Ok, let’s use a usb device:</p></div>
\r
991 <div class="literalblock">
\r
992 <div class="content">
\r
993 <pre><tt>grml myconfig=/dev/sda1</tt></pre>
\r
995 <div class="paragraph"><p>You do have an existing harddisk installation and want to use its configuration?
\r
996 Let’s say the debian system is located in /dev/sda2. You want to use the
\r
997 directory /etc/network. This directory is activated by default in
\r
998 /etc/grml/partconf so we don’t have to do any further work. We just need to
\r
999 activate it via using the following commandline on bootprompt:</p></div>
\r
1000 <div class="literalblock">
\r
1001 <div class="content">
\r
1002 <pre><tt>grml partconf=/dev/sda2</tt></pre>
\r
1005 <div class="sect2">
\r
1006 <h3 id="_automatic_installation_of_debian_packages">Automatic installation of debian packages</h3>
\r
1007 <div class="paragraph"><p>You have a specified debian package named <em>foobar.deb</em> and want to use it with
\r
1008 (therefore: install it on) Grml by default? Notice: this feature is useful
\r
1009 especially for grml-small (a ~100 MB ISO). If you want to use it with the large
\r
1010 version of Grml you might have to overburn the ISO.</p></div>
\r
1011 <div class="paragraph"><p>Let’s assume you have burned the Grml iso to a CD-RW using a commandline like:</p></div>
\r
1012 <div class="literalblock">
\r
1013 <div class="content">
\r
1014 <pre><tt>cdrecord dev=/dev/hdc -v -multi -tao grml_0.5.iso</tt></pre>
\r
1016 <div class="paragraph"><p>Now create a directory named debs and place foobar.deb in it:</p></div>
\r
1017 <div class="literalblock">
\r
1018 <div class="content">
\r
1019 <pre><tt>mkdir debs/ && cp foobar.deb debs/</tt></pre>
\r
1021 <div class="paragraph"><p>Notice: This directory will be located in /live/image after burning the second
\r
1022 session.</p></div>
\r
1023 <div class="paragraph"><p>Now create the second session containing this directory:</p></div>
\r
1024 <div class="literalblock">
\r
1025 <div class="content">
\r
1026 <pre><tt>mkisofs -M grml_0.5.iso -C `cdrecord -msinfo dev=/dev/hdc` -R -o 2nd_session.iso debs</tt></pre>
\r
1028 <div class="paragraph"><p>Finally append the second session to the cd using:</p></div>
\r
1029 <div class="literalblock">
\r
1030 <div class="content">
\r
1031 <pre><tt>cdrecord dev=/dev/hdc -v -multi -tao 2nd_session.iso</tt></pre>
\r
1033 <div class="admonitionblock">
\r
1036 <div class="title">Tip</div>
\r
1038 <td class="content">the application k3b (not available on the live CD but available through the
\r
1039 Debian repositories) provides an easy to use interface for doing the
\r
1040 multisession task.</td>
\r
1043 <div class="paragraph"><p>Now boot from your new personalized Grml CD using the debs parameter:</p></div>
\r
1044 <div class="literalblock">
\r
1045 <div class="content">
\r
1046 <pre><tt>grml debs</tt></pre>
\r
1049 <div class="sect2">
\r
1050 <h3 id="_run_your_own_commands_on_startup">Run your own commands on startup</h3>
\r
1051 <div class="paragraph"><p>You know that booting with <em>grml service=foobar</em> executes /etc/init.d/foobar
\r
1052 when booting Grml. But you want to setup a more complex network configuration,
\r
1053 adjust some other stuff and so on on your own? Just write a script named grml.sh
\r
1054 which does the job and use own of the mentioned bootparams. Let’s say you have
\r
1055 placed grml.sh on your usb device (usb stick) then use the following commandline
\r
1056 on bootprompt:</p></div>
\r
1057 <div class="literalblock">
\r
1058 <div class="content">
\r
1059 <pre><tt>grml myconfig=/dev/sda1</tt></pre>
\r
1061 <div class="paragraph"><p>Or even better: create a floppy disk with label GRMLCFG running:</p></div>
\r
1062 <div class="literalblock">
\r
1063 <div class="content">
\r
1064 <pre><tt>fdformat /dev/fd0 # format the floppy disk if not done already
\r
1065 mkfs.ext2 -L GRMLCFG /dev/fd0 # now create ext2 filesystem with label GRMLCFG on it:</tt></pre>
\r
1067 <div class="admonitionblock">
\r
1070 <div class="title">Tip</div>
\r
1072 <td class="content">several filesystems provide the possibility to provide a label. For
\r
1073 example FAT provides this through: <em>mkfs.vfat -n GRMLCFG /dev/sda1</em> (attention:
\r
1074 this will destroy data on /dev/sda1 of course!). Take a look at the
\r
1075 documentation/manpage of the filesystem you want to use.</td>
\r
1078 <div class="paragraph"><p>Now place your configuration archive (see save-config and the other usage
\r
1079 scenarios) and the script grml.sh on the floppy disk. Now you can boot your
\r
1080 system without specifying any bootparameters on bootprompt because devices
\r
1081 labeled with GRMLCFG are mounted readonly and used by default. If you did not
\r
1082 label your device you can use the device anyway using <em>grml myconfig=/dev/ice</em>
\r
1083 on the bootprompt.</p></div>
\r
1085 <div class="sect2">
\r
1086 <h3 id="_debug_remote_systems">Debug remote systems</h3>
\r
1087 <div class="paragraph"><p>You are responsible for a customer’s system in her data center. The system has
\r
1088 failed and you need to debug from remote, and the remote hands available in the
\r
1089 data center do not have enough knowledge to get Grml booted and configure the
\r
1090 network without external help?</p></div>
\r
1091 <div class="paragraph"><p>If the hard disk of the system is still available, you hopefully have saved a
\r
1092 configuration file with IP address, netmask and default gateway somewhere on
\r
1093 that hard disk. Grml can use the information found on a partition. Take a look
\r
1094 at the <em>partconf</em> boot parameter. Usage example: <em>grml partconf=/dev/sda2</em>
\r
1095 copies files defined in /etc/grml/partconf from /dev/sda2 to the Grml system. As
\r
1096 /etc/network is predefined in /etc/grml/partconf the configuration from
\r
1097 /dev/sda2 will be taken.</p></div>
\r
1098 <div class="paragraph"><p>Or you use a standard Grml medium and have grml read IP address, netmask and
\r
1099 default gateway from another medium like a floppy or an USB stick. Take a look
\r
1100 at the script saveconfig and the boot parameter myconfig.</p></div>
\r
1101 <div class="paragraph"><p>Or you put a grml.iso file on your hard disk (maybe in /boot/grml) or on an USB
\r
1102 stick, use grub to boot from there and place debs, configuration scripts or Grml
\r
1103 configuraton archives alongside the .iso.</p></div>
\r
1107 <div class="sect1">
\r
1108 <h2 id="_bugs">Bugs</h2>
\r
1109 <div class="sectionbody">
\r
1110 <div class="paragraph"><p>If you find a bug please report it. See <a href="http://grml.org/bugs/">http://grml.org/bugs/</a> for details
\r
1111 about how to report bugs.</p></div>
\r
1114 <div class="sect1">
\r
1115 <h2 id="_see_also">See also</h2>
\r
1116 <div class="sectionbody">
\r
1117 <div class="paragraph"><p>grml-autoconfig(8), restore-config(1), save-config(1)</p></div>
\r
1120 <div class="sect1">
\r
1121 <h2 id="_author">Author</h2>
\r
1122 <div class="sectionbody">
\r
1123 <div class="paragraph"><p>(c) 2005++, Michael Prokop <<a href="mailto:mika@grml.org">mika@grml.org</a>></p></div>
\r
1127 <div id="footnotes"><hr /></div>
\r
1129 <div id="footer-text">
\r
1130 Last updated 2011-05-22 13:13:56 CEST
\r