make urls clickable
[grml.org.git] / config / grml-autoconfig.1.html
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
4 <head>\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
13 div#toctitle,\r
14 span#author, span#revnumber, span#revdate, span#revremark,\r
15 div#footer {\r
16   font-family: Arial,Helvetica,sans-serif;\r
17 }\r
18 \r
19 /* Serif font. */\r
20 div.sectionbody {\r
21   font-family: Georgia,"Times New Roman",Times,serif;\r
22 }\r
23 \r
24 /* Monospace font. */\r
25 tt {\r
26   font-size: inherit;\r
27 }\r
28 \r
29 body {\r
30   margin: 1em 5% 1em 5%;\r
31 }\r
32 \r
33 a {\r
34   color: blue;\r
35   text-decoration: underline;\r
36 }\r
37 a:visited {\r
38   color: fuchsia;\r
39 }\r
40 \r
41 em {\r
42   font-style: italic;\r
43   color: navy;\r
44 }\r
45 \r
46 strong {\r
47   font-weight: bold;\r
48   color: #083194;\r
49 }\r
50 \r
51 tt {\r
52   font-size: inherit;\r
53   color: navy;\r
54 }\r
55 \r
56 h1, h2, h3, h4, h5, h6 {\r
57   color: #527bbd;\r
58   margin-top: 1.2em;\r
59   margin-bottom: 0.5em;\r
60   line-height: 1.3;\r
61 }\r
62 \r
63 h1, h2, h3 {\r
64   border-bottom: 2px solid silver;\r
65 }\r
66 h2 {\r
67   padding-top: 0.5em;\r
68 }\r
69 h3 {\r
70   float: left;\r
71 }\r
72 h3 + * {\r
73   clear: left;\r
74 }\r
75 \r
76 div.sectionbody {\r
77   margin-left: 0;\r
78 }\r
79 \r
80 hr {\r
81   border: 1px solid silver;\r
82 }\r
83 \r
84 p {\r
85   margin-top: 0.5em;\r
86   margin-bottom: 0.5em;\r
87 }\r
88 \r
89 ul, ol, li > p {\r
90   margin-top: 0;\r
91 }\r
92 ul > li     { color: #aaa; }\r
93 ul > li > * { color: black; }\r
94 \r
95 pre {\r
96   padding: 0;\r
97   margin: 0;\r
98 }\r
99 \r
100 span#author {\r
101   color: #527bbd;\r
102   font-weight: bold;\r
103   font-size: 1.1em;\r
104 }\r
105 span#email {\r
106 }\r
107 span#revnumber, span#revdate, span#revremark {\r
108 }\r
109 \r
110 div#footer {\r
111   font-size: small;\r
112   border-top: 2px solid silver;\r
113   padding-top: 0.5em;\r
114   margin-top: 4.0em;\r
115 }\r
116 div#footer-text {\r
117   float: left;\r
118   padding-bottom: 0.5em;\r
119 }\r
120 div#footer-badges {\r
121   float: right;\r
122   padding-bottom: 0.5em;\r
123 }\r
124 \r
125 div#preamble {\r
126   margin-top: 1.5em;\r
127   margin-bottom: 1.5em;\r
128 }\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
132   margin-top: 1.0em;\r
133   margin-bottom: 1.5em;\r
134 }\r
135 div.admonitionblock {\r
136   margin-top: 2.0em;\r
137   margin-bottom: 2.0em;\r
138   margin-right: 10%;\r
139   color: #606060;\r
140 }\r
141 \r
142 div.content { /* Block element content. */\r
143   padding: 0;\r
144 }\r
145 \r
146 /* Block element titles. */\r
147 div.title, caption.title {\r
148   color: #527bbd;\r
149   font-weight: bold;\r
150   text-align: left;\r
151   margin-top: 1.0em;\r
152   margin-bottom: 0.5em;\r
153 }\r
154 div.title + * {\r
155   margin-top: 0;\r
156 }\r
157 \r
158 td div.title:first-child {\r
159   margin-top: 0.0em;\r
160 }\r
161 div.content div.title:first-child {\r
162   margin-top: 0.0em;\r
163 }\r
164 div.content + div.title {\r
165   margin-top: 0.0em;\r
166 }\r
167 \r
168 div.sidebarblock > div.content {\r
169   background: #ffffee;\r
170   border: 1px solid #dddddd;\r
171   border-left: 4px solid #f0f0f0;\r
172   padding: 0.5em;\r
173 }\r
174 \r
175 div.listingblock > div.content {\r
176   border: 1px solid #dddddd;\r
177   border-left: 5px solid #f0f0f0;\r
178   background: #f8f8f8;\r
179   padding: 0.5em;\r
180 }\r
181 \r
182 div.quoteblock, div.verseblock {\r
183   padding-left: 1.0em;\r
184   margin-left: 1.0em;\r
185   margin-right: 10%;\r
186   border-left: 5px solid #f0f0f0;\r
187   color: #777777;\r
188 }\r
189 \r
190 div.quoteblock > div.attribution {\r
191   padding-top: 0.5em;\r
192   text-align: right;\r
193 }\r
194 \r
195 div.verseblock > pre.content {\r
196   font-family: inherit;\r
197   font-size: inherit;\r
198 }\r
199 div.verseblock > div.attribution {\r
200   padding-top: 0.75em;\r
201   text-align: left;\r
202 }\r
203 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */\r
204 div.verseblock + div.attribution {\r
205   text-align: left;\r
206 }\r
207 \r
208 div.admonitionblock .icon {\r
209   vertical-align: top;\r
210   font-size: 1.1em;\r
211   font-weight: bold;\r
212   text-decoration: underline;\r
213   color: #527bbd;\r
214   padding-right: 0.5em;\r
215 }\r
216 div.admonitionblock td.content {\r
217   padding-left: 0.5em;\r
218   border-left: 3px solid #dddddd;\r
219 }\r
220 \r
221 div.exampleblock > div.content {\r
222   border-left: 3px solid #dddddd;\r
223   padding-left: 0.5em;\r
224 }\r
225 \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
229 \r
230 dl {\r
231   margin-top: 0.8em;\r
232   margin-bottom: 0.8em;\r
233 }\r
234 dt {\r
235   margin-top: 0.5em;\r
236   margin-bottom: 0;\r
237   font-style: normal;\r
238   color: navy;\r
239 }\r
240 dd > *:first-child {\r
241   margin-top: 0.1em;\r
242 }\r
243 \r
244 ul, ol {\r
245     list-style-position: outside;\r
246 }\r
247 ol.arabic {\r
248   list-style-type: decimal;\r
249 }\r
250 ol.loweralpha {\r
251   list-style-type: lower-alpha;\r
252 }\r
253 ol.upperalpha {\r
254   list-style-type: upper-alpha;\r
255 }\r
256 ol.lowerroman {\r
257   list-style-type: lower-roman;\r
258 }\r
259 ol.upperroman {\r
260   list-style-type: upper-roman;\r
261 }\r
262 \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
266   margin-top: 0.1em;\r
267   margin-bottom: 0.1em;\r
268 }\r
269 \r
270 div.tableblock > table {\r
271   border: 3px solid #527bbd;\r
272 }\r
273 thead, p.table.header {\r
274   font-weight: bold;\r
275   color: #527bbd;\r
276 }\r
277 tfoot {\r
278   font-weight: bold;\r
279 }\r
280 td > div.verse {\r
281   white-space: pre;\r
282 }\r
283 p.table {\r
284   margin-top: 0;\r
285 }\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
289 }\r
290 div.tableblock > table[frame="hsides"] {\r
291   border-left-style: none;\r
292   border-right-style: none;\r
293 }\r
294 div.tableblock > table[frame="vsides"] {\r
295   border-top-style: none;\r
296   border-bottom-style: none;\r
297 }\r
298 \r
299 \r
300 div.hdlist {\r
301   margin-top: 0.8em;\r
302   margin-bottom: 0.8em;\r
303 }\r
304 div.hdlist tr {\r
305   padding-bottom: 15px;\r
306 }\r
307 dt.hdlist1.strong, td.hdlist1.strong {\r
308   font-weight: bold;\r
309 }\r
310 td.hdlist1 {\r
311   vertical-align: top;\r
312   font-style: normal;\r
313   padding-right: 0.8em;\r
314   color: navy;\r
315 }\r
316 td.hdlist2 {\r
317   vertical-align: top;\r
318 }\r
319 div.hdlist.compact tr {\r
320   margin: 0;\r
321   padding-bottom: 0;\r
322 }\r
323 \r
324 .comment {\r
325   background: yellow;\r
326 }\r
327 \r
328 .footnote, .footnoteref {\r
329   font-size: 0.8em;\r
330 }\r
331 \r
332 span.footnote, span.footnoteref {\r
333   vertical-align: super;\r
334 }\r
335 \r
336 #footnotes {\r
337   margin: 20px 0 20px 0;\r
338   padding: 7px 0 0 0;\r
339 }\r
340 \r
341 #footnotes div.footnote {\r
342   margin: 0 0 5px 0;\r
343 }\r
344 \r
345 #footnotes hr {\r
346   border: none;\r
347   border-top: 1px solid silver;\r
348   height: 1px;\r
349   text-align: left;\r
350   margin-left: 0;\r
351   width: 20%;\r
352   min-width: 100px;\r
353 }\r
354 \r
355 div.colist td {\r
356   padding-right: 0.5em;\r
357   padding-bottom: 0.3em;\r
358   vertical-align: top;\r
359 }\r
360 div.colist td img {\r
361   margin-top: 0.3em;\r
362 }\r
363 \r
364 @media print {\r
365   div#footer-badges { display: none; }\r
366 }\r
367 \r
368 div#toc {\r
369   margin-bottom: 2.5em;\r
370 }\r
371 \r
372 div#toctitle {\r
373   color: #527bbd;\r
374   font-size: 1.1em;\r
375   font-weight: bold;\r
376   margin-top: 1.0em;\r
377   margin-bottom: 0.1em;\r
378 }\r
379 \r
380 div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {\r
381   margin-top: 0;\r
382   margin-bottom: 0;\r
383 }\r
384 div.toclevel2 {\r
385   margin-left: 2em;\r
386   font-size: 0.9em;\r
387 }\r
388 div.toclevel3 {\r
389   margin-left: 4em;\r
390   font-size: 0.9em;\r
391 }\r
392 div.toclevel4 {\r
393   margin-left: 6em;\r
394   font-size: 0.9em;\r
395 }\r
396 \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
413 \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
430 \r
431 span.big { font-size: 2em; }\r
432 span.small { font-size: 0.6em; }\r
433 </style>\r
434 <script type="text/javascript">\r
435 /*<![CDATA[*/\r
436 window.onload = function(){asciidoc.footnotes();}\r
437 var asciidoc = {  // Namespace.\r
438 \r
439 /////////////////////////////////////////////////////////////////////\r
440 // Table Of Contents generator\r
441 /////////////////////////////////////////////////////////////////////\r
442 \r
443 /* Author: Mihai Bazon, September 2002\r
444  * http://students.infoiasi.ro/~mishoo\r
445  *\r
446  * Table Of Content generator\r
447  * Version: 0.4\r
448  *\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
451  */\r
452 \r
453  /* modified by Troy D. Hanson, September 2006. License: GPL */\r
454  /* modified by Stuart Rackham, 2006, 2009. License: GPL */\r
455 \r
456 // toclevels = 1..4.\r
457 toc: function (toclevels) {\r
458 \r
459   function getText(el) {\r
460     var text = "";\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
463         text += i.data;\r
464       else if (i.firstChild != null)\r
465         text += getText(i);\r
466     }\r
467     return text;\r
468   }\r
469 \r
470   function TocEntry(el, text, toclevel) {\r
471     this.element = el;\r
472     this.text = text;\r
473     this.toclevel = toclevel;\r
474   }\r
475 \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
481     // browsers).\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
488           }\r
489           iterate(i);\r
490         }\r
491       }\r
492     }\r
493     iterate(el);\r
494     return result;\r
495   }\r
496 \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
510   }\r
511   if (entries.length == 0)\r
512     toc.parentNode.removeChild(toc);\r
513 },\r
514 \r
515 \r
516 /////////////////////////////////////////////////////////////////////\r
517 // Footnotes generator\r
518 /////////////////////////////////////////////////////////////////////\r
519 \r
520 /* Based on footnote generation code from:\r
521  * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html\r
522  */\r
523 \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
528   var refs = {};\r
529   var n = 0;\r
530   for (i=0; i<spans.length; i++) {\r
531     if (spans[i].className == "footnote") {\r
532       n++;\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
545     }\r
546   }\r
547   if (n == 0)\r
548     noteholder.parentNode.removeChild(noteholder);\r
549   else {\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
555         n = refs[href];\r
556         spans[i].innerHTML =\r
557           "[<a href='#_footnote_" + n +\r
558           "' title='View footnote' class='footnote'>" + n + "</a>]";\r
559       }\r
560     }\r
561   }\r
562 }\r
563 \r
564 }\r
565 /*]]>*/\r
566 </script>\r
567 </head>\r
568 <body class="article">\r
569 <div id="header">\r
570 <h1>grml-autoconfig(1)</h1>\r
571 </div>\r
572 <div id="content">\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
577 </div>\r
578 </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
584 </div>\r
585 </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&#8217;s startup in a\r
590 multitude of ways. It allows to:</p></div>\r
591 <div class="ulist"><ul>\r
592 <li>\r
593 <p>\r
594 execute one or more scripts on startup\r
595 </p>\r
596 </li>\r
597 <li>\r
598 <p>\r
599 install Debian packages from deb files on startup\r
600 </p>\r
601 </li>\r
602 <li>\r
603 <p>\r
604 unpack configuration on startup\r
605 </p>\r
606 </li>\r
607 </ul></div>\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
618 <table><tr>\r
619 <td class="icon">\r
620 <div class="title">Tip</div>\r
621 </td>\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
626 </tr></table>\r
627 </div>\r
628 <div class="admonitionblock">\r
629 <table><tr>\r
630 <td class="icon">\r
631 <div class="title">Important</div>\r
632 </td>\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
637 </tr></table>\r
638 </div>\r
639 </div>\r
640 </div>\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
660 </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
667 myconfig\r
668 </dt>\r
669 <dd>\r
670 <p>\r
671    This parameter directly sets DCSDIR to the root directory of the specified\r
672    device. Usage examples:\r
673 </p>\r
674 <div class="literalblock">\r
675 <div class="content">\r
676 <pre><tt>myconfig=/dev/sda1                        =&gt; read DCS from usb-device\r
677 myconfig=/dev/fd0                         =&gt; read DCS from floppy-disk</tt></pre>\r
678 </div></div>\r
679 </dd>\r
680 <dt class="hdlist1">\r
681 autoconfig\r
682 </dt>\r
683 <dd>\r
684 <p>\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
687 </p>\r
688 <div class="literalblock">\r
689 <div class="content">\r
690 <pre><tt>autoconfig=SOMELABEL      =&gt; search for device labeled SOMELABEL to use as\r
691                              DCS device.</tt></pre>\r
692 </div></div>\r
693 </dd>\r
694 <dt class="hdlist1">\r
695 home\r
696 </dt>\r
697 <dd>\r
698 <p>\r
699     This parameter is for setting a specific partition as home directory.  Usage\r
700     examples:\r
701 </p>\r
702 <div class="literalblock">\r
703 <div class="content">\r
704 <pre><tt>home=/dev/sda3    =&gt;  use /dev/sda3 as the homepartition\r
705 home=scan         =&gt;  scan through the available partitions and search\r
706                       for file grml.img</tt></pre>\r
707 </div></div>\r
708 </dd>\r
709 <dt class="hdlist1">\r
710 partconf\r
711 </dt>\r
712 <dd>\r
713 <p>\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
719     example:\r
720 </p>\r
721 <div class="literalblock">\r
722 <div class="content">\r
723 <pre><tt>partconf=/dev/sda2 =&gt; try to mount /dev/sda2 and copy files specified\r
724                       in /etc/grml/partconf to the booted Grml system</tt></pre>\r
725 </div></div>\r
726 </dd>\r
727 <dt class="hdlist1">\r
728 netconfig\r
729 </dt>\r
730 <dd>\r
731 <p>\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
736 </p>\r
737 <div class="literalblock">\r
738 <div class="content">\r
739 <pre><tt>netconfig=server.tld/path/to/config.tbz  =&gt;   restore configuration using wget to download file config.tbz\r
740 netconfig=server.tld/config-$ARCH.tbz    =&gt;   download config for specified architecture</tt></pre>\r
741 </div></div>\r
742 </dd>\r
743 <dt class="hdlist1">\r
744 netscript\r
745 </dt>\r
746 <dd>\r
747 <p>\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
753     Usage example:\r
754 </p>\r
755 <div class="literalblock">\r
756 <div class="content">\r
757 <pre><tt>netcript=server.tld/path/to/script       =&gt;   download and run script/executable from server\r
758 netscript=server.tld/script-$HOSTNAME    =&gt;   download and run script/executable for specific host</tt></pre>\r
759 </div></div>\r
760 </dd>\r
761 <dt class="hdlist1">\r
762 extract\r
763 </dt>\r
764 <dd>\r
765 <p>\r
766     Extract specific directories from the GCA which needs to be specified by\r
767     other means.\r
768 </p>\r
769 <div class="literalblock">\r
770 <div class="content">\r
771 <pre><tt>extract=/home/grml         =&gt; extract only /home/grml from archive\r
772 extract=/etc               =&gt; extract only /etc from archive\r
773 extract=/home/grml/config  =&gt; extract only $HOME/config from archive</tt></pre>\r
774 </div></div>\r
775 </dd>\r
776 <dt class="hdlist1">\r
777 scripts\r
778 </dt>\r
779 <dd>\r
780 <p>\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
788 </p>\r
789 <div class="literalblock">\r
790 <div class="content">\r
791 <pre><tt>scripts               =&gt;   run script DCSDIR/scripts/grml.sh\r
792 scripts=foobar.sh     =&gt;   run script foobar.sh in DCSDIR\r
793 scripts=foobar        =&gt;   run all scripts inside DCSDIR/foobar directory</tt></pre>\r
794 </div></div>\r
795 </dd>\r
796 <dt class="hdlist1">\r
797 config\r
798 </dt>\r
799 <dd>\r
800 <p>\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
804 </p>\r
805 <div class="literalblock">\r
806 <div class="content">\r
807 <pre><tt>config                    =&gt;   restore configuration using file DCSDIR/config.tbz\r
808 config=config_foobar.tbz  =&gt;   restore configuration using file DCSDIR/config_foobar.tbz</tt></pre>\r
809 </div></div>\r
810 </dd>\r
811 <dt class="hdlist1">\r
812 debs\r
813 </dt>\r
814 <dd>\r
815 <p>\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
821 </p>\r
822 <div class="literalblock">\r
823 <div class="content">\r
824 <pre><tt>Usage examples:</tt></pre>\r
825 </div></div>\r
826 <div class="literalblock">\r
827 <div class="content">\r
828 <pre><tt>debs=*.deb        =&gt;   install all debian packages (suffix .deb) from directory DCSDIR/debs/\r
829 debs=foo/01*.deb  =&gt;   install all debian packages (suffix .deb) starting with 01 in the filename from directory DCSDIR/foo</tt></pre>\r
830 </div></div>\r
831 </dd>\r
832 <dt class="hdlist1">\r
833 debnet\r
834 </dt>\r
835 <dd>\r
836 <p>\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
839 </p>\r
840 </dd>\r
841 <dt class="hdlist1">\r
842 noautoconfig\r
843 </dt>\r
844 <dd>\r
845 <p>\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
849 </p>\r
850 <div class="literalblock">\r
851 <div class="content">\r
852 <pre><tt>noautoconfig            =&gt; disables auto mounting of label 'GRMLCFG'</tt></pre>\r
853 </div></div>\r
854 </dd>\r
855 </dl></div>\r
856 </div>\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&#8217;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 &gt; bootparams/my_bootparams</tt></pre>\r
870 </div></div>\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
874 <table><tr>\r
875 <td class="icon">\r
876 <div class="title">Note</div>\r
877 </td>\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
885 </tr></table>\r
886 </div>\r
887 <div class="admonitionblock">\r
888 <table><tr>\r
889 <td class="icon">\r
890 <div class="title">Tip</div>\r
891 </td>\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
895 </tr></table>\r
896 </div>\r
897 </div>\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&#8217;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 &gt; bootparams/my_bootparams</tt></pre>\r
911 </div></div>\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
915 <table><tr>\r
916 <td class="icon">\r
917 <div class="title">Note</div>\r
918 </td>\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
926 </tr></table>\r
927 </div>\r
928 <div class="admonitionblock">\r
929 <table><tr>\r
930 <td class="icon">\r
931 <div class="title">Tip</div>\r
932 </td>\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
936 </tr></table>\r
937 </div>\r
938 </div>\r
939 </div>\r
940 </div>\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&#8217;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
954 </div></div>\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
961 </div></div>\r
962 <div class="paragraph"><p>You don&#8217;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
967 </div></div>\r
968 <div class="paragraph"><p>Floppy is to small or to slow? Ok, let&#8217;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
972 </div></div>\r
973 </div>\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
982 </div></div>\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
989 </div></div>\r
990 <div class="paragraph"><p>Floppy is to small or to slow? Ok, let&#8217;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
994 </div></div>\r
995 <div class="paragraph"><p>You do have an existing harddisk installation and want to use its configuration?\r
996 Let&#8217;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&#8217;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
1003 </div></div>\r
1004 </div>\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&#8217;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
1015 </div></div>\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/ &amp;&amp; cp foobar.deb debs/</tt></pre>\r
1020 </div></div>\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
1027 </div></div>\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
1032 </div></div>\r
1033 <div class="admonitionblock">\r
1034 <table><tr>\r
1035 <td class="icon">\r
1036 <div class="title">Tip</div>\r
1037 </td>\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
1041 </tr></table>\r
1042 </div>\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
1047 </div></div>\r
1048 </div>\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&#8217;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
1060 </div></div>\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
1066 </div></div>\r
1067 <div class="admonitionblock">\r
1068 <table><tr>\r
1069 <td class="icon">\r
1070 <div class="title">Tip</div>\r
1071 </td>\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
1076 </tr></table>\r
1077 </div>\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
1084 </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&#8217;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
1104 </div>\r
1105 </div>\r
1106 </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
1112 </div>\r
1113 </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
1118 </div>\r
1119 </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 &lt;<a href="mailto:mika@grml.org">mika@grml.org</a>&gt;</p></div>\r
1124 </div>\r
1125 </div>\r
1126 </div>\r
1127 <div id="footnotes"><hr /></div>\r
1128 <div id="footer">\r
1129 <div id="footer-text">\r
1130 Last updated 2011-05-22 13:13:56 CEST\r
1131 </div>\r
1132 </div>\r
1133 </body>\r
1134 </html>\r