daily: we no longer provide sha1/md5 files, but switched to sha256
[grml.org.git] / online-docs / grml-config.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="text/html; charset=UTF-8" />\r
6 <meta name="generator" content="AsciiDoc 7.1.2" />\r
7 <style type="text/css">\r
8 /* Debug borders */\r
9 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
10 /*\r
11   border: 1px solid red;\r
12 */\r
13 }\r
14 \r
15 body {\r
16   margin: 1em 5% 1em 5%;\r
17 }\r
18 \r
19 a {\r
20   color: blue;\r
21   text-decoration: underline;\r
22 }\r
23 a:visited {\r
24   color: fuchsia;\r
25 }\r
26 \r
27 em {\r
28   font-style: italic;\r
29 }\r
30 \r
31 strong {\r
32   font-weight: bold;\r
33 }\r
34 \r
35 tt {\r
36   color: navy;\r
37 }\r
38 \r
39 h1, h2, h3, h4, h5, h6 {\r
40   color: #527bbd;\r
41   font-family: sans-serif;\r
42   margin-top: 1.2em;\r
43   margin-bottom: 0.5em;\r
44   line-height: 1.3;\r
45 }\r
46 \r
47 h1 {\r
48   border-bottom: 2px solid silver;\r
49 }\r
50 h2 {\r
51   border-bottom: 2px solid silver;\r
52   padding-top: 0.5em;\r
53 }\r
54 \r
55 div.sectionbody {\r
56   font-family: serif;\r
57   margin-left: 0;\r
58 }\r
59 \r
60 hr {\r
61   border: 1px solid silver;\r
62 }\r
63 \r
64 p {\r
65   margin-top: 0.5em;\r
66   margin-bottom: 0.5em;\r
67 }\r
68 \r
69 pre {\r
70   padding: 0;\r
71   margin: 0;\r
72 }\r
73 \r
74 span#author {\r
75   color: #527bbd;\r
76   font-family: sans-serif;\r
77   font-weight: bold;\r
78   font-size: 1.2em;\r
79 }\r
80 span#email {\r
81 }\r
82 span#revision {\r
83   font-family: sans-serif;\r
84 }\r
85 \r
86 div#footer {\r
87   font-family: sans-serif;\r
88   font-size: small;\r
89   border-top: 2px solid silver;\r
90   padding-top: 0.5em;\r
91   margin-top: 4.0em;\r
92 }\r
93 div#footer-text {\r
94   float: left;\r
95   padding-bottom: 0.5em;\r
96 }\r
97 div#footer-badges {\r
98   float: right;\r
99   padding-bottom: 0.5em;\r
100 }\r
101 \r
102 div#preamble,\r
103 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,\r
104 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,\r
105 div.admonitionblock {\r
106   margin-right: 10%;\r
107   margin-top: 1.5em;\r
108   margin-bottom: 1.5em;\r
109 }\r
110 div.admonitionblock {\r
111   margin-top: 2.5em;\r
112   margin-bottom: 2.5em;\r
113 }\r
114 \r
115 div.content { /* Block element content. */\r
116   padding: 0;\r
117 }\r
118 \r
119 /* Block element titles. */\r
120 div.title, caption.title {\r
121   font-family: sans-serif;\r
122   font-weight: bold;\r
123   text-align: left;\r
124   margin-top: 1.0em;\r
125   margin-bottom: 0.5em;\r
126 }\r
127 div.title + * {\r
128   margin-top: 0;\r
129 }\r
130 \r
131 td div.title:first-child {\r
132   margin-top: 0.0em;\r
133 }\r
134 div.content div.title:first-child {\r
135   margin-top: 0.0em;\r
136 }\r
137 div.content + div.title {\r
138   margin-top: 0.0em;\r
139 }\r
140 \r
141 div.sidebarblock > div.content {\r
142   background: #ffffee;\r
143   border: 1px solid silver;\r
144   padding: 0.5em;\r
145 }\r
146 \r
147 div.listingblock > div.content {\r
148   border: 1px solid silver;\r
149   background: #f4f4f4;\r
150   padding: 0.5em;\r
151 }\r
152 \r
153 div.quoteblock > div.content {\r
154   padding-left: 2.0em;\r
155 }\r
156 \r
157 div.attribution {\r
158   text-align: right;\r
159 }\r
160 div.verseblock + div.attribution {\r
161   text-align: left;\r
162 }\r
163 \r
164 div.admonitionblock .icon {\r
165   vertical-align: top;\r
166   font-size: 1.1em;\r
167   font-weight: bold;\r
168   text-decoration: underline;\r
169   color: #527bbd;\r
170   padding-right: 0.5em;\r
171 }\r
172 div.admonitionblock td.content {\r
173   padding-left: 0.5em;\r
174   border-left: 2px solid silver;\r
175 }\r
176 \r
177 div.exampleblock > div.content {\r
178   border-left: 2px solid silver;\r
179   padding: 0.5em;\r
180 }\r
181 \r
182 div.verseblock div.content {\r
183   white-space: pre;\r
184 }\r
185 \r
186 div.imageblock div.content { padding-left: 0; }\r
187 div.imageblock img { border: 1px solid silver; }\r
188 span.image img { border-style: none; }\r
189 \r
190 dl {\r
191   margin-top: 0.8em;\r
192   margin-bottom: 0.8em;\r
193 }\r
194 dt {\r
195   margin-top: 0.5em;\r
196   margin-bottom: 0;\r
197   font-style: italic;\r
198 }\r
199 dd > *:first-child {\r
200   margin-top: 0;\r
201 }\r
202 \r
203 ul, ol {\r
204     list-style-position: outside;\r
205 }\r
206 ol.olist2 {\r
207   list-style-type: lower-alpha;\r
208 }\r
209 \r
210 div.tableblock > table {\r
211   border: 3px solid #527bbd;\r
212 }\r
213 thead {\r
214   font-family: sans-serif;\r
215   font-weight: bold;\r
216 }\r
217 tfoot {\r
218   font-weight: bold;\r
219 }\r
220 \r
221 div.hlist {\r
222   margin-top: 0.8em;\r
223   margin-bottom: 0.8em;\r
224 }\r
225 td.hlist1 {\r
226   vertical-align: top;\r
227   font-style: italic;\r
228   padding-right: 0.8em;\r
229 }\r
230 td.hlist2 {\r
231   vertical-align: top;\r
232 }\r
233 \r
234 @media print {\r
235   div#footer-badges { display: none; }\r
236 }\r
237 /* Workarounds for IE6's broken and incomplete CSS2. */\r
238 \r
239 div.sidebar-content {\r
240   background: #ffffee;\r
241   border: 1px solid silver;\r
242   padding: 0.5em;\r
243 }\r
244 div.sidebar-title, div.image-title {\r
245   font-family: sans-serif;\r
246   font-weight: bold;\r
247   margin-top: 0.0em;\r
248   margin-bottom: 0.5em;\r
249 }\r
250 \r
251 div.listingblock div.content {\r
252   border: 1px solid silver;\r
253   background: #f4f4f4;\r
254   padding: 0.5em;\r
255 }\r
256 \r
257 div.quoteblock-content {\r
258   padding-left: 2.0em;\r
259 }\r
260 \r
261 div.exampleblock-content {\r
262   border-left: 2px solid silver;\r
263   padding-left: 0.5em;\r
264 }\r
265 </style>\r
266 <title>grml-config(1)</title>\r
267 </head>\r
268 <body>\r
269 <div id="header">\r
270 <h1>grml-config(1)</h1>\r
271 </div>\r
272 <h2>NAME</h2>\r
273 <div class="sectionbody">\r
274 <p>save-config - save configuration ; restore-config - restore\r
275 configuration; mkpersistenthome - create persistent home directory;\r
276 more options available via bootoptions (see following documentation)</p>\r
277 </div>\r
278 <h2>SYNOPSIS</h2>\r
279 <div class="sectionbody">\r
280 <p>save-config - please take a look at <em>save-config -h</em> ; restore-config\r
281 - please take a look at <em>restore-config -h</em>, mkpersistenthome (no\r
282 options available)</p>\r
283 <div class="sidebarblock">\r
284 <div class="sidebar-content">\r
285 <p>Documentation written by <a href="mailto:mika@grml.org"><em>Michael Prokop</em></a> using AsciiDoc.</p>\r
286 <p>Please notice that the config framework is at an early stage of\r
287 development. Please report bugs, wishes and feedback\r
288 <a href="http://grml.org/contact/">to the grml-team</a>!</p>\r
289 </div></div>\r
290 </div>\r
291 <h2>Introduction</h2>\r
292 <div class="sectionbody">\r
293 <p>By using the config-framework it is possible to save the configuration\r
294 of a running grml system and restore it later. save-config is a script\r
295 to store your running configuration inside a bzip2 compressed tar\r
296 archive (from now on known as the <em>configuration file</em>).\r
297 restore-config is a script to restore a configuration using the stored\r
298 configuration file.  Several bootoptions provide additional features.\r
299 If you do not know where to start just take a look at the available\r
300 options and read the section <a href="#X7">usage scenarios</a>.</p>\r
301 <div class="admonitionblock">\r
302 <table><tr>\r
303 <td class="icon">\r
304 <div class="title">Tip</div>\r
305 </td>\r
306 <td class="content">The generated configuration archives are plain bzip2 compressed tar\r
307 archives. All the files are generated starting from the root-directory\r
308 <em>/</em> so it is easy to handle. You can generate configuration archives\r
309 manually as well, save-config is just a frontend which should make it\r
310 easier to use.</td>\r
311 </tr></table>\r
312 </div>\r
313 </div>\r
314 <h2>Autoconfiguration</h2>\r
315 <div class="sectionbody">\r
316 <p>By default the booting process tries to mount a device labeled\r
317 <em>GRMLCFG</em>. This provides the possibility to restore a configuration\r
318 (named config.tbz) and execute a script (named grml.sh) without the\r
319 need to specify any bootparams. If you want to disable this feature\r
320 please take a look at the <em>noautoconfig</em> bootparam.</p>\r
321 </div>\r
322 <h2>Boot options</h2>\r
323 <div class="sectionbody">\r
324 <p>As you probably know you can adjust boot parameters on the bootprompt.\r
325 You want to set some boot options permanently? That's possible via\r
326 adding a directory named <em>bootparams</em> to the grml-ISO which has to be\r
327 located at /cdrom/bootparams/ afterwards. Place a textfile inside the\r
328 directory containing the bootoptions which should be appended to\r
329 default ones (this corresponds to booting without any special\r
330 options). If you want to be able to boot from your grml-CD you have to\r
331 create a multisession CD. See the <a href="#X7">usage scenarios</a> for more\r
332 details how to use it.</p>\r
333 </div>\r
334 <h2>Scripts</h2>\r
335 <div class="sectionbody">\r
336 <h3>save-config - save configuration</h3>\r
337 <p>This script generates a plain bzip2 compressed tar archive containing\r
338 the specified files. The following options are supported for\r
339 specifying which parts should be saved in the configuration file:</p>\r
340 <div class="literalblock">\r
341 <div class="content">\r
342 <pre><tt>-home                         store hidden files from $HOME ($HOME/.*)\r
343 -grmlhome                     store hidden files from \$HOME (\$HOME/.*) of user grml [use as user root]\r
344 -etc                          store modified files from /etc\r
345 -configdir                    store $HOME/config\r
346 -all                          store all configuration files (:= -home, -configdir and -etc)</tt></pre>\r
347 </div></div>\r
348 <div class="admonitionblock">\r
349 <table><tr>\r
350 <td class="icon">\r
351 <div class="title">Tip</div>\r
352 </td>\r
353 <td class="content">It is also possible to use environment variables for specifying which parts\r
354 should be saved.  Just set the corresponding variable: $SAVE_HOME, $SAVE_ETC,\r
355 $SAVE_CONFIGDIR and $SAVE_ALL</td>\r
356 </tr></table>\r
357 </div>\r
358 <p>The default filename of the generated configuration file is\r
359 config.tbz.  The following options are supported for specifying\r
360 another destination of the configuration file:</p>\r
361 <div class="literalblock">\r
362 <div class="content">\r
363 <pre><tt>-ssh user@host:/path/to/file  copy configuration via ssh/scp to remote host\r
364 -mail &lt;recipient&gt;             send configuration via mail\r
365 -file foo_bar_config.tbz      save configuration in specified file</tt></pre>\r
366 </div></div>\r
367 <p>Usage examples:</p>\r
368 <div class="literalblock">\r
369 <div class="content">\r
370 <pre><tt>save-config -all                                  =&gt; store all configuration files in config.tbz in current dir\r
371 save-config -home -mail  devnull@grml.org         =&gt; store $HOME/.* in config.tbz and send it via mail\r
372 save-config -etc  -ssh   devnull@grml.org:/path/  =&gt; store /etc in config.tbz and scp it to specified host\r
373 save-config -all  -file  foo.tbz                  =&gt; store all configuration files in foo.tbz\r
374 SAVE_ALL=yes save-config -file /path/foo.tbz      =&gt; store all configuration files in /path/foo.tbz</tt></pre>\r
375 </div></div>\r
376 <h3>restore-config - restore configuration</h3>\r
377 <p>You can restore a configuration using the bootoptions or by a script\r
378 file named <em>restore-config</em>.  Specify the filename of the\r
379 configuration archive which should be used as a parameter. The\r
380 following options are available to specify which parts of the archive\r
381 should be extracted.</p>\r
382 <div class="literalblock">\r
383 <div class="content">\r
384 <pre><tt>-home                         extract hidden files from $HOME ($HOME/.*)\r
385 -grmlhome                     store hidden files from \$HOME (\$HOME/.*) of user grml [use as user root]\r
386 -etc                          extract modified files from /etc\r
387 -configdir                    extract $HOME/config</tt></pre>\r
388 </div></div>\r
389 <p>The default is to extract (restore) all files found in the archive.</p>\r
390 <div class="admonitionblock">\r
391 <table><tr>\r
392 <td class="icon">\r
393 <div class="title">Tip</div>\r
394 </td>\r
395 <td class="content">It is also possible to use environment variables for specifying\r
396 which part should be restored. Just set the corresponding variable:\r
397 $RESTORE_HOME, $RESTORE_ETC, $RESTORE_CONFIGDIR and $RESTORE_ALL</td>\r
398 </tr></table>\r
399 </div>\r
400 <p>Usage examples:</p>\r
401 <div class="literalblock">\r
402 <div class="content">\r
403 <pre><tt>restore-config -home foo_bar_config.tbz  =&gt; restore configuration from file foo_bar_config.tbz\r
404 restore-config config.tbz                =&gt; restore configuration from file config.tbz</tt></pre>\r
405 </div></div>\r
406 <h3>mkpersistenthome - use persistent home-directory</h3>\r
407 <p>You have a local partition you would like to use as your\r
408 home-directory?  Just use the interactive script called\r
409 <em>mkpersistenthome</em>. It will either create a file named grml.img on the\r
410 specified partition or create a partition using the ext2 filesystem\r
411 (you can specify the option in a dialog inside the program). grml.img\r
412 is a loopback device which size you can specify manually.  It is\r
413 possible to scan through the partitions to identify the appropriate\r
414 partition. To use a home-directory located on your hard-drive use the\r
415 appropriate bootoption on bootprompt:</p>\r
416 <div class="literalblock">\r
417 <div class="content">\r
418 <pre><tt>home=/dev/hda3    =&gt;   use /dev/hda3 as the homepartition\r
419 home=scan         =&gt;   scan through the available partitions and search for file grml.img</tt></pre>\r
420 </div></div>\r
421 </div>\r
422 <h2>Boot-Options</h2>\r
423 <div class="sectionbody">\r
424 <p>The following bootoptions are supported. Use them at the (isolinux)\r
425 bootprompt as documented here.</p>\r
426 <dl>\r
427 <dt>\r
428 myconfig\r
429 </dt>\r
430 <dd>\r
431 <p>\r
432     This option is for restoring configuration using the file config.tbz\r
433     on the specified device. Usage examples:\r
434 </p>\r
435 <div class="literalblock">\r
436 <div class="content">\r
437 <pre><tt>myconfig=/dev/sda1                        =&gt; use file config.tbz from usb-device\r
438 myconfig=/dev/fd0                         =&gt; use file config.tbz from floppy-disk\r
439 myconfig=/dev/sda1 file=config_foobar.tbz =&gt; use file config_foobar.tbz from usb-device</tt></pre>\r
440 </div></div>\r
441 </dd>\r
442 <dt>\r
443 home\r
444 </dt>\r
445 <dd>\r
446 <p>\r
447     This option is for setting a specific partition as home directory.\r
448     Usage examples:\r
449 </p>\r
450 <div class="literalblock">\r
451 <div class="content">\r
452 <pre><tt>home=/dev/hda3    =&gt;  use /dev/hda3 as the homepartition\r
453 home=scan         =&gt;  scan through the available partitions and search\r
454                       for file grml.img</tt></pre>\r
455 </div></div>\r
456 </dd>\r
457 <dt>\r
458 partconf\r
459 </dt>\r
460 <dd>\r
461 <p>\r
462     This option mounts the specified device in read-only mode and tries\r
463     to copy all files specified in /etc/grml/partconf to the grml\r
464     system. This provides the possibility to use the configuration of a\r
465     harddisk installation. For example using the network configuration\r
466     (which is specified in /etc/network) is possible using this\r
467     bootoption. Usage example:\r
468 </p>\r
469 <div class="literalblock">\r
470 <div class="content">\r
471 <pre><tt>partconf=/dev/hda2 =&gt; try to mount /dev/hda2 and copy files specified\r
472                       in /etc/grml/partconf to the booted grml system</tt></pre>\r
473 </div></div>\r
474 </dd>\r
475 <dt>\r
476 netconfig\r
477 </dt>\r
478 <dd>\r
479 <p>\r
480     Use this option to restore configuration using wget to download\r
481     a configuration file from specified destination. Usage example:\r
482 </p>\r
483 <div class="literalblock">\r
484 <div class="content">\r
485 <pre><tt>netconfig=server.tld/path/to/config.tbz  =&gt;   restore configuration using wget to download file config.tbz</tt></pre>\r
486 </div></div>\r
487 </dd>\r
488 <dt>\r
489 extract\r
490 </dt>\r
491 <dd>\r
492 <p>\r
493     Extract specific directories from configuration archive. Notice:\r
494     This bootparam is useful only with bootparams which are able to\r
495     extract configuration archives.\r
496 </p>\r
497 <div class="literalblock">\r
498 <div class="content">\r
499 <pre><tt>extract=/home/grml         =&gt; extract only /home/grml from archive\r
500 extract=/etc               =&gt; extract only /etc from archive\r
501 extract=/home/grml/config  =&gt; extract only $HOME/config from archive</tt></pre>\r
502 </div></div>\r
503 </dd>\r
504 <dt>\r
505 scripts\r
506 </dt>\r
507 <dd>\r
508 <p>\r
509     This option can start a script located in /cdrom/scripts/.\r
510     Usage examples:\r
511 </p>\r
512 <div class="literalblock">\r
513 <div class="content">\r
514 <pre><tt>scripts               =&gt;   run script /cdrom/scripts/grml.sh\r
515 scripts=foobar.sh     =&gt;   run script foobar.sh in /cdrom/scripts/</tt></pre>\r
516 </div></div>\r
517 </dd>\r
518 <dt>\r
519 config\r
520 </dt>\r
521 <dd>\r
522 <p>\r
523     Use this option to restore a configuration using directory\r
524     /cdrom/config (located in root-directory on a usb-device). Usage\r
525     examples:\r
526 </p>\r
527 <div class="literalblock">\r
528 <div class="content">\r
529 <pre><tt>config                    =&gt;   restore configuration using file config.tbz from directory /cdrom/config/\r
530 config=config_foobar.tbz  =&gt;   restore configuration using file config_foobar.tbz from directory /cdrom/config/</tt></pre>\r
531 </div></div>\r
532 </dd>\r
533 <dt>\r
534 debs\r
535 </dt>\r
536 <dd>\r
537 <p>\r
538     This options allows automatic installation of deb packages while\r
539     booting. The debian packages have to be located in directory\r
540     /cdrom/debs/. Usage examples:\r
541 </p>\r
542 <div class="literalblock">\r
543 <div class="content">\r
544 <pre><tt>debs              =&gt;   install all debian packages (suffix .deb) from directory /cdrom/debs/\r
545 debs=01           =&gt;   install all debian packages (suffix .deb) starting with 01 in the filename from directory /cdrom/debs/</tt></pre>\r
546 </div></div>\r
547 </dd>\r
548 <dt>\r
549 noautoconfig\r
550 </dt>\r
551 <dd>\r
552 <p>\r
553     Deactivate automounting. By default the command <em>mount</em> tries to mount a\r
554     device with label <em>GRMLCFG</em>. If you specify the noautoconfig bootparam\r
555     the automounting will be deactivated.\r
556 </p>\r
557 <div class="literalblock">\r
558 <div class="content">\r
559 <pre><tt>noautoconfig            =&gt; disables auto mounting of label 'GRMLCFG'</tt></pre>\r
560 </div></div>\r
561 </dd>\r
562 </dl>\r
563 </div>\r
564 <h2><a id="X7"></a>Usage scenarios</h2>\r
565 <div class="sectionbody">\r
566 <h3>Personal configuration files</h3>\r
567 <p>You are a fan of the editor vim? Great. You probably have your own\r
568 ~/.vimrc and want to use it on the grml system. You also don't like\r
569 the default zsh configuration and want to use your own ~/.zshrc?\r
570 How to procede? Copy your .vimrc and .zshrc to $HOME of user <em>grml</em>.\r
571 Place additional files in $HOME/config. Now create a configuration for\r
572 your files running:</p>\r
573 <div class="literalblock">\r
574 <div class="content">\r
575 <pre><tt>save-config -home -configdir</tt></pre>\r
576 </div></div>\r
577 <p>Now you should have a file named config.tbz containing your\r
578 configuration files. You can copy the archive to a webserver\r
579 and restore it via downloading during reboot using the following\r
580 commandline on bootprompt:</p>\r
581 <div class="literalblock">\r
582 <div class="content">\r
583 <pre><tt>grml netconfig=server.tld/path/to/config.tbz</tt></pre>\r
584 </div></div>\r
585 <p>You don't have network access but own a floppy drive? Copy the file\r
586 to a floppy disk and boot with:</p>\r
587 <div class="literalblock">\r
588 <div class="content">\r
589 <pre><tt>grml myconfig=/dev/fd0</tt></pre>\r
590 </div></div>\r
591 <p>Floppy is to small or to slow? Ok, let's use a usb device:</p>\r
592 <div class="literalblock">\r
593 <div class="content">\r
594 <pre><tt>grml myconfig=/dev/sda1</tt></pre>\r
595 </div></div>\r
596 <h3>Network configuration</h3>\r
597 <p>You need a specific network setup and want to use your own\r
598 /etc/network/interfaces by default? Generate the configuration\r
599 archive running the following command as user root:</p>\r
600 <div class="literalblock">\r
601 <div class="content">\r
602 <pre><tt>save-config -etc</tt></pre>\r
603 </div></div>\r
604 <p>Now you should have a file named config.tbz containing your\r
605 configuration files. If you want to use it with a floppy disk copy the\r
606 file to a floppy and boot via using the following command on\r
607 bootprompt:</p>\r
608 <div class="literalblock">\r
609 <div class="content">\r
610 <pre><tt>grml myconfig=/dev/fd0</tt></pre>\r
611 </div></div>\r
612 <p>Floppy is to small or to slow? Ok, let's use a usb device:</p>\r
613 <div class="literalblock">\r
614 <div class="content">\r
615 <pre><tt>grml myconfig=/dev/sda1</tt></pre>\r
616 </div></div>\r
617 <p>You do have an existing harddisk installation and want to use its\r
618 configuration? Let's say the debian system is located in /dev/hda2. You\r
619 want to use the directory /etc/network. This directory is activated by\r
620 default in /etc/grml/partconf so we don't have to do any further work.\r
621 We just need to activate it via using the following commandline on\r
622 bootprompt:</p>\r
623 <div class="literalblock">\r
624 <div class="content">\r
625 <pre><tt>grml partconf=/dev/hda2</tt></pre>\r
626 </div></div>\r
627 <h3>Automatic installation of debian packages</h3>\r
628 <p>You have a specified debian package named <em>foobar.deb</em> and want to use\r
629 it with (therefore: install it on) grml by default? Notice: this feature\r
630 is useful especially for grml-small (a 50 MB ISO). If you want to use it\r
631 with the 700MB version of grml you have to overburn the ISO.</p>\r
632 <p>Let's assume you have burned the grml iso to a CD-RW using a commandline like:</p>\r
633 <div class="literalblock">\r
634 <div class="content">\r
635 <pre><tt>cdrecord dev=/dev/hdc -v -multi -tao grml_0.5.iso</tt></pre>\r
636 </div></div>\r
637 <p>Now create a directory named debs and place foobar.deb in it:</p>\r
638 <div class="literalblock">\r
639 <div class="content">\r
640 <pre><tt>mkdir debs/ &amp;&amp; cp foobar.deb debs/</tt></pre>\r
641 </div></div>\r
642 <p>Notice: This directory will be located in /cdrom after burning the second session.</p>\r
643 <p>Now create the second session containing this directory:</p>\r
644 <div class="literalblock">\r
645 <div class="content">\r
646 <pre><tt>mkisofs -M grml_0.5.iso -C `cdrecord -msinfo dev=/dev/hdc` -R -o 2nd_session.iso debs</tt></pre>\r
647 </div></div>\r
648 <p>Finally append the second session to the cd using:</p>\r
649 <div class="literalblock">\r
650 <div class="content">\r
651 <pre><tt>cdrecord dev=/dev/hdc -v -multi -tao 2nd_session.iso</tt></pre>\r
652 </div></div>\r
653 <div class="admonitionblock">\r
654 <table><tr>\r
655 <td class="icon">\r
656 <div class="title">Tip</div>\r
657 </td>\r
658 <td class="content">the application k3b (not available on the live-CD but available\r
659 through the Debian repositories) provides an easy to use interface for\r
660 doing the multisession task.</td>\r
661 </tr></table>\r
662 </div>\r
663 <p>Now boot from your new personalized grml cd using the debs option:</p>\r
664 <div class="literalblock">\r
665 <div class="content">\r
666 <pre><tt>grml debs</tt></pre>\r
667 </div></div>\r
668 <h3>Run your own commands</h3>\r
669 <p>You know that booting with <em>grml service=foobar</em> executes\r
670 /etc/init.d/foobar when booting grml. But you want to setup a more\r
671 complex network configuration, adjust some other stuff and so on on your\r
672 own? Just write a script named grml.sh which does the job and use own\r
673 of the mentioned bootparams. Let's say you have placed grml.sh on your\r
674 usb device (usb stick) then use the following commandline on bootprompt:</p>\r
675 <div class="literalblock">\r
676 <div class="content">\r
677 <pre><tt>grml myconfig=/dev/sda1</tt></pre>\r
678 </div></div>\r
679 <p>Or even better: create a floppy disk with label GRMLCFG running:</p>\r
680 <div class="literalblock">\r
681 <div class="content">\r
682 <pre><tt>fdformat /dev/fd0   # format the floppy disk if not done already\r
683 mkfs.ext2 -L GRMLCFG /dev/fd0   # now create ext2 filesystem with label GRMLCFG on it:</tt></pre>\r
684 </div></div>\r
685 <div class="admonitionblock">\r
686 <table><tr>\r
687 <td class="icon">\r
688 <div class="title">Tip</div>\r
689 </td>\r
690 <td class="content">several filesystems provide the possibility to provide a label.\r
691 For example FAT provides this through: <em>mkfs.vfat -n GRMLCFG\r
692 /dev/sda1</em> (attention: this will destroy data on /dev/sda1 of\r
693 course!). Take a look at the documentation/manpage of the filesystem\r
694 you want to use.</td>\r
695 </tr></table>\r
696 </div>\r
697 <p>Now place your configuration archive (see save-config and the other\r
698 usage scenarios) and the script grml.sh on the floppy disk. Now you can\r
699 boot your system without specifying any bootparameters on bootprompt\r
700 because devices labeled with GRMLCFG are mounted readonly and used by\r
701 default. If you did not label your device you can use the device anyway\r
702 using <em>grml myconfig=/dev/ice</em> on the bootprompt.</p>\r
703 <h3>Debug remote systems</h3>\r
704 <p>You are responsible for a customer's system in her data center. The\r
705 system has failed and you need to debug from remote, and the remote\r
706 hands available in the data center do not have enough knowledge to get\r
707 grml booted and configure the network without external help?</p>\r
708 <p>If the hard disk of the system is still available, you hopefully have\r
709 saved a configuration file with IP address, netmask and default\r
710 gateway somewhere on that hard disk. grml can use the information\r
711 found on a partition. Take a look at the <em>partconf</em> boot parameter.\r
712 Usage example: <em>grml partconf=/dev/hda2</em> copies files defined in\r
713 /etc/grml/partconf from /dev/hda2 to the grml system. As /etc/network\r
714 is predefined in /etc/grml/partconf the configuration from /dev/hda2\r
715 will be taken.</p>\r
716 <p>Or you use a standard grml medium and have grml read IP address,\r
717 netmask and default gateway from another medium like a floppy or an USB\r
718 stick. Take a look at the script saveconfig and the boot parameter\r
719 myconfig.</p>\r
720 <h3>Adjust boot parameters</h3>\r
721 <p>You want to set some boot options permanently? Just add a directory\r
722 named <em>bootparams</em> to the CD-ROM so it is located at\r
723 /cdrom/bootparams/ and contains a textfile with the bootparams you\r
724 would like to use.</p>\r
725 <div class="literalblock">\r
726 <div class="content">\r
727 <pre><tt>mkdir bootparams\r
728 echo lang=de &gt; bootparams/my_bootparams</tt></pre>\r
729 </div></div>\r
730 <p>Now burn a multisession CD where directory bootparams is located in the\r
731 root directory of the CD.</p>\r
732 <div class="admonitionblock">\r
733 <table><tr>\r
734 <td class="icon">\r
735 <div class="title">Tip</div>\r
736 </td>\r
737 <td class="content">the application k3b (not available on the live-CD but available\r
738 through the Debian repositories) provides an easy to use interface for\r
739 doing the multisession task.</td>\r
740 </tr></table>\r
741 </div>\r
742 <h3>Use persistent home directory</h3>\r
743 <p>You want to use a persistent home directory which includes all the files\r
744 located in $HOME. Use the script mkpersistenthome to create such a\r
745 persistent home directory. You have the options to either use a\r
746 specific partition as your home directory or add a loopback file\r
747 named grml.img on the specified partition (the default).</p>\r
748 <div class="admonitionblock">\r
749 <table><tr>\r
750 <td class="icon">\r
751 <div class="title">Tip</div>\r
752 </td>\r
753 <td class="content">/dev/external in the partition selection of mkpersistenthome is\r
754 an usb device without partitions. /dev/external1 corresponds to the\r
755 first partition on an usb device (usually an usb stick).</td>\r
756 </tr></table>\r
757 </div>\r
758 <p>After running the script mkpersistenthome you can use the boot\r
759 parameter home to activate the home directory. If you are using the\r
760 option with the loopback file (grml.img) you can boot via:</p>\r
761 <div class="literalblock">\r
762 <div class="content">\r
763 <pre><tt>grml home=scan</tt></pre>\r
764 </div></div>\r
765 <p>which will scan through the partitions and if a file grml.img is found\r
766 it will be mounted as your $HOME-directory. If you want to use a\r
767 partition as your home directory specify the device as an option. If\r
768 you want to use /dev/hda2 as your $HOME boot via:</p>\r
769 <div class="literalblock">\r
770 <div class="content">\r
771 <pre><tt>grml home=/dev/hda2</tt></pre>\r
772 </div></div>\r
773 <p>Notice: the files located in /etc/skel will be copied to the partition\r
774 (but will not overwrite any files).</p>\r
775 <h3>Bugs</h3>\r
776 <p>Please report feedback, bugreports and wishes <a href="http://grml.org/contact/">to us</a>!</p>\r
777 <h3>Author</h3>\r
778 <p>(c) 2005, Michael Prokop &lt;mika@grml.org&gt;</p>\r
779 </div>\r
780 <div id="footer">\r
781 <div id="footer-text">\r
782 Last updated 16-Sep-2007 02:51:43 CEST\r
783 </div>\r
784 </div>\r
785 </body>\r
786 </html>\r