Implement --skip-addons, add code for installing addons+grml files, drop skip_mbr
[grml2usb.git] / grml2usb.8.txt
1 grml2usb(8)
2 ==========
3
4 Name
5 ----
6 grml2usb - install grml ISO(s) on usb device for booting
7
8 Synopsis
9 --------
10 grml2usb [ options ] <ISO[s]> <device>
11
12 *******************************************************************************
13 Important! The grml team does not take responsibility for loss of any data!
14 *******************************************************************************
15
16 Introduction
17 ------------
18
19 grml2usb installs grml on a given partition of your usb device and makes it
20 bootable.
21
22 grml2usb provides multi-iso support, meaning you can specify several grml ISOs
23 on the command line at once and select the grml flavour you would like to boot
24 on the bootbrompt then. Notice that the default ISO (that's when pressing just
25 enter on the bootprompt or wait until the timeout matches) will be the *first*
26 one specified on the grml2usb command line.
27
28 Options
29 -------
30
31 The ISO[s] might be the path to one or multiple grml-ISOs as well as the path to
32 the currently running live-system (being /live/image).
33
34 The device either might be a device name like /dev/sda1 or a directory. When
35 specifying a device name the device is mounted automatically. When specifying a
36 directory it won't be touched but instead grml2usb is assuming that you did set
37 up a bootloader on your own and a bootloader won't be installed automatically.
38
39 The following options are supported:
40
41   *--bootoptions=...*::
42
43 Use specified bootoptions as default.
44
45   *--bootloader-only*::
46
47 Do *not* copy files but instead just install a bootloader.
48
49   *--copy-only*::
50
51 Copy files only but do *not* install a bootloader.
52
53   *--dry-run*::
54
55 Avoid executing commands, instead show what would be executed.
56 Warning: please notice that the ISO has to be mounted anyway, otherwise
57 identifying the grml flavour would not be possible.
58
59   *--fat16*::
60
61 Format specified partition with FAT16.
62 **Important:** this will destroy any existing data on the specified partition!
63
64   *--force*::
65
66 Force any (possible dangerous) actions requiring manual interaction (like --fat16).
67
68   *--grub*::
69
70 Install grub bootloader instead of syslinux. [Notice: not implemented yet.]
71
72   *--help*::
73
74 Display usage information and exit.
75
76   *--initrd=...*::
77
78 Install specified initrd instead of the default. You might want to specify
79 option *--kernel* as well. (Be aware when using multiboot setup.)
80 [Notice: not implemented yet.]
81
82   *--kernel=...*::
83
84 Install specified kernel instead of the default. You might want to specify
85 option *--initrd* as well. (Be aware when using multiboot setup.)
86 [Notice: not implemented yet.]
87
88   *--lilo=...*::
89
90 Use specified lilo executable to for installing master boot record (MBR)
91 instead of the default, being /usr/share/grml2usb/lilo/lilo.static.
92
93   *--mbr*::
94
95 Install a default master boot record (MBR) on the device.
96
97   *--quiet*::
98
99 Do not output anything but just errors on console.
100
101   *--skip-addons*::
102
103 Do not install /boot/addons/ files (like dos, grub, memdisk,...).
104
105   *--squashfs=*::
106
107 Install specified squashfs file instead of the default.
108 [Notice: not implemented yet.]
109
110   *--uninstall*::
111
112 Uninstall grml ISO files.
113 [Notice: not implemented yet.]
114
115   *-v*, *--version*::
116
117 Return version and exit.
118
119   *--verbose*::
120
121 Enable verbose mode.
122
123 Developers Corner
124 -----------------
125
126 Directory layout on usb device
127 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128
129   boot/ ->
130     |-- addons/
131     |   |-- allinone.img
132     |   |-- balder10.imz
133     |   |-- chain.c32
134     |   |-- memdisk
135     |   `-- menu.c32
136     |-- release/
137     |   |-- grml/
138     |   |   |-- linux26
139     |   |   |-- initrd.gz
140     |   |-- grml64
141     |   |   |-- linux26
142     |   |   |-- initrd.gz
143     |   |-- grml-medium
144     |   |   |-- linux26
145     |   |   |-- initrd.gz
146     |   |-- grml64-medium
147     |   |   |-- linux26
148     |   |   |-- initrd.gz
149     |   |-- grml-small
150     |   |   |-- linux26
151     |   |   |-- initrd.gz
152     |   `-- grml64-small
153     |       |-- linux26
154     |       |-- initrd.gz
155     |-- grub/
156     |   |-- menu.lst
157     |   |-- splash.xpm.gz
158     |   `-- stage2_eltorito
159     `-- syslinux/
160         |-- boot.msg
161         |-- f1
162         |-- f2
163         |-- f3
164         |-- f4
165         |-- f5
166         |-- f6
167         |-- f7
168         |-- f8
169         |-- f9
170         |-- f10
171         |-- logo.16
172         `-- syslinux.cfg
173
174   grml/
175     |-- grml2usb.txt
176     |-- grml-cheatcodes.txt
177     |-- grml-version.txt
178     |-- LICENSE.txt
179     |-- md5sums
180     |-- README.txt
181     `-- web/
182         |-- index.html
183         |-- style.css
184         `-- images/
185             |-- button.png
186             |-- favicon.png
187             |-- linux.jpg
188             `-- logo.png
189
190   live/
191     |-- filesystem.module
192     |-- grml.squashfs
193     |-- grml-medium.module
194     |-- grml-medium.squashfs
195     |-- grml-small.module
196     |-- grml-small.squashfs
197     |-- grml64.module
198     |-- grml64.squashfs
199     |-- grml64-medium.module
200     |-- grml64-medium.squashfs
201     |-- grml64-small.module
202     `-- grml64-small.squashfs
203
204 Grabbing the source
205 ~~~~~~~~~~~~~~~~~~~
206
207   git clone git://git.grml.org/grml2usb.git
208
209 Developers Debugging Hints
210 ~~~~~~~~~~~~~~~~~~~~~~~~~~
211
212 To play with grml2usb you can avoid using a real device via a loopback file
213 setup, like:
214
215   dd if=/dev/zero of=~/loopback bs=1M count=100 # adjust size to your needs
216   losetup /dev/loop1 ~/loopback
217
218 Then create according partitions either running for example:
219
220   echo -en "n\np\n1\n\n\n t \n 6\n a\n1\n w\n" | fdisk /dev/loop1
221
222 or:
223
224   parted /dev/loop1 -s "mkpart primary fat16 0 -1s mkfs 1 fat16"
225
226 Finally create a filesystem and execute grml2usb as needed:
227
228   mkfs.vfat /dev/loop1
229   grml2usb --bootloader-only --mbr /grml/isos/grml-small_2008.11.iso /dev/loop1
230
231
232 Usage examples
233 --------------
234
235   # grml2usb /home/grml/grml_2008.11.iso /dev/sdb1
236
237 Install specified ISO on device /dev/sdb1.
238
239   # grml2usb /home/grml/grml_2008.11.iso /home/grml/grml_small_2008.11.iso /dev/sdb1
240
241 Install specified ISOs on device /dev/sdb1 for multibooting ISOs.
242 Note: boot "grml" as usual, for booting grml-small use "grml-small on the
243 bootprompt, for grml64 use "grml64" and so on... The *first* specified ISO is
244 the one being the default (when just pressing enter or waiting until the timeout
245 is reached).
246
247   # grml2usb --fat16 --mbr /home/grml/grml_2008.11.iso /dev/sdb1
248
249 Install specified ISO on device /dev/sdb1, install MBR on /dev/sdb and
250 format partition /dev/sdb1 with FAT16 filesystem.
251
252   # grml2usb --grub /home/grml/grml_2008.11.iso /dev/sdb1
253
254 Install specified ISO on device /dev/sdb1 and use Grub as bootloader
255 (instead of syslinux being the default).
256
257   # grml2usb --kernel=/boot/vmlinuz-2.6.28-grml --initrd=/boot/initrd.img-2.6.28-grml \
258              /home/grml/grml_2008.11.iso /dev/sdb1
259
260 Install specified ISO on device /dev/sdb1 but use given kernel and initrd
261 instead of the ones provided by the ISO.
262
263   # grml2usb --squashfs=/grml/grml-live/grml_cd/live/grml.squashfs \
264              /home/grml/grml_2008.11.iso /dev/sdb1
265
266 Install specified ISO on device /dev/sdb1 but use given squashfs
267 file instead of the one provided by the ISO.
268
269   # grml2usb --bootoptions="lang=de ssh=mysecret" grml_2008.11.iso /dev/sdb1
270
271 Install specified ISO on device /dev/sdb1 and use "lang=de ssh=mysecret" as
272 default bootoptions.
273
274 Bugs
275 ----
276 Please report feedback, link:http://grml.org/bugs/[bugreports] and wishes link:http://grml.org/contact/[to the grml-team].
277
278 Author
279 ------
280 Michael Prokop <mika@grml.org>
281
282 /////////////////////////////////////////////////////////////////
283 http://wiki.grml.org/doku.php?id=tips#multiboot_usb_pen
284 http://www.startx.ro/sugar/isotostick.sh
285 https://help.ubuntu.com/community/Installation/FromUSBStick
286 http://unetbootin.sourceforge.net/
287 http://www.tux.org/pub/people/kent-robotti/looplinux/rip/mkusb.sh
288 https://fedorahosted.org/liveusb-creator/
289 /////////////////////////////////////////////////////////////////