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.9" />
\r
7 <title>grml-autoconfig(1)</title>
\r
8 <style type="text/css">
\r
9 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
\r
13 font-family: Georgia,serif;
\r
17 h1, h2, h3, h4, h5, h6,
\r
18 div.title, caption.title,
\r
19 thead, p.table.header,
\r
21 #author, #revnumber, #revdate, #revremark,
\r
23 font-family: Arial,Helvetica,sans-serif;
\r
27 margin: 1em 5% 1em 5%;
\r
32 text-decoration: underline;
\r
48 h1, h2, h3, h4, h5, h6 {
\r
51 margin-bottom: 0.5em;
\r
56 border-bottom: 2px solid silver;
\r
76 border: 1px solid silver;
\r
81 margin-bottom: 0.5em;
\r
87 ul > li { color: #aaa; }
\r
88 ul > li > * { color: black; }
\r
90 .monospaced, code, pre {
\r
91 font-family: "Courier New", Courier, monospace;
\r
98 white-space: pre-wrap;
\r
108 #revnumber, #revdate, #revremark {
\r
113 border-top: 2px solid silver;
\r
114 padding-top: 0.5em;
\r
119 padding-bottom: 0.5em;
\r
123 padding-bottom: 0.5em;
\r
128 margin-bottom: 1.5em;
\r
130 div.imageblock, div.exampleblock, div.verseblock,
\r
131 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
\r
132 div.admonitionblock {
\r
134 margin-bottom: 1.5em;
\r
136 div.admonitionblock {
\r
138 margin-bottom: 2.0em;
\r
143 div.content { /* Block element content. */
\r
147 /* Block element titles. */
\r
148 div.title, caption.title {
\r
153 margin-bottom: 0.5em;
\r
159 td div.title:first-child {
\r
162 div.content div.title:first-child {
\r
165 div.content + div.title {
\r
169 div.sidebarblock > div.content {
\r
170 background: #ffffee;
\r
171 border: 1px solid #dddddd;
\r
172 border-left: 4px solid #f0f0f0;
\r
176 div.listingblock > div.content {
\r
177 border: 1px solid #dddddd;
\r
178 border-left: 5px solid #f0f0f0;
\r
179 background: #f8f8f8;
\r
183 div.quoteblock, div.verseblock {
\r
184 padding-left: 1.0em;
\r
185 margin-left: 1.0em;
\r
187 border-left: 5px solid #f0f0f0;
\r
191 div.quoteblock > div.attribution {
\r
192 padding-top: 0.5em;
\r
196 div.verseblock > pre.content {
\r
197 font-family: inherit;
\r
198 font-size: inherit;
\r
200 div.verseblock > div.attribution {
\r
201 padding-top: 0.75em;
\r
204 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
\r
205 div.verseblock + div.attribution {
\r
209 div.admonitionblock .icon {
\r
210 vertical-align: top;
\r
213 text-decoration: underline;
\r
215 padding-right: 0.5em;
\r
217 div.admonitionblock td.content {
\r
218 padding-left: 0.5em;
\r
219 border-left: 3px solid #dddddd;
\r
222 div.exampleblock > div.content {
\r
223 border-left: 3px solid #dddddd;
\r
224 padding-left: 0.5em;
\r
227 div.imageblock div.content { padding-left: 0; }
\r
228 span.image img { border-style: none; vertical-align: text-bottom; }
\r
229 a.image:visited { color: white; }
\r
233 margin-bottom: 0.8em;
\r
238 font-style: normal;
\r
241 dd > *:first-child {
\r
246 list-style-position: outside;
\r
249 list-style-type: decimal;
\r
252 list-style-type: lower-alpha;
\r
255 list-style-type: upper-alpha;
\r
258 list-style-type: lower-roman;
\r
261 list-style-type: upper-roman;
\r
264 div.compact ul, div.compact ol,
\r
265 div.compact p, div.compact p,
\r
266 div.compact div, div.compact div {
\r
268 margin-bottom: 0.1em;
\r
280 margin-bottom: 0.8em;
\r
283 padding-bottom: 15px;
\r
285 dt.hdlist1.strong, td.hdlist1.strong {
\r
289 vertical-align: top;
\r
290 font-style: normal;
\r
291 padding-right: 0.8em;
\r
295 vertical-align: top;
\r
297 div.hdlist.compact tr {
\r
303 background: yellow;
\r
306 .footnote, .footnoteref {
\r
310 span.footnote, span.footnoteref {
\r
311 vertical-align: super;
\r
315 margin: 20px 0 20px 0;
\r
316 padding: 7px 0 0 0;
\r
319 #footnotes div.footnote {
\r
325 border-top: 1px solid silver;
\r
334 padding-right: 0.5em;
\r
335 padding-bottom: 0.3em;
\r
336 vertical-align: top;
\r
338 div.colist td img {
\r
343 #footer-badges { display: none; }
\r
347 margin-bottom: 2.5em;
\r
355 margin-bottom: 0.1em;
\r
358 div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
\r
375 span.aqua { color: aqua; }
\r
376 span.black { color: black; }
\r
377 span.blue { color: blue; }
\r
378 span.fuchsia { color: fuchsia; }
\r
379 span.gray { color: gray; }
\r
380 span.green { color: green; }
\r
381 span.lime { color: lime; }
\r
382 span.maroon { color: maroon; }
\r
383 span.navy { color: navy; }
\r
384 span.olive { color: olive; }
\r
385 span.purple { color: purple; }
\r
386 span.red { color: red; }
\r
387 span.silver { color: silver; }
\r
388 span.teal { color: teal; }
\r
389 span.white { color: white; }
\r
390 span.yellow { color: yellow; }
\r
392 span.aqua-background { background: aqua; }
\r
393 span.black-background { background: black; }
\r
394 span.blue-background { background: blue; }
\r
395 span.fuchsia-background { background: fuchsia; }
\r
396 span.gray-background { background: gray; }
\r
397 span.green-background { background: green; }
\r
398 span.lime-background { background: lime; }
\r
399 span.maroon-background { background: maroon; }
\r
400 span.navy-background { background: navy; }
\r
401 span.olive-background { background: olive; }
\r
402 span.purple-background { background: purple; }
\r
403 span.red-background { background: red; }
\r
404 span.silver-background { background: silver; }
\r
405 span.teal-background { background: teal; }
\r
406 span.white-background { background: white; }
\r
407 span.yellow-background { background: yellow; }
\r
409 span.big { font-size: 2em; }
\r
410 span.small { font-size: 0.6em; }
\r
412 span.underline { text-decoration: underline; }
\r
413 span.overline { text-decoration: overline; }
\r
414 span.line-through { text-decoration: line-through; }
\r
416 div.unbreakable { page-break-inside: avoid; }
\r
426 margin-bottom: 1.5em;
\r
428 div.tableblock > table {
\r
429 border: 3px solid #527bbd;
\r
431 thead, p.table.header {
\r
438 /* Because the table frame attribute is overriden by CSS in most browsers. */
\r
439 div.tableblock > table[frame="void"] {
\r
440 border-style: none;
\r
442 div.tableblock > table[frame="hsides"] {
\r
443 border-left-style: none;
\r
444 border-right-style: none;
\r
446 div.tableblock > table[frame="vsides"] {
\r
447 border-top-style: none;
\r
448 border-bottom-style: none;
\r
459 margin-bottom: 1.5em;
\r
461 thead, p.tableblock.header {
\r
470 border-spacing: 0px;
\r
471 border-style: solid;
\r
472 border-color: #527bbd;
\r
473 border-collapse: collapse;
\r
475 th.tableblock, td.tableblock {
\r
478 border-style: solid;
\r
479 border-color: #527bbd;
\r
482 table.tableblock.frame-topbot {
\r
483 border-left-style: hidden;
\r
484 border-right-style: hidden;
\r
486 table.tableblock.frame-sides {
\r
487 border-top-style: hidden;
\r
488 border-bottom-style: hidden;
\r
490 table.tableblock.frame-none {
\r
491 border-style: hidden;
\r
494 th.tableblock.halign-left, td.tableblock.halign-left {
\r
497 th.tableblock.halign-center, td.tableblock.halign-center {
\r
498 text-align: center;
\r
500 th.tableblock.halign-right, td.tableblock.halign-right {
\r
504 th.tableblock.valign-top, td.tableblock.valign-top {
\r
505 vertical-align: top;
\r
507 th.tableblock.valign-middle, td.tableblock.valign-middle {
\r
508 vertical-align: middle;
\r
510 th.tableblock.valign-bottom, td.tableblock.valign-bottom {
\r
511 vertical-align: bottom;
\r
521 padding-top: 0.5em;
\r
522 padding-bottom: 0.5em;
\r
523 border-top: 2px solid silver;
\r
524 border-bottom: 2px solid silver;
\r
527 border-style: none;
\r
529 body.manpage div.sectionbody {
\r
534 body.manpage div#toc { display: none; }
\r
539 <script type="text/javascript">
\r
541 var asciidoc = { // Namespace.
\r
543 /////////////////////////////////////////////////////////////////////
\r
544 // Table Of Contents generator
\r
545 /////////////////////////////////////////////////////////////////////
\r
547 /* Author: Mihai Bazon, September 2002
\r
548 * http://students.infoiasi.ro/~mishoo
\r
550 * Table Of Content generator
\r
553 * Feel free to use this script under the terms of the GNU General Public
\r
554 * License, as long as you do not remove or alter this notice.
\r
557 /* modified by Troy D. Hanson, September 2006. License: GPL */
\r
558 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
\r
560 // toclevels = 1..4.
\r
561 toc: function (toclevels) {
\r
563 function getText(el) {
\r
565 for (var i = el.firstChild; i != null; i = i.nextSibling) {
\r
566 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
\r
568 else if (i.firstChild != null)
\r
569 text += getText(i);
\r
574 function TocEntry(el, text, toclevel) {
\r
577 this.toclevel = toclevel;
\r
580 function tocEntries(el, toclevels) {
\r
581 var result = new Array;
\r
582 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
\r
583 // Function that scans the DOM tree for header elements (the DOM2
\r
584 // nodeIterator API would be a better technique but not supported by all
\r
586 var iterate = function (el) {
\r
587 for (var i = el.firstChild; i != null; i = i.nextSibling) {
\r
588 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
\r
589 var mo = re.exec(i.tagName);
\r
590 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
\r
591 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
\r
601 var toc = document.getElementById("toc");
\r
606 // Delete existing TOC entries in case we're reloading the TOC.
\r
607 var tocEntriesToRemove = [];
\r
609 for (i = 0; i < toc.childNodes.length; i++) {
\r
610 var entry = toc.childNodes[i];
\r
611 if (entry.nodeName.toLowerCase() == 'div'
\r
612 && entry.getAttribute("class")
\r
613 && entry.getAttribute("class").match(/^toclevel/))
\r
614 tocEntriesToRemove.push(entry);
\r
616 for (i = 0; i < tocEntriesToRemove.length; i++) {
\r
617 toc.removeChild(tocEntriesToRemove[i]);
\r
620 // Rebuild TOC entries.
\r
621 var entries = tocEntries(document.getElementById("content"), toclevels);
\r
622 for (var i = 0; i < entries.length; ++i) {
\r
623 var entry = entries[i];
\r
624 if (entry.element.id == "")
\r
625 entry.element.id = "_toc_" + i;
\r
626 var a = document.createElement("a");
\r
627 a.href = "#" + entry.element.id;
\r
628 a.appendChild(document.createTextNode(entry.text));
\r
629 var div = document.createElement("div");
\r
630 div.appendChild(a);
\r
631 div.className = "toclevel" + entry.toclevel;
\r
632 toc.appendChild(div);
\r
634 if (entries.length == 0)
\r
635 toc.parentNode.removeChild(toc);
\r
639 /////////////////////////////////////////////////////////////////////
\r
640 // Footnotes generator
\r
641 /////////////////////////////////////////////////////////////////////
\r
643 /* Based on footnote generation code from:
\r
644 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
\r
647 footnotes: function () {
\r
648 // Delete existing footnote entries in case we're reloading the footnodes.
\r
650 var noteholder = document.getElementById("footnotes");
\r
654 var entriesToRemove = [];
\r
655 for (i = 0; i < noteholder.childNodes.length; i++) {
\r
656 var entry = noteholder.childNodes[i];
\r
657 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
\r
658 entriesToRemove.push(entry);
\r
660 for (i = 0; i < entriesToRemove.length; i++) {
\r
661 noteholder.removeChild(entriesToRemove[i]);
\r
664 // Rebuild footnote entries.
\r
665 var cont = document.getElementById("content");
\r
666 var spans = cont.getElementsByTagName("span");
\r
669 for (i=0; i<spans.length; i++) {
\r
670 if (spans[i].className == "footnote") {
\r
672 var note = spans[i].getAttribute("data-note");
\r
674 // Use [\s\S] in place of . so multi-line matches work.
\r
675 // Because JavaScript has no s (dotall) regex flag.
\r
676 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
\r
677 spans[i].innerHTML =
\r
678 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
\r
679 "' title='View footnote' class='footnote'>" + n + "</a>]";
\r
680 spans[i].setAttribute("data-note", note);
\r
682 noteholder.innerHTML +=
\r
683 "<div class='footnote' id='_footnote_" + n + "'>" +
\r
684 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
\r
685 n + "</a>. " + note + "</div>";
\r
686 var id =spans[i].getAttribute("id");
\r
687 if (id != null) refs["#"+id] = n;
\r
691 noteholder.parentNode.removeChild(noteholder);
\r
693 // Process footnoterefs.
\r
694 for (i=0; i<spans.length; i++) {
\r
695 if (spans[i].className == "footnoteref") {
\r
696 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
\r
697 href = href.match(/#.*/)[0]; // Because IE return full URL.
\r
699 spans[i].innerHTML =
\r
700 "[<a href='#_footnote_" + n +
\r
701 "' title='View footnote' class='footnote'>" + n + "</a>]";
\r
707 install: function(toclevels) {
\r
710 function reinstall() {
\r
711 asciidoc.footnotes();
\r
713 asciidoc.toc(toclevels);
\r
717 function reinstallAndRemoveTimer() {
\r
718 clearInterval(timerId);
\r
722 timerId = setInterval(reinstall, 500);
\r
723 if (document.addEventListener)
\r
724 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
\r
726 window.onload = reinstallAndRemoveTimer;
\r
730 asciidoc.install();
\r
734 <body class="article">
\r
736 <h1>grml-autoconfig(1)</h1>
\r
739 <div class="sect1">
\r
740 <h2 id="_name">Name</h2>
\r
741 <div class="sectionbody">
\r
742 <div class="paragraph"><p>grml-autoconfig - main bootup process of a grml system</p></div>
\r
745 <div class="sect1">
\r
746 <h2 id="_synopsis">Synopsis</h2>
\r
747 <div class="sectionbody">
\r
748 <div class="paragraph"><p>None - it is a framework. See grml-autoconfig(8) for information regarding
\r
749 the interface script.</p></div>
\r
752 <div class="sect1">
\r
753 <h2 id="_introduction">Introduction</h2>
\r
754 <div class="sectionbody">
\r
755 <div class="paragraph"><p>By using the config framework, it is possible to customize Grml’s startup in a
\r
756 multitude of ways. It allows to:</p></div>
\r
757 <div class="ulist"><ul>
\r
760 execute one or more scripts on startup
\r
765 install Debian packages from deb files on startup
\r
770 unpack configuration on startup
\r
774 <div class="paragraph"><p>The combination of Debs, Configuration and Scripts is called DCS in Grml. DCS
\r
775 can be read from the Live Image itself, from an arbitrary file system on the
\r
776 local system which is marked with the volume label GRMLCFG, or from the file
\r
777 system pointed to by the myconfig boot parameter.</p></div>
\r
778 <div class="paragraph"><p>The DCS handling is controlled by a number of boot parameters.</p></div>
\r
779 <div class="paragraph"><p>The scripts save-config and restore-config can be used to create and handle
\r
780 files called <em>grml configuration archive</em>, abbreviated GCA. save-config stores
\r
781 the running configuration inside a GCA; restore-config is a script to restore a
\r
782 configuration from a GCA.</p></div>
\r
783 <div class="admonitionblock">
\r
786 <div class="title">Tip</div>
\r
788 <td class="content">A GCA is a plain bzip2 compressed tar archive. All the files are generated
\r
789 starting from the root-directory <em>/</em> so it is easy to handle. You can generate
\r
790 configuration archives manually as well. save-config is just a frontend which
\r
791 should make it easier to use.</td>
\r
794 <div class="admonitionblock">
\r
797 <div class="title">Important</div>
\r
799 <td class="content">Starting with Grml release 2009.05 its possible to use root persistency on grml.
\r
800 This means you can store your settings and reuse them on reboot, without having
\r
801 to deal with this config framework. Visit
\r
802 <a href="http://wiki.grml.org/doku.php?id=persistency">http://wiki.grml.org/doku.php?id=persistency</a> for further information.</td>
\r
807 <div class="sect1">
\r
808 <h2 id="current-versions">Behavior in current Grml versions</h2>
\r
809 <div class="sectionbody">
\r
810 <div class="paragraph"><p>This section applies to all Grml versions newer than release 2013.02.</p></div>
\r
811 <div class="paragraph"><p>The central concept of grml-autoconfig is the DCS directory which holds debs,
\r
812 configuration and scripts which are used during system startup.</p></div>
\r
813 <div class="sect2">
\r
814 <h3 id="_determination_of_dcs_directory">Determination of DCS directory</h3>
\r
815 <div class="paragraph"><p>The DCS directory defaults to the root directory of the GRML live image
\r
816 (Note: the directory is known as /lib/live/mount/medium/ on a <em>running</em>
\r
817 Grml system then!). If a file system labeled GRMLCFG is found, the DCS
\r
818 directory is the root directory of that file system. Alternatively, the
\r
819 myconfig boot parameter can be used to directly specify a device which
\r
820 is then taken as DCS directory (myconfig=/dev/sda1, for example). If
\r
821 your device is labeled different to GRMLCFG the proper label can be set
\r
822 via the autoconfig boot parameter (autoconfig=SOMELABEL, for example).</p></div>
\r
823 <div class="paragraph"><p>Without any additional boot parameters, the GCA at DCSDIR/config.tbz is
\r
824 automatically unpacked and DCSDIR/scripts/grml.sh is automatically executed on
\r
825 system startup. The <em>noautoconfig</em> boot parameter disables this automatic
\r
826 behavior.</p></div>
\r
828 <div class="sect2">
\r
829 <h3 id="_boot_parameters">Boot Parameters</h3>
\r
830 <div class="paragraph"><p>The following boot parameters are supported. Use them at the (isolinux)
\r
831 bootprompt as documented here.</p></div>
\r
832 <div class="dlist"><dl>
\r
833 <dt class="hdlist1">
\r
838 This parameter directly sets DCSDIR to the root directory of the specified
\r
839 device. Usage examples:
\r
841 <div class="literalblock">
\r
842 <div class="content">
\r
843 <pre><code>myconfig=/dev/sda1 => read DCS from usb-device</code></pre>
\r
846 <dt class="hdlist1">
\r
851 This parameter specifies the label used to determine the DCS device.
\r
852 If undefined the label GRMLCFG is used to find the DCS device.
\r
854 <div class="literalblock">
\r
855 <div class="content">
\r
856 <pre><code>autoconfig=SOMELABEL => search for device labeled SOMELABEL to use as
\r
857 DCS device.</code></pre>
\r
860 <dt class="hdlist1">
\r
865 This parameter is for setting a specific partition as home directory. Usage
\r
868 <div class="literalblock">
\r
869 <div class="content">
\r
870 <pre><code>home=/dev/sda3 => use /dev/sda3 as the homepartition
\r
871 home=scan => scan through the available partitions and search
\r
872 for file grml.img</code></pre>
\r
875 <dt class="hdlist1">
\r
880 This parameter mounts the specified device in read-only mode and tries to
\r
881 copy all files specified in /etc/grml/partconf to the Grml system. This
\r
882 provides the possibility to use the configuration of a harddisk
\r
883 installation. For example using the network configuration (which is
\r
884 specified in /etc/network) is possible using this boot parameter. Usage
\r
887 <div class="literalblock">
\r
888 <div class="content">
\r
889 <pre><code>partconf=/dev/sda2 => try to mount /dev/sda2 and copy files specified
\r
890 in /etc/grml/partconf to the booted Grml system</code></pre>
\r
893 <dt class="hdlist1">
\r
898 Use this parameter to restore configuration using wget to download a GCA
\r
899 from the specified destination. You can also add variables to change the
\r
900 file name depending on the host configuration. Predefined and useful
\r
901 variables are $ARCH, $HOSTNAME and $KERNEL. Usage example:
\r
903 <div class="literalblock">
\r
904 <div class="content">
\r
905 <pre><code>netconfig=server.tld/path/to/config.tbz => restore configuration using wget to download file config.tbz
\r
906 netconfig=server.tld/config-$ARCH.tbz => download config for specified architecture</code></pre>
\r
909 <dt class="hdlist1">
\r
914 Use this parameter to download and run a script from specified destination:
\r
915 You can also add variables to change the file name depending on the host
\r
916 configuration. Predefined and useful variables are $ARCH, $HOSTNAME and
\r
917 $KERNEL. The environment variable NETSCRIPT is set to the specified URI.
\r
918 This can be used to detect if the script is executed via the netscript bootoption.
\r
921 <div class="literalblock">
\r
922 <div class="content">
\r
923 <pre><code>netscript=server.tld/path/to/script => download and run script/executable from server
\r
924 netscript=server.tld/script-$HOSTNAME => download and run script/executable for specific host</code></pre>
\r
927 <dt class="hdlist1">
\r
932 Extract specific directories from the GCA which needs to be specified by
\r
935 <div class="literalblock">
\r
936 <div class="content">
\r
937 <pre><code>extract=/home/grml => extract only /home/grml from archive
\r
938 extract=/etc => extract only /etc from archive
\r
939 extract=/home/grml/config => extract only $HOME/config from archive</code></pre>
\r
942 <dt class="hdlist1">
\r
947 This parameter executes scripts. If an optional path is given, it is
\r
948 relative to DCSDIR. If the path points to a file, this single file is
\r
949 executed. If no path is given, it defaults to scripts/grml.sh.
\r
950 If the given name points to a directory, all scripts inside it are
\r
951 executed. Usage examples:
\r
953 <div class="literalblock">
\r
954 <div class="content">
\r
955 <pre><code>scripts => run script DCSDIR/scripts/grml.sh
\r
956 scripts=foobar.sh => run script foobar.sh in DCSDIR
\r
957 scripts=foobar => run all scripts inside DCSDIR/foobar directory</code></pre>
\r
960 <dt class="hdlist1">
\r
965 This parameter restores a configuration using a GCA. If an optional path is
\r
966 given, it is relative to DCSDIR. If no path is given, it defaults to
\r
967 DCSDIR/config.tbz. Usage examples:
\r
969 <div class="literalblock">
\r
970 <div class="content">
\r
971 <pre><code>config => restore configuration using file DCSDIR/config.tbz
\r
972 config=config_foobar.tbz => restore configuration using file DCSDIR/config_foobar.tbz</code></pre>
\r
975 <dt class="hdlist1">
\r
980 This parameter allows automatic installation of deb packages while booting.
\r
981 The path is relative to DCSDIR, not optional and is a shell wildcard. All
\r
982 Files matching the wildcard are installed in a single dpkg --install call.
\r
983 For backwards compatibility, if no slash is contained in the path, it is
\r
984 taken relative to DCSDIR/debs.
\r
986 <div class="literalblock">
\r
987 <div class="content">
\r
988 <pre><code>Usage examples:</code></pre>
\r
990 <div class="literalblock">
\r
991 <div class="content">
\r
992 <pre><code>debs=*.deb => install all debian packages (suffix .deb) from directory DCSDIR/debs/
\r
993 debs=foo/01*.deb => install all debian packages (suffix .deb) starting with 01 in the filename from directory DCSDIR/foo</code></pre>
\r
996 <dt class="hdlist1">
\r
1001 Search all local partitions and dm devices for file /etc/network/interfaces and
\r
1002 copy the directory /etc/network to the grml system and restart networking.
\r
1005 <dt class="hdlist1">
\r
1010 Deactivate automounting. By default the scripts try to mount a device with
\r
1011 label <em>GRMLCFG</em>. If you specify the noautoconfig boot parameter this
\r
1012 automounting will be deactivated.
\r
1014 <div class="literalblock">
\r
1015 <div class="content">
\r
1016 <pre><code>noautoconfig => disables auto mounting of label 'GRMLCFG'</code></pre>
\r
1021 <div class="sect2">
\r
1022 <h3 id="_permanently_adjust_boot_parameters">Permanently adjust boot parameters</h3>
\r
1023 <div class="paragraph"><p>As you probably know you can adjust boot parameters on the bootprompt.
\r
1024 You want to set some boot parameters permanently? That’s possible via
\r
1025 adding a directory named <em>bootparams</em> to the Grml ISO which has to be
\r
1026 located at the root-directory /bootparams/ (Note: the directory is known
\r
1027 as /lib/live/mount/medium/bootparams/ on a <em>running</em> Grml system then!).
\r
1028 Place a textfile inside the directory containing the boot parameters
\r
1029 which should be appended to default ones (this corresponds to booting
\r
1030 without any special parameters).</p></div>
\r
1031 <div class="literalblock">
\r
1032 <div class="content">
\r
1033 <pre><code>mkdir bootparams
\r
1034 echo lang=de > bootparams/my_bootparams</code></pre>
\r
1036 <div class="paragraph"><p>Then burn a multisession CD where directory bootparams is located in the root
\r
1037 directory of the CD.</p></div>
\r
1038 <div class="admonitionblock">
\r
1041 <div class="title">Note</div>
\r
1043 <td class="content">Not all boot parameters can be used via /bootparams/. This is a limitation of
\r
1044 the way the kernel and userspace retrieve boot parameters. Boot parameter
\r
1045 regarding the kernel definitely do <strong>NOT</strong> work. Boot parameter related to
\r
1046 grml-autoconfig (the main part of the boot process in Grml running in userspace,
\r
1047 being all the stuff after startup of udev) are expected to work. Boot parameter
\r
1048 related to initrd/initramfs (the part between <em>Searching for GRML file</em> and
\r
1049 startup of udev) are <strong>NOT</strong> covered by /bootparams/ as well yet.</td>
\r
1052 <div class="admonitionblock">
\r
1055 <div class="title">Tip</div>
\r
1057 <td class="content">the application k3b (not available on the live-CD but available through the
\r
1058 Debian repositories) provides an easy to use interface for doing the
\r
1059 multisession task.</td>
\r
1065 <div class="sect1">
\r
1066 <h2 id="X7">Usage scenarios</h2>
\r
1067 <div class="sectionbody">
\r
1068 <div class="sect2">
\r
1069 <h3 id="_personal_configuration_files">Personal configuration files</h3>
\r
1070 <div class="paragraph"><p>You are a fan of the editor vim? Great. You probably have your own <sub>/.vimrc and
\r
1071 want to use it on the Grml system. You also don’t like the default zsh
\r
1072 configuration and want to use your own </sub>/.zshrc? How to proceed? Copy your
\r
1073 .vimrc and .zshrc to $HOME of user <em>grml</em>. Place additional files in
\r
1074 $HOME/config. Now create a configuration for your files running:</p></div>
\r
1075 <div class="literalblock">
\r
1076 <div class="content">
\r
1077 <pre><code>save-config -home -configdir</code></pre>
\r
1079 <div class="paragraph"><p>Now you should have a file named config.tbz containing your configuration files.
\r
1080 You can copy the archive to a webserver and restore it via downloading during
\r
1081 reboot using the following commandline on bootprompt:</p></div>
\r
1082 <div class="literalblock">
\r
1083 <div class="content">
\r
1084 <pre><code>grml netconfig=server.tld/path/to/config.tbz</code></pre>
\r
1086 <div class="paragraph"><p>You don’t have network access but own a USB device? Copy the file to a USB
\r
1087 device and boot with something like:</p></div>
\r
1088 <div class="literalblock">
\r
1089 <div class="content">
\r
1090 <pre><code>grml myconfig=/dev/sda1</code></pre>
\r
1093 <div class="sect2">
\r
1094 <h3 id="_network_configuration">Network configuration</h3>
\r
1095 <div class="paragraph"><p>You need a specific network setup and want to use your own
\r
1096 /etc/network/interfaces by default? Generate the configuration archive running
\r
1097 the following command as user root:</p></div>
\r
1098 <div class="literalblock">
\r
1099 <div class="content">
\r
1100 <pre><code>save-config -etc</code></pre>
\r
1102 <div class="paragraph"><p>Now you should have a file named config.tbz containing your configuration files.
\r
1103 If you want to use it with a USB device copy the file to it and boot via
\r
1104 using the following command on boot prompt:</p></div>
\r
1105 <div class="literalblock">
\r
1106 <div class="content">
\r
1107 <pre><code>grml myconfig=/dev/sda1</code></pre>
\r
1109 <div class="paragraph"><p>You do have an existing harddisk installation and want to use its configuration?
\r
1110 Let’s say the Debian system is located in /dev/sda2. You want to use the
\r
1111 directory /etc/network. This directory is activated by default in
\r
1112 /etc/grml/partconf so we don’t have to do any further work. We just need to
\r
1113 activate it via using the following commandline on bootprompt:</p></div>
\r
1114 <div class="literalblock">
\r
1115 <div class="content">
\r
1116 <pre><code>grml partconf=/dev/sda2</code></pre>
\r
1119 <div class="sect2">
\r
1120 <h3 id="_automatic_installation_of_debian_packages">Automatic installation of debian packages</h3>
\r
1121 <div class="paragraph"><p>You have a specified debian package named <em>foobar.deb</em> and want to use it with
\r
1122 (therefore: install it on) Grml by default? Notice: this feature is useful
\r
1123 especially for grml-small (a ~100 MB ISO). If you want to use it with the large
\r
1124 version of Grml you might have to overburn the ISO.</p></div>
\r
1125 <div class="paragraph"><p>Let’s assume you have burned the Grml iso to a CD-RW using a commandline like:</p></div>
\r
1126 <div class="literalblock">
\r
1127 <div class="content">
\r
1128 <pre><code>cdrecord dev=/dev/hdc -v -multi -tao grml_0.5.iso</code></pre>
\r
1130 <div class="paragraph"><p>Now create a directory named debs and place foobar.deb in it:</p></div>
\r
1131 <div class="literalblock">
\r
1132 <div class="content">
\r
1133 <pre><code>mkdir debs/ && cp foobar.deb debs/</code></pre>
\r
1135 <div class="paragraph"><p>Notice: This directory will be located in /lib/live/mount/medium after burning the second
\r
1136 session.</p></div>
\r
1137 <div class="paragraph"><p>Now create the second session containing this directory:</p></div>
\r
1138 <div class="literalblock">
\r
1139 <div class="content">
\r
1140 <pre><code>mkisofs -M grml_0.5.iso -C `cdrecord -msinfo dev=/dev/hdc` -R -o 2nd_session.iso debs</code></pre>
\r
1142 <div class="paragraph"><p>Finally append the second session to the cd using:</p></div>
\r
1143 <div class="literalblock">
\r
1144 <div class="content">
\r
1145 <pre><code>cdrecord dev=/dev/hdc -v -multi -tao 2nd_session.iso</code></pre>
\r
1147 <div class="admonitionblock">
\r
1150 <div class="title">Tip</div>
\r
1152 <td class="content">the application k3b (not available on the live CD but available through the
\r
1153 Debian repositories) provides an easy to use interface for doing the
\r
1154 multisession task.</td>
\r
1157 <div class="paragraph"><p>Now boot from your new personalized Grml CD using the debs parameter:</p></div>
\r
1158 <div class="literalblock">
\r
1159 <div class="content">
\r
1160 <pre><code>grml debs</code></pre>
\r
1163 <div class="sect2">
\r
1164 <h3 id="_run_your_own_commands_on_startup">Run your own commands on startup</h3>
\r
1165 <div class="paragraph"><p>You know that booting with <em>grml services=foobar</em> executes
\r
1166 /etc/init.d/foobar when booting Grml. But you want to setup a more
\r
1167 complex network configuration, adjust some other stuff and so on, on
\r
1168 your own? Just write a script named grml.sh which does the job and use
\r
1169 one of the mentioned boot parameters. Let’s say you have placed grml.sh
\r
1170 on your usb device (usb stick) then use the following commandline on
\r
1171 bootprompt:</p></div>
\r
1172 <div class="literalblock">
\r
1173 <div class="content">
\r
1174 <pre><code>grml myconfig=/dev/sda1</code></pre>
\r
1176 <div class="paragraph"><p>Or even better: create a device with label GRMLCFG running (adjust /dev/sdX1
\r
1177 according to your needs):</p></div>
\r
1178 <div class="literalblock">
\r
1179 <div class="content">
\r
1180 <pre><code>mkfs.ext3 -L GRMLCFG /dev/sdX1 # warning: this destroys all data on /dev/sdX1</code></pre>
\r
1182 <div class="admonitionblock">
\r
1185 <div class="title">Tip</div>
\r
1187 <td class="content">several filesystems provide the possibility to provide a label. For
\r
1188 example FAT provides this through: <em>mkfs.vfat -n GRMLCFG /dev/sda1</em> (attention:
\r
1189 this will destroy data on /dev/sda1 of course!). Take a look at the
\r
1190 documentation/manpage of the filesystem you want to use.</td>
\r
1193 <div class="paragraph"><p>Now place your configuration archive (see save-config and the other
\r
1194 usage scenarios) and the script grml.sh on the device. Now you can boot
\r
1195 your system without specifying any boot parameters on bootprompt because
\r
1196 devices labeled with GRMLCFG are mounted readonly and used by default.
\r
1197 If you did not label your device you can use the device anyway using
\r
1198 <em>grml myconfig=/dev/sdX</em> (adjust /dev/sdX) on the bootprompt.</p></div>
\r
1200 <div class="sect2">
\r
1201 <h3 id="_debug_remote_systems">Debug remote systems</h3>
\r
1202 <div class="paragraph"><p>You are responsible for a customer’s system in her data center. The system has
\r
1203 failed and you need to debug from remote, and the remote hands available in the
\r
1204 data center do not have enough knowledge to get Grml booted and configure the
\r
1205 network without external help?</p></div>
\r
1206 <div class="paragraph"><p>If the hard disk of the system is still available, you hopefully have saved a
\r
1207 configuration file with IP address, netmask and default gateway somewhere on
\r
1208 that hard disk. Grml can use the information found on a partition. Take a look
\r
1209 at the <em>partconf</em> boot parameter. Usage example: <em>grml partconf=/dev/sda2</em>
\r
1210 copies files defined in /etc/grml/partconf from /dev/sda2 to the Grml system. As
\r
1211 /etc/network is predefined in /etc/grml/partconf the configuration from
\r
1212 /dev/sda2 will be taken.</p></div>
\r
1213 <div class="paragraph"><p>Or you use a standard Grml medium and have grml read IP address, netmask and
\r
1214 default gateway from another medium like a USB stick. Take a look at the script
\r
1215 saveconfig and the boot parameter myconfig.</p></div>
\r
1216 <div class="paragraph"><p>Or you put a grml.iso file on your hard disk (maybe in /boot/grml) or on an USB
\r
1217 stick, use grub to boot from there and place debs, configuration scripts or Grml
\r
1218 configuration archives alongside the .iso.</p></div>
\r
1222 <div class="sect1">
\r
1223 <h2 id="_bugs">Bugs</h2>
\r
1224 <div class="sectionbody">
\r
1225 <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
1226 about how to report bugs.</p></div>
\r
1229 <div class="sect1">
\r
1230 <h2 id="_see_also">See also</h2>
\r
1231 <div class="sectionbody">
\r
1232 <div class="paragraph"><p>grml-autoconfig(8), restore-config(1), save-config(1)</p></div>
\r
1235 <div class="sect1">
\r
1236 <h2 id="_author">Author</h2>
\r
1237 <div class="sectionbody">
\r
1238 <div class="paragraph"><p>(c) 2005++, Michael Prokop <<a href="mailto:mika@grml.org">mika@grml.org</a>></p></div>
\r
1242 <div id="footnotes"><hr /></div>
\r
1244 <div id="footer-text">
\r
1245 Last updated 2014-03-20 16:07:25 CET
\r