1e7ad6dc44c81d658377c57205c9220f0c014094
[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. It provides multi-iso support, meaning you can specify several grml
21 ISOs on the command line at once and select the grml flavour you would like to
22 boot on the bootbrompt then. Note that the *first* ISO specified on the grml2usb
23 command line will become the default one (that's the one that will boot when
24 just pressing enter on the bootprompt or wait until the boot timeout matches).
25
26 Options
27 -------
28
29 The ISO[s] might be the path to one or multiple grml-ISOs as well as the path to
30 the currently running live-system (being /live/image).
31
32 The device either might be a device name like /dev/sda1 or a directory. When
33 specifying a device name the device is mounted automatically. When specifying a
34 directory it won't be touched but instead grml2usb is assuming that you did set
35 up a bootloader on your own and a bootloader won't be installed automatically.
36
37 The following options are supported:
38
39   *--bootoptions=...*::
40
41 Use specified bootoptions as default.
42
43   *--bootloader-only*::
44
45 Do *not* copy files but instead just install a bootloader.
46
47   *--copy-only*::
48
49 Copy files only but do *not* install a bootloader.
50
51   *--dry-run*::
52
53 Avoid executing commands, instead show what would be executed.
54 Warning: please notice that the ISO has to be mounted anyway, otherwise
55 identifying the grml flavour would not be possible.
56
57   *--fat16*::
58
59 Format specified partition with FAT16.
60 **Important:** this will destroy any existing data on the specified partition!
61
62   *--force*::
63
64 Force any (possible dangerous) actions requiring manual interaction (like --fat16).
65
66   *--grub*::
67
68 Install grub bootloader instead of syslinux. [Notice: not implemented yet.]
69
70   *--help*::
71
72 Display usage information and exit.
73
74   *--initrd=...*::
75
76 Install specified initrd instead of the default. You might want to specify
77 option *--kernel* as well. (Be aware when using multiboot setup.)
78 [Notice: not implemented yet.]
79
80   *--kernel=...*::
81
82 Install specified kernel instead of the default. You might want to specify
83 option *--initrd* as well. (Be aware when using multiboot setup.)
84 [Notice: not implemented yet.]
85
86   *--lilo=...*::
87
88 Use specified lilo executable for installing master boot record (MBR).  By
89 default any system wide (from $PATH) lilo executable is taken.  If there can not
90 be find any lilo executable the statically compiled version of the grml2usb
91 Debian package (see /usr/share/grml2usb/lilo/lilo.static.[amd64|i386]) is taken.
92
93   *--quiet*::
94
95 Do not output anything but just errors on console.
96
97   *--skip-addons*::
98
99 Do not install /boot/addons/ files (like dos, grub, memdisk,...).
100
101   *--squashfs=*::
102
103 Install specified squashfs file instead of the default.
104 [Notice: not implemented yet.]
105
106   *--uninstall*::
107
108 Uninstall grml ISO files.
109 [Notice: not implemented yet.]
110
111   *-v*, *--version*::
112
113 Return version and exit.
114
115   *--verbose*::
116
117 Enable verbose mode.
118
119 Developers Corner
120 -----------------
121
122 Directory layout on usb device
123 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124
125   boot/ ->
126     |-- addons/
127     |   |-- allinone.img
128     |   |-- balder10.imz
129     |   |-- chain.c32
130     |   |-- memdisk
131     |   `-- menu.c32
132     |-- release/
133     |   |-- grml/
134     |   |   |-- linux26
135     |   |   |-- initrd.gz
136     |   |-- grml64
137     |   |   |-- linux26
138     |   |   |-- initrd.gz
139     |   |-- grml-medium
140     |   |   |-- linux26
141     |   |   |-- initrd.gz
142     |   |-- grml64-medium
143     |   |   |-- linux26
144     |   |   |-- initrd.gz
145     |   |-- grml-small
146     |   |   |-- linux26
147     |   |   |-- initrd.gz
148     |   `-- grml64-small
149     |       |-- linux26
150     |       |-- initrd.gz
151     |-- grub/
152     |   |-- menu.lst
153     |   |-- splash.xpm.gz
154     |   `-- stage2_eltorito
155     `-- syslinux/
156         |-- boot.msg
157         |-- f1
158         |-- f2
159         |-- f3
160         |-- f4
161         |-- f5
162         |-- f6
163         |-- f7
164         |-- f8
165         |-- f9
166         |-- f10
167         |-- logo.16
168         `-- syslinux.cfg
169
170   grml/
171     |-- grml2usb.txt
172     |-- grml-cheatcodes.txt
173     |-- grml-version.txt
174     |-- LICENSE.txt
175     |-- md5sums
176     |-- README.txt
177     `-- web/
178         |-- index.html
179         |-- style.css
180         `-- images/
181             |-- button.png
182             |-- favicon.png
183             |-- linux.jpg
184             `-- logo.png
185
186   live/
187     |-- filesystem.module
188     |-- grml.squashfs
189     |-- grml-medium.module
190     |-- grml-medium.squashfs
191     |-- grml-small.module
192     |-- grml-small.squashfs
193     |-- grml64.module
194     |-- grml64.squashfs
195     |-- grml64-medium.module
196     |-- grml64-medium.squashfs
197     |-- grml64-small.module
198     `-- grml64-small.squashfs
199
200 Grabbing the source
201 ~~~~~~~~~~~~~~~~~~~
202
203   % git clone git://git.grml.org/grml2usb.git
204
205 Developers Debugging Hints
206 ~~~~~~~~~~~~~~~~~~~~~~~~~~
207
208 To play with grml2usb you can avoid using a real device via a loopback file
209 setup, like:
210
211   # dd if=/dev/zero of=~/loopback bs=1M count=100 # adjust size to your needs
212   # losetup /dev/loop1 ~/loopback
213
214 Then create according partitions either running for example:
215
216   # echo -en "n\np\n1\n\n\nt\n6\na\n1\n w\n" | fdisk /dev/loop1
217
218 or:
219
220   # parted /dev/loop1 -s "mkpart primary fat16 0 -1s mkfs 1 fat16"
221
222 Finally create a filesystem and execute grml2usb as needed:
223
224   # mkfs.vfat /dev/loop1
225   # grml2usb --bootloader-only /grml/isos/grml-small_2008.11.iso /dev/loop1
226
227 Performance tracing
228 ~~~~~~~~~~~~~~~~~~~
229
230   # blktrace -d /dev/sdb -o - | blkparse -i -
231   # grml2usb grml_2008.11.iso /dev/sdb1
232
233 Frequently Asked Questions (FAQ)
234 --------------------------------
235
236 What's the difference between grml2hd and grml2usb?
237 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238
239 grml2hd installs a running grml system to a harddisk. When rebooting the
240 harddisk installation can be modified and changes will find their way to the
241 harddisk immediately.  grml2usb copies just the compressed chroot filesystem
242 (being the squashfs file), some further informational files and a bootloader to
243 your device. This way you don't need as much space as with a harddisk
244 installation (just a USB device with >=ISO size) and when rebooting the system
245 your changes will be lost (even though a persistent root feature is
246 work-in-progress). Think of using a better CD version: booting is (usually)
247 faster, you don't need to burn a new CD when a new ISO version arrives (just
248 install the new ISO using grml2usb) and you can carry additional files on a
249 writable medium with yourself.
250
251 Why do I have to use a FAT16 filesystem?
252 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
253
254 You have to use a FAT16 filesystem if you consider using syslinux (being the
255 default). Syslinux currently does not support any other filesystems. If you want
256 to use another filesystem (like ext2/3) consider using the --grub option
257 instead.
258
259 I think I've got a really cool idea!
260 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
261
262 Please <<X7,report it to the author>>. Or even better: send us a patch.
263
264 I've found a bug!
265 ~~~~~~~~~~~~~~~~~
266
267 Please <<X7,report it to the author>>. Please provide usage examples and output
268 of your grml2usb commandline (consider using the "--verbose" option).
269
270 Usage examples
271 --------------
272
273   # grml2usb /home/grml/grml_2008.11.iso /dev/sdb1
274
275 Install specified ISO on device /dev/sdb1.
276
277   # grml2usb /home/grml/grml_2008.11.iso /home/grml/grml_small_2008.11.iso /dev/sdb1
278
279 Install specified ISOs on device /dev/sdb1 for multibooting ISOs.
280 Note: boot "grml" as usual, for booting grml-small use "grml-small on the
281 bootprompt, for grml64 use "grml64" and so on... The *first* specified ISO is
282 the one being the default (when just pressing enter or waiting until the timeout
283 is reached).
284
285   # grml2usb --fat16 /home/grml/grml_2008.11.iso /dev/sdb1
286
287 Install specified ISO on device /dev/sdb1 and format partition /dev/sdb1 with
288 FAT16 filesystem.
289
290   # grml2usb --grub /home/grml/grml_2008.11.iso /dev/sdb1
291
292 Install specified ISO on device /dev/sdb1 and use Grub as bootloader
293 (instead of syslinux being the default).
294
295   # grml2usb --kernel=/boot/vmlinuz-2.6.28-grml --initrd=/boot/initrd.img-2.6.28-grml \
296              /home/grml/grml_2008.11.iso /dev/sdb1
297
298 Install specified ISO on device /dev/sdb1 but use given kernel and initrd
299 instead of the ones provided by the ISO.
300
301   # grml2usb --squashfs=/grml/grml-live/grml_cd/live/grml.squashfs \
302              /home/grml/grml_2008.11.iso /dev/sdb1
303
304 Install specified ISO on device /dev/sdb1 but use given squashfs
305 file instead of the one provided by the ISO.
306
307   # grml2usb --bootoptions="lang=de ssh=mysecret" grml_2008.11.iso /dev/sdb1
308
309 Install specified ISO on device /dev/sdb1 and use "lang=de ssh=mysecret" as
310 default bootoptions.
311
312 Online Ressources
313 -----------------
314
315 Check out the link:http://grml.org/grml2usb/[grml2usb webpage] and the
316 link:http://git.grml.org/?p=grml2usb.git[grml2usb git repository].
317
318 Bugs
319 ----
320 Please report feedback, bugreports and wishes <<X7,to the author>>.
321
322 [[X7]]
323 Author
324 ------
325 Michael Prokop <mika@grml.org>
326
327 /////////////////////////////////////////////////////////////////
328 http://wiki.grml.org/doku.php?id=tips#multiboot_usb_pen
329 http://www.startx.ro/sugar/isotostick.sh
330 https://help.ubuntu.com/community/Installation/FromUSBStick
331 http://unetbootin.sourceforge.net/
332 http://www.tux.org/pub/people/kent-robotti/looplinux/rip/mkusb.sh
333 https://fedorahosted.org/liveusb-creator/
334 /////////////////////////////////////////////////////////////////