1
<!-- retain these comments for translator revision tracking -->
2
<!-- original version: 27345 untranslated -->
5
<title>USB stick partitioning on &arch-title;</title>
8
We will show how to setup the memory stick to use the first partition,
9
instead of the entire device.
13
Since most USB sticks come pre-configured with a single FAT16
14
partition, you probably won't have to repartition or reformat the
15
stick. If you have to do that anyway, use <command>cfdisk</command>
16
or any other partitioning tool for creating a FAT16 partition and then
17
create the filesystem using:
19
<informalexample><screen>
20
# mkdosfs /dev/<replaceable>sda1</replaceable>
21
</screen></informalexample>
23
Take care that you use the correct device name for your USB stick. The
24
<command>mkdosfs</command> command is contained in the
25
<classname>dosfstools</classname> Debian package.
29
In order to start the kernel after booting from the USB stick, we will
30
put a boot loader on the stick. Although any boot loader
31
(e.g. <command>LILO</command>) should work, it's convenient to use
32
<command>SYSLINUX</command>, since it uses a FAT16 partition and can
33
be reconfigured by just editing a text file. Any operating system
34
which supports the FAT file system can be used to make changes to the
35
configuration of the boot loader.
39
To put <command>SYSLINUX</command> on the FAT16 partition on your USB
40
stick, install the <classname>syslinux</classname> and
41
<classname>mtools</classname> packages on your system, and do:
43
<informalexample><screen>
44
# syslinux /dev/<replaceable>sda1</replaceable>
45
</screen></informalexample>
47
Again, take care that you use the correct device name. The partition
48
must not be mounted when starting <command>SYSLINUX</command>. This
49
procedure writes a boot sector to the partition and creates the file
50
<filename>ldlinux.sys</filename> which contains the boot loader code.
54
Mount the partition (<userinput>mount /dev/sda1 /mnt</userinput>) and
55
copy the following files from the Debian archives to the stick:
60
<filename>vmlinuz</filename> (kernel binary)
65
<filename>initrd.gz</filename> (initial ramdisk image)
70
<filename>syslinux.cfg</filename> (SYSLINUX configuration file)
75
Optional kernel modules
80
If you want to rename the files, please note that
81
<command>SYSLINUX</command> can only process DOS (8.3) file names.
85
The <filename>syslinux.cfg</filename> configuration file should
86
contain the following two lines:
88
<informalexample><screen>
90
append initrd=initrd.gz ramdisk_size=12000 root=/dev/rd/0 init=/linuxrc rw
91
</screen></informalexample>
93
Please note that the <userinput>ramdisk_size</userinput> parameter
94
may need to be increased, depending on the image you are booting.
95
<phrase condition="sarge">
96
If the boot fails, you can try adding <userinput>devfs=mount,dall</userinput>
97
to the <quote>append</quote> line.