~ubuntu-branches/ubuntu/vivid/installation-guide/vivid-proposed

« back to all changes in this revision

Viewing changes to eu/install-methods/boot-usb-files.xml

  • Committer: Bazaar Package Importer
  • Author(s): Frans Pop
  • Date: 2005-10-25 17:37:25 UTC
  • Revision ID: james.westby@ubuntu.com-20051025173725-aq0bm11be7bfd7rw
Tags: 20051025
* Mention in copyright that full GPL is included in the manual.
  Closes: #334925
* Register installed documents with doc-base.
* Minor updates in English text and translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!-- retain these comments for translator revision tracking -->
 
2
<!-- original version: 14337 untranslated -->
 
3
 
 
4
 <sect1 condition="bootable-usb" id="boot-usb-files">
 
5
 <title>Preparing Files for USB Memory Stick Booting</title>
 
6
 
 
7
<para>
 
8
 
 
9
For preparing the USB stick you will need a system where GNU/Linux is
 
10
already running and where USB is supported. You should assure 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
will probably have to turn off its write protection switch.
 
16
 
 
17
</para><para>
 
18
 
 
19
Note, that the USB stick should be at least 128 MB in size (smaller
 
20
setups are possible if you follow <xref linkend="usb-copy-flexible"/>).
 
21
 
 
22
</para>
 
23
 
 
24
  <sect2 id="usb-copy-easy">
 
25
  <title>Copying the files - the easy way</title>
 
26
<para>
 
27
 
 
28
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 to your USB stick:
 
32
 
 
33
<informalexample><screen>
 
34
 
 
35
gzip -dc boot.img.gz >/dev/<replaceable>sda</replaceable>
 
36
 
 
37
</screen></informalexample>
 
38
 
 
39
Of course this will destroy anything already on the device, so take
 
40
care that you use the correct device name for your USB stick.
 
41
 
 
42
</para><para>
 
43
 
 
44
After that, mount the USB memory stick (<userinput>mount /dev/sda
 
45
/mnt</userinput>), which will now have a FAT filesystem on it, and
 
46
copy a Debian netinst or businesscard ISO image to it. Please note
 
47
that the file name must end in <filename>.iso</filename>. Unmount the
 
48
stick (<userinput>umount /mnt</userinput>) and you are done.
 
49
 
 
50
</para>
 
51
  </sect2>
 
52
 
 
53
  <sect2 id="usb-copy-flexible">
 
54
  <title>Copying the files - the flexible way</title>
 
55
<para>
 
56
 
 
57
If you like more flexibility or just want to know what's going on, you
 
58
should use the following method to put the files on your stick. We
 
59
will show how to setup the memory stick to use the first partition,
 
60
instead of entire device.
 
61
 
 
62
</para><note><para>
 
63
 
 
64
Since most USB sticks come pre-configured with a single FAT16
 
65
partition, you probably won't have to repartition or reformat the
 
66
stick.  If you have to do that anyway, use <command>cfdisk</command>
 
67
or any other partitioning tool for creating a FAT16 partition and then
 
68
type
 
69
 
 
70
<informalexample><screen>
 
71
 
 
72
mkdosfs /dev/<replaceable>sda1</replaceable>
 
73
 
 
74
</screen></informalexample>
 
75
 
 
76
Take care that you use the correct device name for your USB stick. The
 
77
<command>mkdosfs</command> command is contained in the
 
78
<classname>dosfstools</classname> Debian package.
 
79
 
 
80
</para></note><para>
 
81
 
 
82
In order to start the kernel after booting from the USB stick, we will
 
83
put a boot loader on the stick. Although any boot loader
 
84
(e.g. <command>LILO</command>) should work, it's convenient to use
 
85
<command>SYSLINUX</command>, since it uses a FAT16 partition and can
 
86
be reconfigured by just editing a text file. Any operating system
 
87
which supports the FAT file system can be used to make changes to the
 
88
configuration of the boot loader.
 
89
 
 
90
</para><para>
 
91
 
 
92
To put <command>SYSLINUX</command> on the FAT16 partition on your USB
 
93
stick, install the <classname>syslinux</classname> and
 
94
<classname>mtools</classname> packages on your system, and type
 
95
 
 
96
<informalexample><screen>
 
97
 
 
98
syslinux /dev/<replaceable>sda1</replaceable>
 
99
 
 
100
</screen></informalexample>
 
101
 
 
102
Again, take care that you use the correct device name. The partition
 
103
must not be mounted when starting <command>SYSLINUX</command>. This
 
104
procedure writes a boot sector to the partition and creates the file
 
105
<filename>ldlinux.sys</filename> which contains the boot loader code.
 
106
 
 
107
</para><para>
 
108
 
 
109
Mount the parition (<userinput>mount /dev/sda1 /mnt</userinput>) and
 
110
copy the following files from the Debian archives to the stick:
 
111
 
 
112
<itemizedlist>
 
113
<listitem><para>
 
114
 
 
115
<filename>vmlinuz</filename> (kernel binary)
 
116
 
 
117
</para></listitem>
 
118
<listitem><para>
 
119
 
 
120
<filename>initrd.gz</filename> (initial ramdisk image)
 
121
 
 
122
</para></listitem>
 
123
<listitem><para>
 
124
 
 
125
<filename>syslinux.cfg</filename> (SYSLINUX configuration file)
 
126
 
 
127
</para></listitem>
 
128
<listitem><para>
 
129
 
 
130
Optional kernel modules
 
131
 
 
132
</para></listitem>
 
133
</itemizedlist>
 
134
 
 
135
If you want to rename the files, please note that
 
136
<command>SYSLINUX</command> can only process DOS (8.3) file names.
 
137
 
 
138
</para><para>
 
139
 
 
140
The <filename>syslinux.cfg</filename> configuration file should
 
141
contain the following two lines:
 
142
 
 
143
<informalexample><screen>
 
144
 
 
145
default vmlinuz
 
146
append initrd=initrd.gz ramdisk_size=10000 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw
 
147
 
 
148
</screen></informalexample>
 
149
 
 
150
Please note, that the <userinput>ramdisk_size</userinput> parameter
 
151
may need to be increased, depending on the image you are booting.
 
152
 
 
153
</para><para>
 
154
 
 
155
Now you should put any Debian ISO image (businesscard, netinst or even
 
156
a full one) onto your stick (if it fits). The file name of such an
 
157
image must end in <filename>.iso</filename>.
 
158
 
 
159
</para><para>
 
160
 
 
161
If you want to install over the network, without using an ISO image,
 
162
you will of course skip the previous step. Moreover you will have to
 
163
use the initial ramdisk from the <filename>netboot</filename>
 
164
directory instead of the one from <filename>hd-media</filename>,
 
165
because <filename>hd-media/initrd.gz</filename> does not have network
 
166
support.
 
167
 
 
168
</para><para>
 
169
 
 
170
When you are done, unmount the USB memory stick (<userinput>umount
 
171
/mnt</userinput>) and activate its write protection switch.
 
172
 
 
173
</para><warning><para>
 
174
 
 
175
If your system refuses to boot from the memory stick, the stick may
 
176
contain an invalid master boot record (MBR). To fix this, use the
 
177
<command>install-mbr</command> command from the package
 
178
<classname>mbr</classname>:
 
179
 
 
180
<informalexample><screen>
 
181
 
 
182
install-mbr /dev/<replaceable>sda</replaceable>
 
183
 
 
184
</screen></informalexample>
 
185
 
 
186
</para></warning>
 
187
  </sect2>
 
188
 </sect1>