1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
\r
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
\r
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
\r
6 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
\r
7 <meta name="generator" content="AsciiDoc 8.6.10" />
\r
8 <title>grml-autoconfig(1)</title>
\r
9 <style type="text/css">
\r
10 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
\r
14 font-family: Georgia,serif;
\r
18 h1, h2, h3, h4, h5, h6,
\r
19 div.title, caption.title,
\r
20 thead, p.table.header,
\r
22 #author, #revnumber, #revdate, #revremark,
\r
24 font-family: Arial,Helvetica,sans-serif;
\r
28 margin: 1em 5% 1em 5%;
\r
33 text-decoration: underline;
\r
49 h1, h2, h3, h4, h5, h6 {
\r
52 margin-bottom: 0.5em;
\r
57 border-bottom: 2px solid silver;
\r
77 border: 1px solid silver;
\r
82 margin-bottom: 0.5em;
\r
88 ul > li { color: #aaa; }
\r
89 ul > li > * { color: black; }
\r
91 .monospaced, code, pre {
\r
92 font-family: "Courier New", Courier, monospace;
\r
99 white-space: pre-wrap;
\r
109 #revnumber, #revdate, #revremark {
\r
114 border-top: 2px solid silver;
\r
115 padding-top: 0.5em;
\r
120 padding-bottom: 0.5em;
\r
124 padding-bottom: 0.5em;
\r
129 margin-bottom: 1.5em;
\r
131 div.imageblock, div.exampleblock, div.verseblock,
\r
132 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
\r
133 div.admonitionblock {
\r
135 margin-bottom: 1.5em;
\r
137 div.admonitionblock {
\r
139 margin-bottom: 2.0em;
\r
144 div.content { /* Block element content. */
\r
148 /* Block element titles. */
\r
149 div.title, caption.title {
\r
154 margin-bottom: 0.5em;
\r
160 td div.title:first-child {
\r
163 div.content div.title:first-child {
\r
166 div.content + div.title {
\r
170 div.sidebarblock > div.content {
\r
171 background: #ffffee;
\r
172 border: 1px solid #dddddd;
\r
173 border-left: 4px solid #f0f0f0;
\r
177 div.listingblock > div.content {
\r
178 border: 1px solid #dddddd;
\r
179 border-left: 5px solid #f0f0f0;
\r
180 background: #f8f8f8;
\r
184 div.quoteblock, div.verseblock {
\r
185 padding-left: 1.0em;
\r
186 margin-left: 1.0em;
\r
188 border-left: 5px solid #f0f0f0;
\r
192 div.quoteblock > div.attribution {
\r
193 padding-top: 0.5em;
\r
197 div.verseblock > pre.content {
\r
198 font-family: inherit;
\r
199 font-size: inherit;
\r
201 div.verseblock > div.attribution {
\r
202 padding-top: 0.75em;
\r
205 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
\r
206 div.verseblock + div.attribution {
\r
210 div.admonitionblock .icon {
\r
211 vertical-align: top;
\r
214 text-decoration: underline;
\r
216 padding-right: 0.5em;
\r
218 div.admonitionblock td.content {
\r
219 padding-left: 0.5em;
\r
220 border-left: 3px solid #dddddd;
\r
223 div.exampleblock > div.content {
\r
224 border-left: 3px solid #dddddd;
\r
225 padding-left: 0.5em;
\r
228 div.imageblock div.content { padding-left: 0; }
\r
229 span.image img { border-style: none; vertical-align: text-bottom; }
\r
230 a.image:visited { color: white; }
\r
234 margin-bottom: 0.8em;
\r
239 font-style: normal;
\r
242 dd > *:first-child {
\r
247 list-style-position: outside;
\r
250 list-style-type: decimal;
\r
253 list-style-type: lower-alpha;
\r
256 list-style-type: upper-alpha;
\r
259 list-style-type: lower-roman;
\r
262 list-style-type: upper-roman;
\r
265 div.compact ul, div.compact ol,
\r
266 div.compact p, div.compact p,
\r
267 div.compact div, div.compact div {
\r
269 margin-bottom: 0.1em;
\r
281 margin-bottom: 0.8em;
\r
284 padding-bottom: 15px;
\r
286 dt.hdlist1.strong, td.hdlist1.strong {
\r
290 vertical-align: top;
\r
291 font-style: normal;
\r
292 padding-right: 0.8em;
\r
296 vertical-align: top;
\r
298 div.hdlist.compact tr {
\r
304 background: yellow;
\r
307 .footnote, .footnoteref {
\r
311 span.footnote, span.footnoteref {
\r
312 vertical-align: super;
\r
316 margin: 20px 0 20px 0;
\r
317 padding: 7px 0 0 0;
\r
320 #footnotes div.footnote {
\r
326 border-top: 1px solid silver;
\r
335 padding-right: 0.5em;
\r
336 padding-bottom: 0.3em;
\r
337 vertical-align: top;
\r
339 div.colist td img {
\r
344 #footer-badges { display: none; }
\r
348 margin-bottom: 2.5em;
\r
356 margin-bottom: 0.1em;
\r
359 div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
\r
376 span.aqua { color: aqua; }
\r
377 span.black { color: black; }
\r
378 span.blue { color: blue; }
\r
379 span.fuchsia { color: fuchsia; }
\r
380 span.gray { color: gray; }
\r
381 span.green { color: green; }
\r
382 span.lime { color: lime; }
\r
383 span.maroon { color: maroon; }
\r
384 span.navy { color: navy; }
\r
385 span.olive { color: olive; }
\r
386 span.purple { color: purple; }
\r
387 span.red { color: red; }
\r
388 span.silver { color: silver; }
\r
389 span.teal { color: teal; }
\r
390 span.white { color: white; }
\r
391 span.yellow { color: yellow; }
\r
393 span.aqua-background { background: aqua; }
\r
394 span.black-background { background: black; }
\r
395 span.blue-background { background: blue; }
\r
396 span.fuchsia-background { background: fuchsia; }
\r
397 span.gray-background { background: gray; }
\r
398 span.green-background { background: green; }
\r
399 span.lime-background { background: lime; }
\r
400 span.maroon-background { background: maroon; }
\r
401 span.navy-background { background: navy; }
\r
402 span.olive-background { background: olive; }
\r
403 span.purple-background { background: purple; }
\r
404 span.red-background { background: red; }
\r
405 span.silver-background { background: silver; }
\r
406 span.teal-background { background: teal; }
\r
407 span.white-background { background: white; }
\r
408 span.yellow-background { background: yellow; }
\r
410 span.big { font-size: 2em; }
\r
411 span.small { font-size: 0.6em; }
\r
413 span.underline { text-decoration: underline; }
\r
414 span.overline { text-decoration: overline; }
\r
415 span.line-through { text-decoration: line-through; }
\r
417 div.unbreakable { page-break-inside: avoid; }
\r
427 margin-bottom: 1.5em;
\r
429 div.tableblock > table {
\r
430 border: 3px solid #527bbd;
\r
432 thead, p.table.header {
\r
439 /* Because the table frame attribute is overriden by CSS in most browsers. */
\r
440 div.tableblock > table[frame="void"] {
\r
441 border-style: none;
\r
443 div.tableblock > table[frame="hsides"] {
\r
444 border-left-style: none;
\r
445 border-right-style: none;
\r
447 div.tableblock > table[frame="vsides"] {
\r
448 border-top-style: none;
\r
449 border-bottom-style: none;
\r
460 margin-bottom: 1.5em;
\r
462 thead, p.tableblock.header {
\r
471 border-spacing: 0px;
\r
472 border-style: solid;
\r
473 border-color: #527bbd;
\r
474 border-collapse: collapse;
\r
476 th.tableblock, td.tableblock {
\r
479 border-style: solid;
\r
480 border-color: #527bbd;
\r
483 table.tableblock.frame-topbot {
\r
484 border-left-style: hidden;
\r
485 border-right-style: hidden;
\r
487 table.tableblock.frame-sides {
\r
488 border-top-style: hidden;
\r
489 border-bottom-style: hidden;
\r
491 table.tableblock.frame-none {
\r
492 border-style: hidden;
\r
495 th.tableblock.halign-left, td.tableblock.halign-left {
\r
498 th.tableblock.halign-center, td.tableblock.halign-center {
\r
499 text-align: center;
\r
501 th.tableblock.halign-right, td.tableblock.halign-right {
\r
505 th.tableblock.valign-top, td.tableblock.valign-top {
\r
506 vertical-align: top;
\r
508 th.tableblock.valign-middle, td.tableblock.valign-middle {
\r
509 vertical-align: middle;
\r
511 th.tableblock.valign-bottom, td.tableblock.valign-bottom {
\r
512 vertical-align: bottom;
\r
522 padding-top: 0.5em;
\r
523 padding-bottom: 0.5em;
\r
524 border-top: 2px solid silver;
\r
525 border-bottom: 2px solid silver;
\r
528 border-style: none;
\r
530 body.manpage div.sectionbody {
\r
535 body.manpage div#toc { display: none; }
\r
540 <script type="text/javascript">
\r
542 var asciidoc = { // Namespace.
\r
544 /////////////////////////////////////////////////////////////////////
\r
545 // Table Of Contents generator
\r
546 /////////////////////////////////////////////////////////////////////
\r
548 /* Author: Mihai Bazon, September 2002
\r
549 * http://students.infoiasi.ro/~mishoo
\r
551 * Table Of Content generator
\r
554 * Feel free to use this script under the terms of the GNU General Public
\r
555 * License, as long as you do not remove or alter this notice.
\r
558 /* modified by Troy D. Hanson, September 2006. License: GPL */
\r
559 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
\r
561 // toclevels = 1..4.
\r
562 toc: function (toclevels) {
\r
564 function getText(el) {
\r
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
\r
567 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
\r
569 else if (i.firstChild != null)
\r
570 text += getText(i);
\r
575 function TocEntry(el, text, toclevel) {
\r
578 this.toclevel = toclevel;
\r
581 function tocEntries(el, toclevels) {
\r
582 var result = new Array;
\r
583 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
\r
584 // Function that scans the DOM tree for header elements (the DOM2
\r
585 // nodeIterator API would be a better technique but not supported by all
\r
587 var iterate = function (el) {
\r
588 for (var i = el.firstChild; i != null; i = i.nextSibling) {
\r
589 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
\r
590 var mo = re.exec(i.tagName);
\r
591 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
\r
592 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
\r
602 var toc = document.getElementById("toc");
\r
607 // Delete existing TOC entries in case we're reloading the TOC.
\r
608 var tocEntriesToRemove = [];
\r
610 for (i = 0; i < toc.childNodes.length; i++) {
\r
611 var entry = toc.childNodes[i];
\r
612 if (entry.nodeName.toLowerCase() == 'div'
\r
613 && entry.getAttribute("class")
\r
614 && entry.getAttribute("class").match(/^toclevel/))
\r
615 tocEntriesToRemove.push(entry);
\r
617 for (i = 0; i < tocEntriesToRemove.length; i++) {
\r
618 toc.removeChild(tocEntriesToRemove[i]);
\r
621 // Rebuild TOC entries.
\r
622 var entries = tocEntries(document.getElementById("content"), toclevels);
\r
623 for (var i = 0; i < entries.length; ++i) {
\r
624 var entry = entries[i];
\r
625 if (entry.element.id == "")
\r
626 entry.element.id = "_toc_" + i;
\r
627 var a = document.createElement("a");
\r
628 a.href = "#" + entry.element.id;
\r
629 a.appendChild(document.createTextNode(entry.text));
\r
630 var div = document.createElement("div");
\r
631 div.appendChild(a);
\r
632 div.className = "toclevel" + entry.toclevel;
\r
633 toc.appendChild(div);
\r
635 if (entries.length == 0)
\r
636 toc.parentNode.removeChild(toc);
\r
640 /////////////////////////////////////////////////////////////////////
\r
641 // Footnotes generator
\r
642 /////////////////////////////////////////////////////////////////////
\r
644 /* Based on footnote generation code from:
\r
645 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
\r
648 footnotes: function () {
\r
649 // Delete existing footnote entries in case we're reloading the footnodes.
\r
651 var noteholder = document.getElementById("footnotes");
\r
655 var entriesToRemove = [];
\r
656 for (i = 0; i < noteholder.childNodes.length; i++) {
\r
657 var entry = noteholder.childNodes[i];
\r
658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
\r
659 entriesToRemove.push(entry);
\r
661 for (i = 0; i < entriesToRemove.length; i++) {
\r
662 noteholder.removeChild(entriesToRemove[i]);
\r
665 // Rebuild footnote entries.
\r
666 var cont = document.getElementById("content");
\r
667 var spans = cont.getElementsByTagName("span");
\r
670 for (i=0; i<spans.length; i++) {
\r
671 if (spans[i].className == "footnote") {
\r
673 var note = spans[i].getAttribute("data-note");
\r
675 // Use [\s\S] in place of . so multi-line matches work.
\r
676 // Because JavaScript has no s (dotall) regex flag.
\r
677 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
\r
678 spans[i].innerHTML =
\r
679 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
\r
680 "' title='View footnote' class='footnote'>" + n + "</a>]";
\r
681 spans[i].setAttribute("data-note", note);
\r
683 noteholder.innerHTML +=
\r
684 "<div class='footnote' id='_footnote_" + n + "'>" +
\r
685 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
\r
686 n + "</a>. " + note + "</div>";
\r
687 var id =spans[i].getAttribute("id");
\r
688 if (id != null) refs["#"+id] = n;
\r
692 noteholder.parentNode.removeChild(noteholder);
\r
694 // Process footnoterefs.
\r
695 for (i=0; i<spans.length; i++) {
\r
696 if (spans[i].className == "footnoteref") {
\r
697 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
\r
698 href = href.match(/#.*/)[0]; // Because IE return full URL.
\r
700 spans[i].innerHTML =
\r
701 "[<a href='#_footnote_" + n +
\r
702 "' title='View footnote' class='footnote'>" + n + "</a>]";
\r
708 install: function(toclevels) {
\r
711 function reinstall() {
\r
712 asciidoc.footnotes();
\r
714 asciidoc.toc(toclevels);
\r
718 function reinstallAndRemoveTimer() {
\r
719 clearInterval(timerId);
\r
723 timerId = setInterval(reinstall, 500);
\r
724 if (document.addEventListener)
\r
725 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
\r
727 window.onload = reinstallAndRemoveTimer;
\r
731 asciidoc.install();
\r
735 <body class="article">
\r
737 <h1>grml-autoconfig(1)</h1>
\r
740 <div class="sect1">
\r
741 <h2 id="_name">Name</h2>
\r
742 <div class="sectionbody">
\r
743 <div class="paragraph"><p>grml-autoconfig - main bootup process of a grml system</p></div>
\r
746 <div class="sect1">
\r
747 <h2 id="_synopsis">Synopsis</h2>
\r
748 <div class="sectionbody">
\r
749 <div class="paragraph"><p>None - it is a framework. See grml-autoconfig(8) for information regarding
\r
750 the interface script.</p></div>
\r
753 <div class="sect1">
\r
754 <h2 id="_introduction">Introduction</h2>
\r
755 <div class="sectionbody">
\r
756 <div class="paragraph"><p>By using the config framework, it is possible to customize Grml’s startup in a
\r
757 multitude of ways. It allows to:</p></div>
\r
758 <div class="ulist"><ul>
\r
761 execute one or more scripts on startup
\r
766 install Debian packages from deb files on startup
\r
771 unpack configuration on startup
\r
775 <div class="paragraph"><p>The combination of Debs, Configuration and Scripts is called DCS in Grml. DCS
\r
776 can be read from the Live Image itself, from an arbitrary file system on the
\r
777 local system which is marked with the volume label GRMLCFG, or from the file
\r
778 system pointed to by the myconfig boot parameter.</p></div>
\r
779 <div class="paragraph"><p>The DCS handling is controlled by a number of boot parameters.</p></div>
\r
780 <div class="paragraph"><p>The scripts save-config and restore-config can be used to create and handle
\r
781 files called <em>grml configuration archive</em>, abbreviated GCA. save-config stores
\r
782 the running configuration inside a GCA; restore-config is a script to restore a
\r
783 configuration from a GCA.</p></div>
\r
784 <div class="admonitionblock">
\r
787 <div class="title">Tip</div>
\r
789 <td class="content">A GCA is a plain bzip2 compressed tar archive. All the files are generated
\r
790 starting from the root-directory <em>/</em> so it is easy to handle. You can generate
\r
791 configuration archives manually as well. save-config is just a frontend which
\r
792 should make it easier to use.</td>
\r
795 <div class="admonitionblock">
\r
798 <div class="title">Important</div>
\r
800 <td class="content">Starting with Grml release 2009.05 its possible to use root persistency on grml.
\r
801 This means you can store your settings and reuse them on reboot, without having
\r
802 to deal with this config framework. Visit
\r
803 <a href="http://wiki.grml.org/doku.php?id=persistency">http://wiki.grml.org/doku.php?id=persistency</a> for further information.</td>
\r
808 <div class="sect1">
\r
809 <h2 id="current-versions">Behavior in current Grml versions</h2>
\r
810 <div class="sectionbody">
\r
811 <div class="paragraph"><p>This section applies to all Grml versions newer than release 2013.02.</p></div>
\r
812 <div class="paragraph"><p>The central concept of grml-autoconfig is the DCS directory which holds debs,
\r
813 configuration and scripts which are used during system startup.</p></div>
\r
814 <div class="sect2">
\r
815 <h3 id="_determination_of_dcs_directory">Determination of DCS directory</h3>
\r
816 <div class="paragraph"><p>The DCS directory defaults to the root directory of the GRML live image
\r
817 (Note: the directory is known as /run/live/medium/ on a <em>running</em>
\r
818 Grml system then!). If a file system labeled GRMLCFG is found, the DCS
\r
819 directory is the root directory of that file system. Alternatively, the
\r
820 myconfig boot parameter can be used to directly specify a device which
\r
821 is then taken as DCS directory (myconfig=/dev/sda1, for example). If
\r
822 your device is labeled different to GRMLCFG the proper label can be set
\r
823 via the autoconfig boot parameter (autoconfig=SOMELABEL, for example).</p></div>
\r
824 <div class="paragraph"><p>Without any additional boot parameters, the GCA at DCSDIR/config.tbz is
\r
825 automatically unpacked and DCSDIR/scripts/grml.sh is automatically executed on
\r
826 system startup. The <em>noautoconfig</em> boot parameter disables this automatic
\r
827 behavior.</p></div>
\r
829 <div class="sect2">
\r
830 <h3 id="_boot_parameters">Boot Parameters</h3>
\r
831 <div class="paragraph"><p>The following boot parameters are supported. Use them at the (isolinux)
\r
832 bootprompt as documented here.</p></div>
\r
833 <div class="dlist"><dl>
\r
834 <dt class="hdlist1">
\r
839 This parameter directly sets DCSDIR to the root directory of the specified
\r
840 device. Usage examples:
\r
842 <div class="literalblock">
\r
843 <div class="content">
\r
844 <pre><code>myconfig=/dev/sda1 => read DCS from usb-device</code></pre>
\r
847 <dt class="hdlist1">
\r
852 This parameter specifies the label used to determine the DCS device.
\r
853 If undefined the label GRMLCFG is used to find the DCS device.
\r
855 <div class="literalblock">
\r
856 <div class="content">
\r
857 <pre><code>autoconfig=SOMELABEL => search for device labeled SOMELABEL to use as
\r
858 DCS device.</code></pre>
\r
861 <dt class="hdlist1">
\r
866 This parameter is for setting a specific partition as home directory. Usage
\r
869 <div class="literalblock">
\r
870 <div class="content">
\r
871 <pre><code>home=/dev/sda3 => use /dev/sda3 as the homepartition
\r
872 home=scan => scan through the available partitions and search
\r
873 for file grml.img</code></pre>
\r
876 <dt class="hdlist1">
\r
881 This parameter mounts the specified device in read-only mode and tries to
\r
882 copy all files specified in /etc/grml/partconf to the Grml system. This
\r
883 provides the possibility to use the configuration of a harddisk
\r
884 installation. For example using the network configuration (which is
\r
885 specified in /etc/network) is possible using this boot parameter. Usage
\r
888 <div class="literalblock">
\r
889 <div class="content">
\r
890 <pre><code>partconf=/dev/sda2 => try to mount /dev/sda2 and copy files specified
\r
891 in /etc/grml/partconf to the booted Grml system</code></pre>
\r
894 <dt class="hdlist1">
\r
899 Use this parameter to restore configuration using wget to download a GCA
\r
900 from the specified destination. You can also add variables to change the
\r
901 file name depending on the host configuration. Predefined and useful
\r
902 variables are $ARCH, $HOSTNAME and $KERNEL. Usage example:
\r
904 <div class="literalblock">
\r
905 <div class="content">
\r
906 <pre><code>netconfig=server.tld/path/to/config.tbz => restore configuration using wget to download file config.tbz
\r
907 netconfig=server.tld/config-$ARCH.tbz => download config for specified architecture</code></pre>
\r
910 <dt class="hdlist1">
\r
915 Use this parameter to download and run a script from specified destination:
\r
916 You can also add variables to change the file name depending on the host
\r
917 configuration. Predefined and useful variables are $ARCH, $HOSTNAME and
\r
918 $KERNEL. The environment variable NETSCRIPT is set to the specified URI.
\r
919 This can be used to detect if the script is executed via the netscript bootoption.
\r
922 <div class="literalblock">
\r
923 <div class="content">
\r
924 <pre><code>netscript=server.tld/path/to/script => download and run script/executable from server
\r
925 netscript=server.tld/script-$HOSTNAME => download and run script/executable for specific host</code></pre>
\r
928 <dt class="hdlist1">
\r
933 Extract specific directories from the GCA which needs to be specified by
\r
936 <div class="literalblock">
\r
937 <div class="content">
\r
938 <pre><code>extract=/home/grml => extract only /home/grml from archive
\r
939 extract=/etc => extract only /etc from archive
\r
940 extract=/home/grml/config => extract only $HOME/config from archive</code></pre>
\r
943 <dt class="hdlist1">
\r
948 This parameter executes scripts. If an optional path is given, it is
\r
949 relative to DCSDIR. If the path points to a file, this single file is
\r
950 executed. If no path is given, it defaults to scripts/grml.sh.
\r
951 If the given name points to a directory, all scripts inside it are
\r
952 executed. Usage examples:
\r
954 <div class="literalblock">
\r
955 <div class="content">
\r
956 <pre><code>scripts => run script DCSDIR/scripts/grml.sh
\r
957 scripts=foobar.sh => run script foobar.sh in DCSDIR
\r
958 scripts=foobar => run all scripts inside DCSDIR/foobar directory</code></pre>
\r
961 <dt class="hdlist1">
\r
966 This parameter restores a configuration using a GCA. If an optional path is
\r
967 given, it is relative to DCSDIR. If no path is given, it defaults to
\r
968 DCSDIR/config.tbz. Usage examples:
\r
970 <div class="literalblock">
\r
971 <div class="content">
\r
972 <pre><code>config => restore configuration using file DCSDIR/config.tbz
\r
973 config=config_foobar.tbz => restore configuration using file DCSDIR/config_foobar.tbz</code></pre>
\r
976 <dt class="hdlist1">
\r
981 This parameter allows automatic installation of deb packages while booting.
\r
982 The path is relative to DCSDIR, not optional and is a shell wildcard. All
\r
983 Files matching the wildcard are installed in a single dpkg --install call.
\r
984 For backwards compatibility, if no slash is contained in the path, it is
\r
985 taken relative to DCSDIR/debs.
\r
987 <div class="literalblock">
\r
988 <div class="content">
\r
989 <pre><code>Usage examples:</code></pre>
\r
991 <div class="literalblock">
\r
992 <div class="content">
\r
993 <pre><code>debs=*.deb => install all debian packages (suffix .deb) from directory DCSDIR/debs/
\r
994 debs=foo/01*.deb => install all debian packages (suffix .deb) starting with 01 in the filename from directory DCSDIR/foo</code></pre>
\r
997 <dt class="hdlist1">
\r
1002 Search all local partitions and dm devices for file /etc/network/interfaces and
\r
1003 copy the directory /etc/network to the grml system and restart networking.
\r
1006 <dt class="hdlist1">
\r
1011 Deactivate automounting. By default the scripts try to mount a device with
\r
1012 label <em>GRMLCFG</em>. If you specify the noautoconfig boot parameter this
\r
1013 automounting will be deactivated.
\r
1015 <div class="literalblock">
\r
1016 <div class="content">
\r
1017 <pre><code>noautoconfig => disables auto mounting of label 'GRMLCFG'</code></pre>
\r
1022 <div class="sect2">
\r
1023 <h3 id="_permanently_adjust_boot_parameters">Permanently adjust boot parameters</h3>
\r
1024 <div class="paragraph"><p>As you probably know you can adjust boot parameters on the bootprompt.
\r
1025 You want to set some boot parameters permanently? That’s possible via
\r
1026 adding a directory named <em>bootparams</em> to the Grml ISO which has to be
\r
1027 located at the root-directory /bootparams/ (Note: the directory is known
\r
1028 as /run/live/medium/bootparams/ on a_running_Grml system then!).
\r
1029 Place a textfile inside the directory containing the boot parameters
\r
1030 which should be appended to default ones (this corresponds to booting
\r
1031 without any special parameters).</p></div>
\r
1032 <div class="literalblock">
\r
1033 <div class="content">
\r
1034 <pre><code>mkdir bootparams
\r
1035 echo lang=de > bootparams/my_bootparams</code></pre>
\r
1037 <div class="paragraph"><p>Then burn a multisession CD where directory bootparams is located in the root
\r
1038 directory of the CD.</p></div>
\r
1039 <div class="admonitionblock">
\r
1042 <div class="title">Note</div>
\r
1044 <td class="content">Not all boot parameters can be used via /bootparams/. This is a limitation of
\r
1045 the way the kernel and userspace retrieve boot parameters. Boot parameter
\r
1046 regarding the kernel definitely do <strong>NOT</strong> work. Boot parameter related to
\r
1047 grml-autoconfig (the main part of the boot process in Grml running in userspace,
\r
1048 being all the stuff after startup of udev) are expected to work. Boot parameter
\r
1049 related to initrd/initramfs (the part between <em>Searching for GRML file</em> and
\r
1050 startup of udev) are <strong>NOT</strong> covered by /bootparams/ as well yet.</td>
\r
1053 <div class="admonitionblock">
\r
1056 <div class="title">Tip</div>
\r
1058 <td class="content">the application k3b (not available on the live-CD but available through the
\r
1059 Debian repositories) provides an easy to use interface for doing the
\r
1060 multisession task.</td>
\r
1066 <div class="sect1">
\r
1067 <h2 id="X7">Usage scenarios</h2>
\r
1068 <div class="sectionbody">
\r
1069 <div class="sect2">
\r
1070 <h3 id="_personal_configuration_files">Personal configuration files</h3>
\r
1071 <div class="paragraph"><p>You are a fan of the editor vim? Great. You probably have your own <sub>/.vimrc and
\r
1072 want to use it on the Grml system. You also don’t like the default zsh
\r
1073 configuration and want to use your own </sub>/.zshrc? How to proceed? Copy your
\r
1074 .vimrc and .zshrc to $HOME of user <em>grml</em>. Place additional files in
\r
1075 $HOME/config. Now create a configuration for your files running:</p></div>
\r
1076 <div class="literalblock">
\r
1077 <div class="content">
\r
1078 <pre><code>save-config -home -configdir</code></pre>
\r
1080 <div class="paragraph"><p>Now you should have a file named config.tbz containing your configuration files.
\r
1081 You can copy the archive to a webserver and restore it via downloading during
\r
1082 reboot using the following commandline on bootprompt:</p></div>
\r
1083 <div class="literalblock">
\r
1084 <div class="content">
\r
1085 <pre><code>grml netconfig=server.tld/path/to/config.tbz</code></pre>
\r
1087 <div class="paragraph"><p>You don’t have network access but own a USB device? Copy the file to a USB
\r
1088 device and boot with something like:</p></div>
\r
1089 <div class="literalblock">
\r
1090 <div class="content">
\r
1091 <pre><code>grml myconfig=/dev/sda1</code></pre>
\r
1094 <div class="sect2">
\r
1095 <h3 id="_network_configuration">Network configuration</h3>
\r
1096 <div class="paragraph"><p>You need a specific network setup and want to use your own
\r
1097 /etc/network/interfaces by default? Generate the configuration archive running
\r
1098 the following command as user root:</p></div>
\r
1099 <div class="literalblock">
\r
1100 <div class="content">
\r
1101 <pre><code>save-config -etc</code></pre>
\r
1103 <div class="paragraph"><p>Now you should have a file named config.tbz containing your configuration files.
\r
1104 If you want to use it with a USB device copy the file to it and boot via
\r
1105 using the following command on boot prompt:</p></div>
\r
1106 <div class="literalblock">
\r
1107 <div class="content">
\r
1108 <pre><code>grml myconfig=/dev/sda1</code></pre>
\r
1110 <div class="paragraph"><p>You do have an existing harddisk installation and want to use its configuration?
\r
1111 Let’s say the Debian system is located in /dev/sda2. You want to use the
\r
1112 directory /etc/network. This directory is activated by default in
\r
1113 /etc/grml/partconf so we don’t have to do any further work. We just need to
\r
1114 activate it via using the following commandline on bootprompt:</p></div>
\r
1115 <div class="literalblock">
\r
1116 <div class="content">
\r
1117 <pre><code>grml partconf=/dev/sda2</code></pre>
\r
1120 <div class="sect2">
\r
1121 <h3 id="_automatic_installation_of_debian_packages">Automatic installation of debian packages</h3>
\r
1122 <div class="paragraph"><p>You have a specified debian package named <em>foobar.deb</em> and want to use it with
\r
1123 (therefore: install it on) Grml by default? Notice: this feature is useful
\r
1124 especially for grml-small (a ~100 MB ISO). If you want to use it with the large
\r
1125 version of Grml you might have to overburn the ISO.</p></div>
\r
1126 <div class="paragraph"><p>Let’s assume you have burned the Grml iso to a CD-RW using a commandline like:</p></div>
\r
1127 <div class="literalblock">
\r
1128 <div class="content">
\r
1129 <pre><code>cdrecord dev=/dev/hdc -v -multi -tao grml_0.5.iso</code></pre>
\r
1131 <div class="paragraph"><p>Now create a directory named debs and place foobar.deb in it:</p></div>
\r
1132 <div class="literalblock">
\r
1133 <div class="content">
\r
1134 <pre><code>mkdir debs/ && cp foobar.deb debs/</code></pre>
\r
1136 <div class="paragraph"><p>Notice: This directory will be located in /run/live/medium after burning the second
\r
1137 session.</p></div>
\r
1138 <div class="paragraph"><p>Now create the second session containing this directory:</p></div>
\r
1139 <div class="literalblock">
\r
1140 <div class="content">
\r
1141 <pre><code>mkisofs -M grml_0.5.iso -C `cdrecord -msinfo dev=/dev/hdc` -R -o 2nd_session.iso debs</code></pre>
\r
1143 <div class="paragraph"><p>Finally append the second session to the cd using:</p></div>
\r
1144 <div class="literalblock">
\r
1145 <div class="content">
\r
1146 <pre><code>cdrecord dev=/dev/hdc -v -multi -tao 2nd_session.iso</code></pre>
\r
1148 <div class="admonitionblock">
\r
1151 <div class="title">Tip</div>
\r
1153 <td class="content">the application k3b (not available on the live CD but available through the
\r
1154 Debian repositories) provides an easy to use interface for doing the
\r
1155 multisession task.</td>
\r
1158 <div class="paragraph"><p>Now boot from your new personalized Grml CD using the debs parameter:</p></div>
\r
1159 <div class="literalblock">
\r
1160 <div class="content">
\r
1161 <pre><code>grml debs</code></pre>
\r
1164 <div class="sect2">
\r
1165 <h3 id="_run_your_own_commands_on_startup">Run your own commands on startup</h3>
\r
1166 <div class="paragraph"><p>You know that booting with <em>grml services=foobar</em> executes
\r
1167 /etc/init.d/foobar when booting Grml. But you want to setup a more
\r
1168 complex network configuration, adjust some other stuff and so on, on
\r
1169 your own? Just write a script named grml.sh which does the job and use
\r
1170 one of the mentioned boot parameters. Let’s say you have placed grml.sh
\r
1171 on your usb device (usb stick) then use the following commandline on
\r
1172 bootprompt:</p></div>
\r
1173 <div class="literalblock">
\r
1174 <div class="content">
\r
1175 <pre><code>grml myconfig=/dev/sda1</code></pre>
\r
1177 <div class="paragraph"><p>Or even better: create a device with label GRMLCFG running (adjust /dev/sdX1
\r
1178 according to your needs):</p></div>
\r
1179 <div class="literalblock">
\r
1180 <div class="content">
\r
1181 <pre><code>mkfs.ext3 -L GRMLCFG /dev/sdX1 # warning: this destroys all data on /dev/sdX1</code></pre>
\r
1183 <div class="admonitionblock">
\r
1186 <div class="title">Tip</div>
\r
1188 <td class="content">several filesystems provide the possibility to provide a label. For
\r
1189 example FAT provides this through: <em>mkfs.vfat -n GRMLCFG /dev/sda1</em> (attention:
\r
1190 this will destroy data on /dev/sda1 of course!). Take a look at the
\r
1191 documentation/manpage of the filesystem you want to use.</td>
\r
1194 <div class="paragraph"><p>Now place your configuration archive (see save-config and the other
\r
1195 usage scenarios) and the script grml.sh on the device. Now you can boot
\r
1196 your system without specifying any boot parameters on bootprompt because
\r
1197 devices labeled with GRMLCFG are mounted readonly and used by default.
\r
1198 If you did not label your device you can use the device anyway using
\r
1199 <em>grml myconfig=/dev/sdX</em> (adjust /dev/sdX) on the bootprompt.</p></div>
\r
1201 <div class="sect2">
\r
1202 <h3 id="_debug_remote_systems">Debug remote systems</h3>
\r
1203 <div class="paragraph"><p>You are responsible for a customer’s system in her data center. The system has
\r
1204 failed and you need to debug from remote, and the remote hands available in the
\r
1205 data center do not have enough knowledge to get Grml booted and configure the
\r
1206 network without external help?</p></div>
\r
1207 <div class="paragraph"><p>If the hard disk of the system is still available, you hopefully have saved a
\r
1208 configuration file with IP address, netmask and default gateway somewhere on
\r
1209 that hard disk. Grml can use the information found on a partition. Take a look
\r
1210 at the <em>partconf</em> boot parameter. Usage example: <em>grml partconf=/dev/sda2</em>
\r
1211 copies files defined in /etc/grml/partconf from /dev/sda2 to the Grml system. As
\r
1212 /etc/network is predefined in /etc/grml/partconf the configuration from
\r
1213 /dev/sda2 will be taken.</p></div>
\r
1214 <div class="paragraph"><p>Or you use a standard Grml medium and have grml read IP address, netmask and
\r
1215 default gateway from another medium like a USB stick. Take a look at the script
\r
1216 saveconfig and the boot parameter myconfig.</p></div>
\r
1217 <div class="paragraph"><p>Or you put a grml.iso file on your hard disk (maybe in /boot/grml) or on an USB
\r
1218 stick, use grub to boot from there and place debs, configuration scripts or Grml
\r
1219 configuration archives alongside the .iso.</p></div>
\r
1223 <div class="sect1">
\r
1224 <h2 id="_bugs">Bugs</h2>
\r
1225 <div class="sectionbody">
\r
1226 <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
1227 about how to report bugs.</p></div>
\r
1230 <div class="sect1">
\r
1231 <h2 id="_see_also">See also</h2>
\r
1232 <div class="sectionbody">
\r
1233 <div class="paragraph"><p>grml-autoconfig(8), restore-config(1), save-config(1)</p></div>
\r
1236 <div class="sect1">
\r
1237 <h2 id="_author">Author</h2>
\r
1238 <div class="sectionbody">
\r
1239 <div class="paragraph"><p>(c) 2005++, Michael Prokop <<a href="mailto:mika@grml.org">mika@grml.org</a>></p></div>
\r
1243 <div id="footnotes"><hr /></div>
\r
1245 <div id="footer-text">
\r
1247 2019-03-21 13:50:31 UTC
\r