e26d7d358a4207b0bdf62bd3ffc33b896511c923
[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 for installing master boot record (MBR).  By
91 default any system wide (from $PATH) lilo executable is taken.  If there can not
92 be find any lilo executable the statically compiled version of the grml2usb
93 Debian package (see /usr/share/grml2usb/lilo/lilo.static.[amd64|i386]) is taken.
94
95   *--mbr*::
96
97 Install a default master boot record (MBR) on the device.
98
99   *--quiet*::
100
101 Do not output anything but just errors on console.
102
103   *--skip-addons*::
104
105 Do not install /boot/addons/ files (like dos, grub, memdisk,...).
106
107   *--squashfs=*::
108
109 Install specified squashfs file instead of the default.
110 [Notice: not implemented yet.]
111
112   *--uninstall*::
113
114 Uninstall grml ISO files.
115 [Notice: not implemented yet.]
116
117   *-v*, *--version*::
118
119 Return version and exit.
120
121   *--verbose*::
122
123 Enable verbose mode.
124
125 Developers Corner
126 -----------------
127
128 Directory layout on usb device
129 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130
131   boot/ ->
132     |-- addons/
133     |   |-- allinone.img
134     |   |-- balder10.imz
135     |   |-- chain.c32
136     |   |-- memdisk
137     |   `-- menu.c32
138     |-- release/
139     |   |-- grml/
140     |   |   |-- linux26
141     |   |   |-- initrd.gz
142     |   |-- grml64
143     |   |   |-- linux26
144     |   |   |-- initrd.gz
145     |   |-- grml-medium
146     |   |   |-- linux26
147     |   |   |-- initrd.gz
148     |   |-- grml64-medium
149     |   |   |-- linux26
150     |   |   |-- initrd.gz
151     |   |-- grml-small
152     |   |   |-- linux26
153     |   |   |-- initrd.gz
154     |   `-- grml64-small
155     |       |-- linux26
156     |       |-- initrd.gz
157     |-- grub/
158     |   |-- menu.lst
159     |   |-- splash.xpm.gz
160     |   `-- stage2_eltorito
161     `-- syslinux/
162         |-- boot.msg
163         |-- f1
164         |-- f2
165         |-- f3
166         |-- f4
167         |-- f5
168         |-- f6
169         |-- f7
170         |-- f8
171         |-- f9
172         |-- f10
173         |-- logo.16
174         `-- syslinux.cfg
175
176   grml/
177     |-- grml2usb.txt
178     |-- grml-cheatcodes.txt
179     |-- grml-version.txt
180     |-- LICENSE.txt
181     |-- md5sums
182     |-- README.txt
183     `-- web/
184         |-- index.html
185         |-- style.css
186         `-- images/
187             |-- button.png
188             |-- favicon.png
189             |-- linux.jpg
190             `-- logo.png
191
192   live/
193     |-- filesystem.module
194     |-- grml.squashfs
195     |-- grml-medium.module
196     |-- grml-medium.squashfs
197     |-- grml-small.module
198     |-- grml-small.squashfs
199     |-- grml64.module
200     |-- grml64.squashfs
201     |-- grml64-medium.module
202     |-- grml64-medium.squashfs
203     |-- grml64-small.module
204     `-- grml64-small.squashfs
205
206 Grabbing the source
207 ~~~~~~~~~~~~~~~~~~~
208
209   git clone git://git.grml.org/grml2usb.git
210
211 Developers Debugging Hints
212 ~~~~~~~~~~~~~~~~~~~~~~~~~~
213
214 To play with grml2usb you can avoid using a real device via a loopback file
215 setup, like:
216
217   dd if=/dev/zero of=~/loopback bs=1M count=100 # adjust size to your needs
218   losetup /dev/loop1 ~/loopback
219
220 Then create according partitions either running for example:
221
222   echo -en "n\np\n1\n\n\n t \n 6\n a\n1\n w\n" | fdisk /dev/loop1
223
224 or:
225
226   parted /dev/loop1 -s "mkpart primary fat16 0 -1s mkfs 1 fat16"
227
228 Finally create a filesystem and execute grml2usb as needed:
229
230   mkfs.vfat /dev/loop1
231   grml2usb --bootloader-only --mbr /grml/isos/grml-small_2008.11.iso /dev/loop1
232
233
234 Usage examples
235 --------------
236
237   # grml2usb /home/grml/grml_2008.11.iso /dev/sdb1
238
239 Install specified ISO on device /dev/sdb1.
240
241   # grml2usb /home/grml/grml_2008.11.iso /home/grml/grml_small_2008.11.iso /dev/sdb1
242
243 Install specified ISOs on device /dev/sdb1 for multibooting ISOs.
244 Note: boot "grml" as usual, for booting grml-small use "grml-small on the
245 bootprompt, for grml64 use "grml64" and so on... The *first* specified ISO is
246 the one being the default (when just pressing enter or waiting until the timeout
247 is reached).
248
249   # grml2usb --fat16 --mbr /home/grml/grml_2008.11.iso /dev/sdb1
250
251 Install specified ISO on device /dev/sdb1, install MBR on /dev/sdb and
252 format partition /dev/sdb1 with FAT16 filesystem.
253
254   # grml2usb --grub /home/grml/grml_2008.11.iso /dev/sdb1
255
256 Install specified ISO on device /dev/sdb1 and use Grub as bootloader
257 (instead of syslinux being the default).
258
259   # grml2usb --kernel=/boot/vmlinuz-2.6.28-grml --initrd=/boot/initrd.img-2.6.28-grml \
260              /home/grml/grml_2008.11.iso /dev/sdb1
261
262 Install specified ISO on device /dev/sdb1 but use given kernel and initrd
263 instead of the ones provided by the ISO.
264
265   # grml2usb --squashfs=/grml/grml-live/grml_cd/live/grml.squashfs \
266              /home/grml/grml_2008.11.iso /dev/sdb1
267
268 Install specified ISO on device /dev/sdb1 but use given squashfs
269 file instead of the one provided by the ISO.
270
271   # grml2usb --bootoptions="lang=de ssh=mysecret" grml_2008.11.iso /dev/sdb1
272
273 Install specified ISO on device /dev/sdb1 and use "lang=de ssh=mysecret" as
274 default bootoptions.
275
276 Bugs
277 ----
278 Please report feedback, link:http://grml.org/bugs/[bugreports] and wishes link:http://grml.org/contact/[to the grml-team].
279
280 Author
281 ------
282 Michael Prokop <mika@grml.org>
283
284 /////////////////////////////////////////////////////////////////
285 http://wiki.grml.org/doku.php?id=tips#multiboot_usb_pen
286 http://www.startx.ro/sugar/isotostick.sh
287 https://help.ubuntu.com/community/Installation/FromUSBStick
288 http://unetbootin.sourceforge.net/
289 http://www.tux.org/pub/people/kent-robotti/looplinux/rip/mkusb.sh
290 https://fedorahosted.org/liveusb-creator/
291 /////////////////////////////////////////////////////////////////