1
1
<!-- retain these comments for translator revision tracking -->
2
<!-- original version: 45616 untranslated -->
2
<!-- original version: 56442 untranslated -->
4
4
<sect1 condition="bootable-usb" id="boot-usb-files">
5
5
<title>Preparing Files for USB Memory Stick Booting</title>
9
There are two installation methods possible when booting from USB stick.
10
The first is to install completely from the network. The second is to
11
also copy a CD image onto the USB stick and use that as a source for
12
packages, possibly in combination with a mirror. This second method is
17
For the first installation method you'll need to download an installer
18
image from the <filename>netboot</filename> directory (at the location
19
mentioned in <xref linkend="where-files"/>) and use the
20
<quote>flexible way</quote> explained below to copy the files to the USB
25
Installation images for the second installation method can be found in
26
the <filename>hd-media</filename> directory and either the <quote>easy
27
way</quote> or the <quote>flexible way</quote> can be used to copy the
28
image to the USB stick. For this installation method you will also need
29
to download a CD image. The installation image and the CD image must be
30
based on the same release of &d-i;. If they do not match you are likely
31
to get errors<footnote>
34
The error message that is most likely to be displayed is that no kernel
35
modules can be found. This means that the version of the kernel module
36
udebs included on the CD image is different from the version of the
40
</footnote> during the installation.
9
44
To prepare the USB stick, you will need a system where GNU/Linux is
10
already running and where USB is supported. You should ensure that the
11
usb-storage kernel module is loaded (<userinput>modprobe
12
usb-storage</userinput>) and try to find out which SCSI device the USB
13
stick has been mapped to (in this example
14
<filename>/dev/sda</filename> is used). To write to your stick, you
15
may have to turn off its write protection switch.
45
already running and where USB is supported. With current GNU/Linux systems
46
the USB stick should be automatically recognized when you insert it. If
47
it is not you should check that the usb-storage kernel module is loaded.
48
When the USB stick is inserted, it will be mapped to a device named
49
<filename>/dev/sdX</filename>, where the <quote>X</quote> is a letter
50
in the range a-z. You should be able to see to which device the USB
51
stick was mapped by running the command <command>dmesg</command> after
52
inserting it. To write to your stick, you may have to turn off its write
58
The procedures described in this section will destroy anything already
59
on the device! Make very sure that you use the correct device name for
60
your USB stick. If you use the wrong device the result could be that all
61
information on for example a hard disk could be lost.
19
66
Note that the USB stick should be at least 256 MB in size (smaller
20
67
setups are possible if you follow <xref linkend="usb-copy-flexible"/>).
24
71
<sect2 id="usb-copy-easy">
25
72
<title>Copying the files — the easy way</title>
28
75
There is an all-in-one file <filename>hd-media/boot.img.gz</filename>
29
which contains all the installer files (including the kernel) as well
30
as <command>SYSLINUX</command> and its configuration file. You only
31
have to extract it directly to your USB stick:
76
which contains all the installer files (including the kernel)
77
<phrase arch="x86">as well as <classname>syslinux</classname> and its
78
configuration file.</phrase>
79
<phrase arch="powerpc">as well as <classname>yaboot</classname> and its
80
configuration file.</phrase>
84
Note that, although convenient, this method does have one major
85
disadvantage: the logical size of the device will be limited to 256 MB,
86
even if the capacity of the USB stick is larger. You will need to
87
repartition the USB stick and create new file systems to get its full
88
capacity back if you ever want to use it for some different purpose.
89
A second disadvantage is that you cannot copy a full CD image onto
90
the USB stick, but only the smaller businesscard or netinst CD images.
92
</para><para arch="x86">
94
To use this image you only have to extract it directly to your USB stick:
33
96
<informalexample><screen>
34
# zcat boot.img.gz > /dev/<replaceable>sda</replaceable>
97
# zcat boot.img.gz > /dev/<replaceable>sdX</replaceable>
35
98
</screen></informalexample>
37
100
</para><para arch="powerpc">
39
There is an all-in-one file <filename>hd-media/boot.img.gz</filename>
40
which contains all the installer files (including the kernel) as well
41
as <command>yaboot</command> and its configuration file. Create a
42
partition of type "Apple_Bootstrap" on your USB stick using
102
Create a partition of type "Apple_Bootstrap" on your USB stick using
43
103
<command>mac-fdisk</command>'s <userinput>C</userinput> command and
44
104
extract the image directly to that:
46
106
<informalexample><screen>
47
# zcat boot.img.gz > /dev/<replaceable>sda2</replaceable>
107
# zcat boot.img.gz > /dev/<replaceable>sdX2</replaceable>
48
108
</screen></informalexample>
53
Using this method will destroy anything already on the device. Make sure
54
that you use the correct device name for your USB stick.
59
After that, mount the USB memory stick (<userinput>mount
60
<replaceable arch="x86">/dev/sda</replaceable>
61
<replaceable arch="powerpc">/dev/sda2</replaceable>
62
/mnt</userinput>), which will now have
112
After that, mount the USB memory stick
113
<phrase arch="x86">(<userinput>mount
114
/dev/<replaceable>sdX</replaceable> /mnt</userinput>),</phrase>
115
<phrase arch="powerpc">(<userinput>mount
116
/dev/<replaceable>sdX2</replaceable> /mnt</userinput>),</phrase>
63
118
<phrase arch="x86">a FAT filesystem</phrase>
64
119
<phrase arch="powerpc">an HFS filesystem</phrase>
65
on it, and copy a Debian netinst or businesscard ISO image to it
66
(see <xref linkend="usb-add-iso"/>).
120
on it, and copy a Debian netinst or businesscard ISO image to it.
67
121
Unmount the stick (<userinput>umount /mnt</userinput>) and you are done.
76
130
If you like more flexibility or just want to know what's going on, you
77
should use the following method to put the files on your stick.
131
should use the following method to put the files on your stick. One
132
advantage of using this method is that — if the capacity of your
133
USB stick is large enough — you have the option of copying a
134
full CD ISO image to it.
81
138
&usb-setup-x86.xml;
82
139
&usb-setup-powerpc.xml;
86
<sect2 id="usb-add-iso">
87
<title>Adding an ISO image</title>
90
The installer will look for a Debian ISO image on the stick as its source
91
for additional data needed for the installation. So your next step is to
92
copy a Debian ISO image (businesscard, netinst or even a full CD image)
93
onto your stick (be sure to select one that fits). The file name of the
94
image must end in <filename>.iso</filename>.
98
If you want to install over the network, without using an ISO image,
99
you will of course skip the previous step. Moreover you will have to
100
use the initial ramdisk from the <filename>netboot</filename>
101
directory instead of the one from <filename>hd-media</filename>,
102
because <filename>hd-media/initrd.gz</filename> does not have network
107
When you are done, unmount the USB memory stick (<userinput>umount
108
/mnt</userinput>) and activate its write protection switch.
113
143
<!-- TODO: doesn't this section belong later? -->