1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
\r
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
\r
5 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
\r
6 <meta name="generator" content="AsciiDoc 8.6.9" />
\r
7 <title>grml2usb(8)</title>
\r
8 <style type="text/css">
\r
9 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
\r
13 font-family: Georgia,serif;
\r
17 h1, h2, h3, h4, h5, h6,
\r
18 div.title, caption.title,
\r
19 thead, p.table.header,
\r
21 #author, #revnumber, #revdate, #revremark,
\r
23 font-family: Arial,Helvetica,sans-serif;
\r
27 margin: 1em 5% 1em 5%;
\r
32 text-decoration: underline;
\r
48 h1, h2, h3, h4, h5, h6 {
\r
51 margin-bottom: 0.5em;
\r
56 border-bottom: 2px solid silver;
\r
76 border: 1px solid silver;
\r
81 margin-bottom: 0.5em;
\r
87 ul > li { color: #aaa; }
\r
88 ul > li > * { color: black; }
\r
90 .monospaced, code, pre {
\r
91 font-family: "Courier New", Courier, monospace;
\r
98 white-space: pre-wrap;
\r
108 #revnumber, #revdate, #revremark {
\r
113 border-top: 2px solid silver;
\r
114 padding-top: 0.5em;
\r
119 padding-bottom: 0.5em;
\r
123 padding-bottom: 0.5em;
\r
128 margin-bottom: 1.5em;
\r
130 div.imageblock, div.exampleblock, div.verseblock,
\r
131 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
\r
132 div.admonitionblock {
\r
134 margin-bottom: 1.5em;
\r
136 div.admonitionblock {
\r
138 margin-bottom: 2.0em;
\r
143 div.content { /* Block element content. */
\r
147 /* Block element titles. */
\r
148 div.title, caption.title {
\r
153 margin-bottom: 0.5em;
\r
159 td div.title:first-child {
\r
162 div.content div.title:first-child {
\r
165 div.content + div.title {
\r
169 div.sidebarblock > div.content {
\r
170 background: #ffffee;
\r
171 border: 1px solid #dddddd;
\r
172 border-left: 4px solid #f0f0f0;
\r
176 div.listingblock > div.content {
\r
177 border: 1px solid #dddddd;
\r
178 border-left: 5px solid #f0f0f0;
\r
179 background: #f8f8f8;
\r
183 div.quoteblock, div.verseblock {
\r
184 padding-left: 1.0em;
\r
185 margin-left: 1.0em;
\r
187 border-left: 5px solid #f0f0f0;
\r
191 div.quoteblock > div.attribution {
\r
192 padding-top: 0.5em;
\r
196 div.verseblock > pre.content {
\r
197 font-family: inherit;
\r
198 font-size: inherit;
\r
200 div.verseblock > div.attribution {
\r
201 padding-top: 0.75em;
\r
204 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
\r
205 div.verseblock + div.attribution {
\r
209 div.admonitionblock .icon {
\r
210 vertical-align: top;
\r
213 text-decoration: underline;
\r
215 padding-right: 0.5em;
\r
217 div.admonitionblock td.content {
\r
218 padding-left: 0.5em;
\r
219 border-left: 3px solid #dddddd;
\r
222 div.exampleblock > div.content {
\r
223 border-left: 3px solid #dddddd;
\r
224 padding-left: 0.5em;
\r
227 div.imageblock div.content { padding-left: 0; }
\r
228 span.image img { border-style: none; vertical-align: text-bottom; }
\r
229 a.image:visited { color: white; }
\r
233 margin-bottom: 0.8em;
\r
238 font-style: normal;
\r
241 dd > *:first-child {
\r
246 list-style-position: outside;
\r
249 list-style-type: decimal;
\r
252 list-style-type: lower-alpha;
\r
255 list-style-type: upper-alpha;
\r
258 list-style-type: lower-roman;
\r
261 list-style-type: upper-roman;
\r
264 div.compact ul, div.compact ol,
\r
265 div.compact p, div.compact p,
\r
266 div.compact div, div.compact div {
\r
268 margin-bottom: 0.1em;
\r
280 margin-bottom: 0.8em;
\r
283 padding-bottom: 15px;
\r
285 dt.hdlist1.strong, td.hdlist1.strong {
\r
289 vertical-align: top;
\r
290 font-style: normal;
\r
291 padding-right: 0.8em;
\r
295 vertical-align: top;
\r
297 div.hdlist.compact tr {
\r
303 background: yellow;
\r
306 .footnote, .footnoteref {
\r
310 span.footnote, span.footnoteref {
\r
311 vertical-align: super;
\r
315 margin: 20px 0 20px 0;
\r
316 padding: 7px 0 0 0;
\r
319 #footnotes div.footnote {
\r
325 border-top: 1px solid silver;
\r
334 padding-right: 0.5em;
\r
335 padding-bottom: 0.3em;
\r
336 vertical-align: top;
\r
338 div.colist td img {
\r
343 #footer-badges { display: none; }
\r
347 margin-bottom: 2.5em;
\r
355 margin-bottom: 0.1em;
\r
358 div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
\r
375 span.aqua { color: aqua; }
\r
376 span.black { color: black; }
\r
377 span.blue { color: blue; }
\r
378 span.fuchsia { color: fuchsia; }
\r
379 span.gray { color: gray; }
\r
380 span.green { color: green; }
\r
381 span.lime { color: lime; }
\r
382 span.maroon { color: maroon; }
\r
383 span.navy { color: navy; }
\r
384 span.olive { color: olive; }
\r
385 span.purple { color: purple; }
\r
386 span.red { color: red; }
\r
387 span.silver { color: silver; }
\r
388 span.teal { color: teal; }
\r
389 span.white { color: white; }
\r
390 span.yellow { color: yellow; }
\r
392 span.aqua-background { background: aqua; }
\r
393 span.black-background { background: black; }
\r
394 span.blue-background { background: blue; }
\r
395 span.fuchsia-background { background: fuchsia; }
\r
396 span.gray-background { background: gray; }
\r
397 span.green-background { background: green; }
\r
398 span.lime-background { background: lime; }
\r
399 span.maroon-background { background: maroon; }
\r
400 span.navy-background { background: navy; }
\r
401 span.olive-background { background: olive; }
\r
402 span.purple-background { background: purple; }
\r
403 span.red-background { background: red; }
\r
404 span.silver-background { background: silver; }
\r
405 span.teal-background { background: teal; }
\r
406 span.white-background { background: white; }
\r
407 span.yellow-background { background: yellow; }
\r
409 span.big { font-size: 2em; }
\r
410 span.small { font-size: 0.6em; }
\r
412 span.underline { text-decoration: underline; }
\r
413 span.overline { text-decoration: overline; }
\r
414 span.line-through { text-decoration: line-through; }
\r
416 div.unbreakable { page-break-inside: avoid; }
\r
426 margin-bottom: 1.5em;
\r
428 div.tableblock > table {
\r
429 border: 3px solid #527bbd;
\r
431 thead, p.table.header {
\r
438 /* Because the table frame attribute is overriden by CSS in most browsers. */
\r
439 div.tableblock > table[frame="void"] {
\r
440 border-style: none;
\r
442 div.tableblock > table[frame="hsides"] {
\r
443 border-left-style: none;
\r
444 border-right-style: none;
\r
446 div.tableblock > table[frame="vsides"] {
\r
447 border-top-style: none;
\r
448 border-bottom-style: none;
\r
459 margin-bottom: 1.5em;
\r
461 thead, p.tableblock.header {
\r
470 border-spacing: 0px;
\r
471 border-style: solid;
\r
472 border-color: #527bbd;
\r
473 border-collapse: collapse;
\r
475 th.tableblock, td.tableblock {
\r
478 border-style: solid;
\r
479 border-color: #527bbd;
\r
482 table.tableblock.frame-topbot {
\r
483 border-left-style: hidden;
\r
484 border-right-style: hidden;
\r
486 table.tableblock.frame-sides {
\r
487 border-top-style: hidden;
\r
488 border-bottom-style: hidden;
\r
490 table.tableblock.frame-none {
\r
491 border-style: hidden;
\r
494 th.tableblock.halign-left, td.tableblock.halign-left {
\r
497 th.tableblock.halign-center, td.tableblock.halign-center {
\r
498 text-align: center;
\r
500 th.tableblock.halign-right, td.tableblock.halign-right {
\r
504 th.tableblock.valign-top, td.tableblock.valign-top {
\r
505 vertical-align: top;
\r
507 th.tableblock.valign-middle, td.tableblock.valign-middle {
\r
508 vertical-align: middle;
\r
510 th.tableblock.valign-bottom, td.tableblock.valign-bottom {
\r
511 vertical-align: bottom;
\r
521 padding-top: 0.5em;
\r
522 padding-bottom: 0.5em;
\r
523 border-top: 2px solid silver;
\r
524 border-bottom: 2px solid silver;
\r
527 border-style: none;
\r
529 body.manpage div.sectionbody {
\r
534 body.manpage div#toc { display: none; }
\r
539 <script type="text/javascript">
\r
541 var asciidoc = { // Namespace.
\r
543 /////////////////////////////////////////////////////////////////////
\r
544 // Table Of Contents generator
\r
545 /////////////////////////////////////////////////////////////////////
\r
547 /* Author: Mihai Bazon, September 2002
\r
548 * http://students.infoiasi.ro/~mishoo
\r
550 * Table Of Content generator
\r
553 * Feel free to use this script under the terms of the GNU General Public
\r
554 * License, as long as you do not remove or alter this notice.
\r
557 /* modified by Troy D. Hanson, September 2006. License: GPL */
\r
558 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
\r
560 // toclevels = 1..4.
\r
561 toc: function (toclevels) {
\r
563 function getText(el) {
\r
565 for (var i = el.firstChild; i != null; i = i.nextSibling) {
\r
566 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
\r
568 else if (i.firstChild != null)
\r
569 text += getText(i);
\r
574 function TocEntry(el, text, toclevel) {
\r
577 this.toclevel = toclevel;
\r
580 function tocEntries(el, toclevels) {
\r
581 var result = new Array;
\r
582 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
\r
583 // Function that scans the DOM tree for header elements (the DOM2
\r
584 // nodeIterator API would be a better technique but not supported by all
\r
586 var iterate = function (el) {
\r
587 for (var i = el.firstChild; i != null; i = i.nextSibling) {
\r
588 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
\r
589 var mo = re.exec(i.tagName);
\r
590 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
\r
591 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
\r
601 var toc = document.getElementById("toc");
\r
606 // Delete existing TOC entries in case we're reloading the TOC.
\r
607 var tocEntriesToRemove = [];
\r
609 for (i = 0; i < toc.childNodes.length; i++) {
\r
610 var entry = toc.childNodes[i];
\r
611 if (entry.nodeName.toLowerCase() == 'div'
\r
612 && entry.getAttribute("class")
\r
613 && entry.getAttribute("class").match(/^toclevel/))
\r
614 tocEntriesToRemove.push(entry);
\r
616 for (i = 0; i < tocEntriesToRemove.length; i++) {
\r
617 toc.removeChild(tocEntriesToRemove[i]);
\r
620 // Rebuild TOC entries.
\r
621 var entries = tocEntries(document.getElementById("content"), toclevels);
\r
622 for (var i = 0; i < entries.length; ++i) {
\r
623 var entry = entries[i];
\r
624 if (entry.element.id == "")
\r
625 entry.element.id = "_toc_" + i;
\r
626 var a = document.createElement("a");
\r
627 a.href = "#" + entry.element.id;
\r
628 a.appendChild(document.createTextNode(entry.text));
\r
629 var div = document.createElement("div");
\r
630 div.appendChild(a);
\r
631 div.className = "toclevel" + entry.toclevel;
\r
632 toc.appendChild(div);
\r
634 if (entries.length == 0)
\r
635 toc.parentNode.removeChild(toc);
\r
639 /////////////////////////////////////////////////////////////////////
\r
640 // Footnotes generator
\r
641 /////////////////////////////////////////////////////////////////////
\r
643 /* Based on footnote generation code from:
\r
644 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
\r
647 footnotes: function () {
\r
648 // Delete existing footnote entries in case we're reloading the footnodes.
\r
650 var noteholder = document.getElementById("footnotes");
\r
654 var entriesToRemove = [];
\r
655 for (i = 0; i < noteholder.childNodes.length; i++) {
\r
656 var entry = noteholder.childNodes[i];
\r
657 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
\r
658 entriesToRemove.push(entry);
\r
660 for (i = 0; i < entriesToRemove.length; i++) {
\r
661 noteholder.removeChild(entriesToRemove[i]);
\r
664 // Rebuild footnote entries.
\r
665 var cont = document.getElementById("content");
\r
666 var spans = cont.getElementsByTagName("span");
\r
669 for (i=0; i<spans.length; i++) {
\r
670 if (spans[i].className == "footnote") {
\r
672 var note = spans[i].getAttribute("data-note");
\r
674 // Use [\s\S] in place of . so multi-line matches work.
\r
675 // Because JavaScript has no s (dotall) regex flag.
\r
676 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
\r
677 spans[i].innerHTML =
\r
678 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
\r
679 "' title='View footnote' class='footnote'>" + n + "</a>]";
\r
680 spans[i].setAttribute("data-note", note);
\r
682 noteholder.innerHTML +=
\r
683 "<div class='footnote' id='_footnote_" + n + "'>" +
\r
684 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
\r
685 n + "</a>. " + note + "</div>";
\r
686 var id =spans[i].getAttribute("id");
\r
687 if (id != null) refs["#"+id] = n;
\r
691 noteholder.parentNode.removeChild(noteholder);
\r
693 // Process footnoterefs.
\r
694 for (i=0; i<spans.length; i++) {
\r
695 if (spans[i].className == "footnoteref") {
\r
696 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
\r
697 href = href.match(/#.*/)[0]; // Because IE return full URL.
\r
699 spans[i].innerHTML =
\r
700 "[<a href='#_footnote_" + n +
\r
701 "' title='View footnote' class='footnote'>" + n + "</a>]";
\r
707 install: function(toclevels) {
\r
710 function reinstall() {
\r
711 asciidoc.footnotes();
\r
713 asciidoc.toc(toclevels);
\r
717 function reinstallAndRemoveTimer() {
\r
718 clearInterval(timerId);
\r
722 timerId = setInterval(reinstall, 500);
\r
723 if (document.addEventListener)
\r
724 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
\r
726 window.onload = reinstallAndRemoveTimer;
\r
730 asciidoc.install(2);
\r
734 <body class="article">
\r
736 <h1>grml2usb(8)</h1>
\r
738 <div id="toctitle">Table of Contents</div>
739 <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
743 <div class="sect1">
\r
744 <h2 id="_name">1. Name</h2>
\r
745 <div class="sectionbody">
\r
746 <div class="paragraph"><p>grml2usb - install grml ISO(s) on usb device for booting</p></div>
\r
749 <div class="sect1">
\r
750 <h2 id="_synopsis">2. Synopsis</h2>
\r
751 <div class="sectionbody">
\r
752 <div class="paragraph"><p>grml2usb [ options ] <ISO[s]> <device></p></div>
\r
753 <div class="sidebarblock">
\r
754 <div class="content">
\r
755 <div class="paragraph"><p>Important! The grml team does not take responsibility for loss of any data!</p></div>
\r
759 <div class="sect1">
\r
760 <h2 id="introduction">3. Introduction</h2>
\r
761 <div class="sectionbody">
\r
762 <div class="paragraph"><p>grml2usb installs grml on a given partition of your usb device and makes it
\r
763 bootable. It provides multi-iso support, meaning you can specify several grml
\r
764 ISOs on the command line at once and select the grml flavour you would like to
\r
765 boot on the bootprompt then. Note that the <strong>first</strong> ISO specified on the grml2usb
\r
766 command line will become the default one (that’s the one that will boot when
\r
767 just pressing enter on the bootprompt or wait until the boot timeout matches).</p></div>
\r
768 <div class="admonitionblock">
\r
771 <img src="./images/icons/important.png" alt="Important" />
\r
773 <td class="content">By default a compatible master boot record (MBR) is installed on the device
\r
774 (being for example /dev/sdX when executing <em>grml2usb grml.iso /dev/sdX1</em>) and
\r
775 syslinux is being used as default bootloader. Avoid installation of the default
\r
776 MBR using the <em>--skip-mbr</em> option or if you encounter any problems with the
\r
777 default MBR consider using <em>--syslinux-mbr</em> instead.</td>
\r
782 <div class="sect1">
\r
783 <h2 id="options">4. Options</h2>
\r
784 <div class="sectionbody">
\r
785 <div class="paragraph"><p>The ISO[s] should be the path to one or multiple grml-ISOs and/or the path to
\r
786 the currently running live-system (being /lib/live/mount/medium).</p></div>
\r
787 <div class="paragraph"><p>The device either might be a device name like /dev/sdX1 or a directory. When
\r
788 specifying a device name the device is mounted automatically. When specifying a
\r
789 directory grml2usb is assuming that you did set up a bootloader on your own (or
\r
790 don’t need one) and a bootloader won’t be installed automatically.</p></div>
\r
791 <div class="paragraph"><p>The following options are supported:</p></div>
\r
792 <div class="dlist"><dl>
\r
793 <dt class="hdlist1">
\r
794 <strong>--bootoptions=…</strong>
\r
798 Use specified bootoptions as default. To use flavour name as a argument for a
\r
799 boot parameter use %flavour which will be expanded to the flavour name. To add
\r
800 multiple bootoptions you can specify the option multiple time.
\r
803 <dt class="hdlist1">
\r
804 <strong>--bootloader-only</strong>
\r
808 Do <strong>not</strong> copy files but instead just install a bootloader. Note that the boot
\r
809 addons are copied to /boot/addons at this stage as well. If you want to skip
\r
810 copying the boot addons consider using the --skip-addons option.
\r
813 <dt class="hdlist1">
\r
814 <strong>--copy-only</strong>
\r
818 Copy files only but do <strong>not</strong> install a bootloader.
\r
821 <dt class="hdlist1">
\r
822 <strong>--dry-run</strong>
\r
826 Avoid executing commands, instead show what would be executed.
\r
827 Warning: please notice that the ISO has to be mounted anyway, otherwise
\r
828 identifying the grml flavour would not be possible.
\r
831 <dt class="hdlist1">
\r
832 <strong>--fat16</strong>
\r
836 Format specified partition with FAT16.
\r
837 <strong>Important:</strong> this will destroy any existing data on the specified partition!
\r
840 <dt class="hdlist1">
\r
841 <strong>--force</strong>
\r
845 Force any (possible dangerous) actions requiring manual interaction (like --fat16).
\r
848 <dt class="hdlist1">
\r
849 <strong>--grub</strong>
\r
853 Install grub bootloader instead of (default) syslinux.
\r
856 <dt class="hdlist1">
\r
857 <strong>--grub-mbr</strong>
\r
861 Install grub into MBR (Master Boot Record) instead of PBR (Partition Boot
\r
862 Record). Check out <a href="#mbr-vs-pbr">the <em>mbr-vs-pbr</em> section in the FAQ of this document</a> for further details.
\r
865 <dt class="hdlist1">
\r
866 <strong>--help</strong>
\r
870 Display usage information and exit.
\r
874 <div class="dlist"><dl>
\r
875 <dt class="hdlist1">
\r
876 <strong>--mbr-menu</strong>
\r
880 Install master boot record (MBR) with integrated boot menu: interactively choose
\r
881 the partition to boot from, with a timeout to load the default partition, or
\r
882 boot from floppy. When NOT using the --mbr-menu option a MBR with LBA and large
\r
883 disc support but without an integrated boot menu is installed (so it’s not
\r
884 visible at all but instead directly jumps to the bootloader - being grub or
\r
885 syslinux). Note: This options is available only when using the default MBR and
\r
886 won’t have any effect if you’re using the <em>--syslinux-mbr</em> option.
\r
889 <dt class="hdlist1">
\r
890 <strong>--quiet</strong>
\r
894 Do not output anything but just errors on console.
\r
897 <dt class="hdlist1">
\r
898 <strong>--skip-addons</strong>
\r
902 Do not install /boot/addons/ files (like dos, grub, memdisk,…).
\r
905 <dt class="hdlist1">
\r
906 <strong>--remove-bootoption=…</strong>
\r
910 Remove specified bootoption (could be a regex) from existing boot options. Use
\r
911 multiple entries for removing different bootoptions at once.
\r
914 <dt class="hdlist1">
\r
915 <strong>--skip-grub-config</strong>
\r
919 Skip generation of grub configuration files. By default the configuration
\r
920 files for syslinux <strong>and</strong> grub will be written so you’ve a working configuration
\r
921 file no matter whether you’re using grub or syslinux as bootloader.
\r
924 <dt class="hdlist1">
\r
925 <strong>--skip-mbr</strong>
\r
929 Do not touch/install the master boot record (MBR).
\r
932 <dt class="hdlist1">
\r
933 <strong>--skip-syslinux-config</strong>
\r
937 Skip generation of syslinux configuration files. By default the configuration
\r
938 files for syslinux <strong>and</strong> grub will be written so you’ve a working configuration
\r
939 file no matter whether you’re using grub or syslinux as bootloader.
\r
942 <dt class="hdlist1">
\r
943 <strong>--syslinux</strong>
\r
947 This option is deprecated and is being left only for backwards compatibility
\r
948 reasons. Syslinux is the default bootloader of grml2usb and therefore the
\r
949 <em>--syslinux</em> option doesn’t have any effects. If you do not want to use syslinux
\r
950 as bootloader consider using the <em>--grub</em> option.
\r
953 <dt class="hdlist1">
\r
954 <strong>--syslinux-mbr</strong>
\r
958 Install syslinux' master boot record (MBR, which is booting from the partition
\r
959 with the "active" flag set) instead of the default one. If you encounter any
\r
960 problems with the default MBR you can try using the syslinux MBR instead. If
\r
961 that works for you please <a href="#author">let us know</a> so we can adjust our default
\r
966 <div class="dlist"><dl>
\r
967 <dt class="hdlist1">
\r
968 <strong>-v</strong>, <strong>--version</strong>
\r
972 Return version and exit.
\r
975 <dt class="hdlist1">
\r
976 <strong>--verbose</strong>
\r
980 Enable verbose mode.
\r
986 <div class="sect1">
\r
987 <h2 id="_developers_corner">5. Developers Corner</h2>
\r
988 <div class="sectionbody">
\r
989 <div class="sect2">
\r
990 <h3 id="directory-layout">5.1. Directory layout on usb device</h3>
\r
991 <div class="literalblock">
\r
992 <div class="content">
\r
993 <pre><code>boot/ ->
\r
995 | |-- allinone.img [grub - all in one image]
\r
996 | |-- bsd4grml/ [MirBSD]
\r
997 | |-- balder10.imz [FreeDOS]
\r
998 | |-- memdisk [chainloading helper]
\r
999 | |-- memtest [memtest86+]
\r
1002 | | |-- linux26 [Kernel]
\r
1003 | | |-- initrd.gz [initramfs]
\r
1005 | | |-- linux26 [Kernel]
\r
1006 | | |-- initrd.gz [initramfs]
\r
1008 | | |-- linux26 [...]
\r
1010 | |-- grml64-medium
\r
1016 | `-- grml64-small
\r
1020 | |-- grml.png [graphical bootsplash background image for grub2]
\r
1021 | |-- grub.cfg [configuration file for grub2]
\r
1022 | |-- menu.lst [configuration file for grub1]
\r
1023 | |-- splash.xpm.gz [splash screen for grub1]
\r
1025 |-- grml.png [graphical bootsplash background image for syslinux]
\r
1026 |-- syslinux.cfg [main configuration file for syslinux]
\r
1027 `-- [....] [several further config files for syslinux]</code></pre>
\r
1029 <div class="literalblock">
\r
1030 <div class="content">
\r
1032 |-- grml2usb.txt [not yet implemented]
\r
1033 |-- grml-cheatcodes.txt [list of bootoptions for grml]
\r
1034 |-- grml-version.txt [file containing information about grml-version]
\r
1035 |-- LICENSE.txt [license information]
\r
1036 |-- md5sums [md5sums of original ISO]
\r
1037 |-- README.txt [informational text]
\r
1038 `-- web/ [browser related files]
\r
1045 `-- logo.png</code></pre>
\r
1047 <div class="literalblock">
\r
1048 <div class="content">
\r
1051 | |-- filesystem.module [module specifying which squashfs should be used for grml]
\r
1052 | `-- grml.squashfs [squashfs file for grml]
\r
1054 | |-- filesystem.module [module specifying which squashfs should be used for grml-medium]
\r
1055 | `-- grml-medium.squashfs [squashfs file for grml-medium]
\r
1057 | |-- filesystem.module [module specifying which squashfs should be used for grml-medium]
\r
1058 | `-- grml-small.squashfs [squashfs file for grml-small]
\r
1059 `-- ...</code></pre>
\r
1062 <div class="sect2">
\r
1063 <h3 id="source">5.2. Grabbing the source</h3>
\r
1064 <div class="literalblock">
\r
1065 <div class="content">
\r
1066 <pre><code>% git clone git://git.grml.org/grml2usb.git</code></pre>
\r
1069 <div class="sect2">
\r
1070 <h3 id="debugging">5.3. Developers Debugging Hints</h3>
\r
1071 <div class="paragraph"><p>To play with grml2usb you can avoid using a real device via a loopback file
\r
1072 setup, like:</p></div>
\r
1073 <div class="literalblock">
\r
1074 <div class="content">
\r
1075 <pre><code># dd if=/dev/zero of=~/loopback bs=1M count=100 # adjust size to your needs
\r
1076 # losetup /dev/loop1 ~/loopback</code></pre>
\r
1078 <div class="paragraph"><p>Then create according partitions either running for example:</p></div>
\r
1079 <div class="literalblock">
\r
1080 <div class="content">
\r
1081 <pre><code># echo -en "n\np\n1\n\n\nt\n6\na\n1\n w\n" | fdisk /dev/loop1</code></pre>
\r
1083 <div class="paragraph"><p>or:</p></div>
\r
1084 <div class="literalblock">
\r
1085 <div class="content">
\r
1086 <pre><code># parted /dev/loop1 -s "mkpart primary fat16 0 -1s mkfs 1 fat16"</code></pre>
\r
1088 <div class="paragraph"><p>Finally create a filesystem and execute grml2usb as needed:</p></div>
\r
1089 <div class="literalblock">
\r
1090 <div class="content">
\r
1091 <pre><code># mkfs.vfat /dev/loop1
\r
1092 # grml2usb --bootloader-only /grml/isos/grml-small_2013.01.iso /dev/loop1</code></pre>
\r
1095 <div class="sect2">
\r
1096 <h3 id="performance-tracing">5.4. Performance tracing</h3>
\r
1097 <div class="literalblock">
\r
1098 <div class="content">
\r
1099 <pre><code># blktrace -d /dev/sdX -o - | blkparse -i -
\r
1100 # grml2usb grml_2013.01.iso /dev/sdX1</code></pre>
\r
1105 <div class="sect1">
\r
1106 <h2 id="troubleshooting">6. Troubleshooting and Pitfalls when booting</h2>
\r
1107 <div class="sectionbody">
\r
1108 <div class="paragraph"><p>Here is a list of common error messages from BIOS/bootloader when trying to boot
\r
1109 from USB.</p></div>
\r
1110 <div class="hdlist"><table>
\r
1112 <td class="hdlist1">
\r
1113 <strong>Error message</strong>
\r
1116 <td class="hdlist2">
\r
1117 <p style="margin-top: 0;">
\r
1118 ran out of input data. System halted
\r
1123 <td class="hdlist1">
\r
1124 <strong>Reason</strong>
\r
1127 <td class="hdlist2">
\r
1128 <p style="margin-top: 0;">
\r
1129 Everything OK, except for the filesystem used on your usb device. So
\r
1130 instead of fat16 you are using for example fat32. Fix: use the appropriate
\r
1131 filesystem (fat16 for usb pens usually). The Bootsplash might be displayed, the
\r
1132 kernel loads but you very soon get the error message.
\r
1137 <td class="hdlist1">
\r
1138 <strong>Error message</strong>
\r
1141 <td class="hdlist2">
\r
1142 <p style="margin-top: 0;">
\r
1143 Invalid operating system
\r
1148 <td class="hdlist1">
\r
1149 <strong>Reason</strong>
\r
1152 <td class="hdlist2">
\r
1153 <p style="margin-top: 0;">
\r
1154 the partition layout is not ok. Very probably there’s no primary
\r
1155 partition (/dev/sdX{1..4}) or none has the flag <em>bootable</em> set.
\r
1160 <td class="hdlist1">
\r
1161 <strong>Error message</strong>
\r
1164 <td class="hdlist2">
\r
1165 <p style="margin-top: 0;">
\r
1171 <td class="hdlist1">
\r
1172 <strong>Reason</strong>
\r
1175 <td class="hdlist2">
\r
1176 <p style="margin-top: 0;">
\r
1177 Some BIOSses offer different modes for USB booting. The proper mode
\r
1178 to boot a USB stick is USB-HDD. If that doesn’t work or is not supported by your
\r
1179 system, you need to format your USB-Stick as USB-ZIP. To do this, syslinux
\r
1180 contains an utility called mkdiskimage, which you can use to re-format your USB
\r
1181 stick in USB-ZIP format running <em>mkdiskimage -4 /dev/sdX 1 64 32</em>. Please be
\r
1182 aware that this procedure will erase all data on your stick. After executing
\r
1183 mkdiskimage just continue installing as usual (grml2usb … /dev/sdX4). Note
\r
1184 that this is not going to work for any device larger than 8 GB, since
\r
1185 mkdiskimage only supports 1024c 256h 63s. For a more detailed explanation, refer
\r
1186 to /usr/share/doc/syslinux-common/usbkey.txt.
\r
1191 <td class="hdlist1">
\r
1192 <strong>Error message</strong>
\r
1195 <td class="hdlist2">
\r
1196 <p style="margin-top: 0;">
\r
1197 No operating system found.
\r
1202 <td class="hdlist1">
\r
1203 <strong>Reason</strong>
\r
1206 <td class="hdlist2">
\r
1207 <p style="margin-top: 0;">
\r
1208 you forgot to set the boot-flag on the partition. Or there really isn’t
\r
1209 any operating system at all. :)
\r
1214 <td class="hdlist1">
\r
1215 <strong>Error message</strong>
\r
1218 <td class="hdlist2">
\r
1219 <p style="margin-top: 0;">
\r
1220 kernel-panic: unable to mount root-fs…
\r
1225 <td class="hdlist1">
\r
1226 <strong>Reason</strong>
\r
1229 <td class="hdlist2">
\r
1230 <p style="margin-top: 0;">
\r
1231 Kernel boots but fails to find the root filesystem. The root=
\r
1232 argument in your kernel commandline is pointing to the wrong device. Adjust
\r
1233 root=…, consider using root=UUID=….
\r
1238 <td class="hdlist1">
\r
1239 <strong>Error message</strong>
\r
1242 <td class="hdlist2">
\r
1243 <p style="margin-top: 0;">
\r
1244 Could not find kernel image: …
\r
1249 <td class="hdlist1">
\r
1250 <strong>Reason</strong>
\r
1253 <td class="hdlist2">
\r
1254 <p style="margin-top: 0;">
\r
1255 either a broken isolinux/syslinux version or a broken BIOS. Check out
\r
1256 whether the vendor provides a BIOS update or if using bootloader grub instead of
\r
1257 isolinux/syslinux fixes the problem.
\r
1264 <div class="sect1">
\r
1265 <h2 id="faq">7. Frequently Asked Questions (FAQ)</h2>
\r
1266 <div class="sectionbody">
\r
1267 <div class="sect2">
\r
1268 <h3 id="download">7.1. Where can I get grml2usb?</h3>
\r
1269 <div class="paragraph"><p>grml2usb is available as Debian package via <a href="http://deb.grml.org/">the
\r
1270 grml-testing Debian repository</a>.</p></div>
\r
1271 <div class="paragraph"><p>If you do not want to (or can’t) use the grml2usb Debian package you can either
\r
1272 use the grml2usb git tree running:</p></div>
\r
1273 <div class="literalblock">
\r
1274 <div class="content">
\r
1275 <pre><code>git clone git://git.grml.org/grml2usb.git
\r
1278 sudo ./grml2usb ...</code></pre>
\r
1280 <div class="paragraph"><p>or download the provided
\r
1281 <a href="http://grml.org/grml2usb/grml2usb.tgz">http://grml.org/grml2usb/grml2usb.tgz</a>
\r
1282 (<a href="http://grml.org/grml2usb/grml2usb.tgz.md5.asc">gpg signed md5 hash</a>).
\r
1283 Download and extract the tarball and execute the provided script <em>install.sh</em>.</p></div>
\r
1284 <div class="admonitionblock">
\r
1287 <img src="./images/icons/note.png" alt="Note" />
\r
1289 <td class="content">It is <strong>NOT</strong> enough to have just the grml2usb script itself without the according
\r
1290 files provided either via the Debian package, the git tree or the file
\r
1291 grml2usb.tgz.</td>
\r
1295 <div class="sect2">
\r
1296 <h3 id="dd">7.2. Why can’t I just dd the ISO to a USB device?</h3>
\r
1297 <div class="paragraph"><p>Well, you can. :) Starting with grml 2009.10 the ISOs are dd-able straight out-of-the-box.</p></div>
\r
1298 <div class="admonitionblock">
\r
1301 <img src="./images/icons/important.png" alt="Important" />
\r
1303 <td class="content">Note that ANY existing data on your USB device will be destroyed when
\r
1304 using the dd approach.</td>
\r
1307 <div class="paragraph"><p>This allows you to dd the Grml ISO to your USB device (use for example
\r
1308 <a href="http://www.chrysocome.net/rawwrite">rawwrite</a> if you’ve just a Windows
\r
1309 system available) running:</p></div>
\r
1310 <div class="literalblock">
\r
1311 <div class="content">
\r
1312 <pre><code>% dd if=grml_2013.01.iso of=/dev/sdX</code></pre>
\r
1314 <div class="paragraph"><p>where /dev/sdX is your USB device. Of course this doesn’t provide such a
\r
1315 flexible system like with grml2usb (no multi-ISO setup, no additional default
\r
1316 bootoptions,…) but it’s a nice way to get a working USB boot setup if you
\r
1317 don’t have grml2usb available.</p></div>
\r
1319 <div class="sect2">
\r
1320 <h3 id="grml2usb-vs-dd">7.3. What’s the difference between grml2usb and just using dd?</h3>
\r
1321 <div class="paragraph"><p>grml2usb does not remove any data from your USB device and does not alter the
\r
1322 partition table at all. grml2usb provides multi-ISO support, support for adding
\r
1323 default bootoptions and selecting the bootloader (syslinux vs. grub) without
\r
1324 having to manually touch the ISO at all.</p></div>
\r
1326 <div class="sect2">
\r
1327 <h3 id="grml2iso">7.4. What’s grml2iso?</h3>
\r
1328 <div class="paragraph"><p>grml2iso is a script which uses grml2usb to generate a multiboot ISO out of
\r
1329 several grml ISOs. See <em>man grml2iso</em> for further details.</p></div>
\r
1331 <div class="sect2">
\r
1332 <h3 id="menu-lst">7.5. Why is there a menu.lst and a grub.cfg inside /boot/grub/?</h3>
\r
1333 <div class="paragraph"><p>grml2usb supports grub version 1 (grub1) as well as grub version 2 (grub2).
\r
1334 Whereas grub1 uses menu.lst the new version grub2 needs grub.cfg.
\r
1335 Providing both files allows grml2usb to install grub on the target device
\r
1336 no matter which grub version is available on the host where grml2usb is
\r
1337 executed on.</p></div>
\r
1339 <div class="sect2">
\r
1340 <h3 id="stage1">7.6. grub-install fails with 'The file ../boot/grub/stage1 not read correctly"?!</h3>
\r
1341 <div class="paragraph"><p>Check whether the partition has the right partition type. For example do NOT use
\r
1342 FAT16 (partition type 6) when using a ext3 filesystem on the partition but
\r
1343 instead use the correct partition type (<em>83</em> - Linux) then.</p></div>
\r
1345 <div class="sect2">
\r
1346 <h3 id="grub-install-xfs_freeze">7.7. grub-install complains about /sbin/grub-install and/or xfs_freeze?!</h3>
\r
1347 <div class="paragraph"><p>The following message:</p></div>
\r
1348 <div class="literalblock">
\r
1349 <div class="content">
\r
1350 <pre><code>You shouldn't call /sbin/grub-install. Please call /usr/sbin/grub-install instead!
\r
1351 xfs_freeze: specified file ["/tmp/tmpqaBK6z/boot/grub"] is not on an XFS filesystem</code></pre>
\r
1353 <div class="paragraph"><p>This is "normal". grub-install sends those messages to stderr. To avoid hiding any
\r
1354 possible real error messages grml2usb doesn’t ignore those messages.</p></div>
\r
1356 <div class="sect2">
\r
1357 <h3 id="device-map">7.8. grub-install complains about /boot/grub/device.map?!</h3>
\r
1358 <div class="paragraph"><p>The following message:</p></div>
\r
1359 <div class="literalblock">
\r
1360 <div class="content">
\r
1361 <pre><code>grub-probe: error: Cannot open `/boot/grub/device.map'</code></pre>
\r
1363 <div class="paragraph"><p>This is "normal" (at least with grub1). This isn’t a problem, because the
\r
1364 device.map file will be generated on the target device anyway.</p></div>
\r
1366 <div class="sect2">
\r
1367 <h3 id="unary-operator">7.9. grub-install complains about a unary operator?!</h3>
\r
1368 <div class="paragraph"><p>The following message:</p></div>
\r
1369 <div class="literalblock">
\r
1370 <div class="content">
\r
1371 <pre><code>'/usr/sbin/grub-install: line 374: [: =: unary operator expected'</code></pre>
\r
1373 <div class="paragraph"><p>This is "normal". Just ignore it. (It usually doesn’t appear
\r
1374 on the second invocation on the same device.)</p></div>
\r
1376 <div class="sect2">
\r
1377 <h3 id="unknown-filesystem">7.10. grub-install fails with grub-probe: error: unknown filesystem?!</h3>
\r
1378 <div class="paragraph"><p>The following message:</p></div>
\r
1379 <div class="literalblock">
\r
1380 <div class="content">
\r
1381 <pre><code>grub-probe: error: unknown filesystem
\r
1382 Auto-detection of a filesystem module failed.
\r
1383 Please specify the module with the option `--modules' explicitly.</code></pre>
\r
1385 <div class="paragraph"><p>usually means that the device partition table says something else than the
\r
1386 filesystem on the device. For example using FAT16 as filesystem type and
\r
1387 using FAT32 as filesystem on the partition will not work. Either set filesystem
\r
1388 type to FAT32 or format the partition using FAT16. It is essential that
\r
1389 device partition table and filesystem use the same filesystem type.</p></div>
\r
1391 <div class="sect2">
\r
1392 <h3 id="mbr-vs-pbr">7.11. grub-setup fails after Attempting to install GRUB to a partition instead of the MBR?!</h3>
\r
1393 <div class="paragraph"><p>The following message:</p></div>
\r
1394 <div class="literalblock">
\r
1395 <div class="content">
\r
1396 <pre><code>grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea.
\r
1397 grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.
\r
1398 grub-setup: error: Cannot read `/grub/core.img' correctly</code></pre>
\r
1400 <div class="paragraph"><p>appears when using grub2 versions older than 1.98 as those version introduced a
\r
1401 regression which avoids that grub is being installed into a partition (PBR,
\r
1402 Partition Boot Record) instead of MBR (Master Boot Record).</p></div>
\r
1403 <div class="paragraph"><p>To work around this issue you can either 1) upgrade to grub versions >=1.98, 2)
\r
1404 install grub into the MBR (Master Boot Record) using the <em>--grub-mbr</em> option of
\r
1405 grml2usb or 3) switch to syslinux as bootmanager (just drop the <em>--grub</em>
\r
1406 option).</p></div>
\r
1408 <div class="sect2">
\r
1409 <h3 id="splash-xpm">7.12. I’m getting something like "Error: /usr/share/grml2usb/grub/splash.xpm.gz can not be read"!?</h3>
\r
1410 <div class="paragraph"><p>Looks like you’ve only the grml2usb script itself available. Please make sure
\r
1411 you’ve the grml2usb Debian package installed. The most resent stable version is
\r
1412 available via <a href="http://deb.grml.org/">the grml-testing Debian repository</a>. If
\r
1413 you do not have a Debian system please see section <a href="#download">Where can I get grml2usb?</a> in this FAQ.</p></div>
\r
1415 <div class="sect2">
\r
1416 <h3 id="fat16">7.13. Why do I have to use a FAT16/FAT32 filesystem?</h3>
\r
1417 <div class="paragraph"><p>Syslinux (currently) does not support any other filesystems besides FAT16/FAT32
\r
1418 (though that’s a sane default if you want to share your files with other
\r
1419 (operating) systems). If you want to use a different filesystem (like ext2/3)
\r
1420 use the bootloader grub instead using grml2usb’s <em>--grub</em> option.</p></div>
\r
1421 <div class="admonitionblock">
\r
1424 <img src="./images/icons/note.png" alt="Note" />
\r
1426 <td class="content">FAT32 is supported since syslinux version 3.0.</td>
\r
1430 <div class="sect2">
\r
1431 <h3 id="hdt-hangs">7.14. Addons → Hardware Detection Tool freezes</h3>
\r
1432 <div class="paragraph"><p>This usually means that the machine you ran grml2usb on had syslinux 3.x
\r
1433 installed. The version of hdt (Hardware detection tool) shipping with Grml
\r
1434 2010.12 and newer requires syslinux 4.x.</p></div>
\r
1436 <div class="sect2">
\r
1437 <h3 id="cool-idea">7.15. I think I’ve got a really cool idea!</h3>
\r
1438 <div class="paragraph"><p>Great! Please check out
\r
1439 <a href="http://git.grml.org/?p=grml2usb.git;a=blob;f=TODO;hb=HEAD">the TODO file</a>.
\r
1440 Feel free to <a href="#author">report your wishes to the author</a>. Patches highly
\r
1441 appreciated.</p></div>
\r
1443 <div class="sect2">
\r
1444 <h3 id="booting-from-usb">7.16. I’ve problems with booting from USB.</h3>
\r
1445 <div class="paragraph"><p>Check out <a href="#troubleshooting">Troubleshooting and Pitfalls when booting</a>.</p></div>
\r
1447 <div class="sect2">
\r
1448 <h3 id="found-a-bug">7.17. I’ve found a bug!</h3>
\r
1449 <div class="paragraph"><p>Please <a href="#author">report it to the author</a>. Please provide usage examples and output
\r
1450 of your grml2usb commandline (consider using the "--verbose" option).</p></div>
\r
1454 <div class="sect1">
\r
1455 <h2 id="usage-examples">8. Usage examples</h2>
\r
1456 <div class="sectionbody">
\r
1457 <div class="literalblock">
\r
1458 <div class="content">
\r
1459 <pre><code># grml2usb /home/grml/grml_2013.01.iso /dev/sdX1</code></pre>
\r
1461 <div class="paragraph"><p>Install specified ISO on device /dev/sdX1.</p></div>
\r
1462 <div class="literalblock">
\r
1463 <div class="content">
\r
1464 <pre><code># grml2usb /home/grml/grml_2013.01.iso /home/grml/grml_small_2013.01.iso /dev/sdX1</code></pre>
\r
1466 <div class="paragraph"><p>Install specified ISOs on device /dev/sdX1 for multibooting ISOs.</p></div>
\r
1467 <div class="literalblock">
\r
1468 <div class="content">
\r
1469 <pre><code># grml2usb /lib/live/mount/medium /dev/sdX1</code></pre>
\r
1471 <div class="paragraph"><p>Install currently running Grml live system on device /dev/sdX1.</p></div>
\r
1472 <div class="literalblock">
\r
1473 <div class="content">
\r
1474 <pre><code># grml2usb /lib/live/mount/medium /home/grml/grml_2013.01.iso /dev/sdX1</code></pre>
\r
1476 <div class="paragraph"><p>Install currently running Grml live system and the specified
\r
1477 ISO on device /dev/sdX1 for multibooting.</p></div>
\r
1478 <div class="literalblock">
\r
1479 <div class="content">
\r
1480 <pre><code># grml2usb --fat16 /home/grml/grml_2013.01.iso /dev/sdX1</code></pre>
\r
1482 <div class="paragraph"><p>Install specified ISO on device /dev/sdX1 and format partition /dev/sdX1 with
\r
1483 FAT16 filesystem.</p></div>
\r
1484 <div class="literalblock">
\r
1485 <div class="content">
\r
1486 <pre><code># grml2usb --grub --grub-mbr /home/grml/grml_2013.01.iso /dev/sdX1</code></pre>
\r
1488 <div class="paragraph"><p>Install specified ISO on device /dev/sdX1 and use grub as bootloader (instead of
\r
1489 syslinux being the default) and install a master boot record (MBR) to the MBR of
\r
1490 /dev/sdX.</p></div>
\r
1491 <div class="literalblock">
\r
1492 <div class="content">
\r
1493 <pre><code># grml2usb --bootoptions="lang=de ssh=mysecret" grml_2013.01.iso /dev/sdX1
\r
1494 # grml2usb --bootoptions="lang=de" --bootoptions="ssh=mysecret" grml_2013.01.iso /dev/sdX1</code></pre>
\r
1496 <div class="paragraph"><p>Install specified ISO on device /dev/sdX1 and use "lang=de ssh=mysecret" as
\r
1497 default bootoptions.</p></div>
\r
1498 <div class="literalblock">
\r
1499 <div class="content">
\r
1500 <pre><code># grml2usb --remove-bootoption="vga=791" --remove-bootoption="nomce" grml_2013.01.iso /dev/sdX1</code></pre>
\r
1502 <div class="paragraph"><p>Install specified ISO on device /dev/sdX1 remove vga=791 and nomce from existing bootoptions.</p></div>
\r
1503 <div class="literalblock">
\r
1504 <div class="content">
\r
1505 <pre><code># grml2usb --bootoptions="persistent-path=%flavour_name" grml64_2010.04.iso grml_2010.04.iso /dev/sdX1</code></pre>
\r
1507 <div class="paragraph"><p>Install specified Isos on device /dev/sdx and add parameter persisten-path
\r
1508 to every menu entry. %flavour_name will be expanded to the flavour of the specific
\r
1509 iso, e.g. grml64 and grml.</p></div>
\r
1512 <div class="sect1">
\r
1513 <h2 id="ressources">9. Online Ressources</h2>
\r
1514 <div class="sectionbody">
\r
1515 <div class="paragraph"><p>Check out the <a href="http://grml.org/grml2usb/">grml2usb webpage</a> and the
\r
1516 <a href="http://git.grml.org/?p=grml2usb.git">grml2usb git repository</a>.</p></div>
\r
1519 <div class="sect1">
\r
1520 <h2 id="bugs">10. Bugs</h2>
\r
1521 <div class="sectionbody">
\r
1522 <div class="paragraph"><p>Please report feedback, bugreports and wishes <a href="#author">to the author</a>.</p></div>
\r
1525 <div class="sect1">
\r
1526 <h2 id="author">11. Author</h2>
\r
1527 <div class="sectionbody">
\r
1528 <div class="paragraph"><p>Michael Prokop <<a href="mailto:mika@grml.org">mika@grml.org</a>></p></div>
\r
1532 <div id="footnotes"><hr /></div>
\r
1534 <div id="footer-text">
\r
1535 Last updated 2013-01-10 13:55:49 CET
\r