Partitioning the USB stick
We will show how to set up the memory stick to use the first partition,
instead of the entire device.
Since most USB sticks come pre-configured with a single FAT16
partition, you probably won't have to repartition or reformat the
stick. If you have to do that anyway, use cfdisk
or any other partitioning tool to create a FAT16 partition
Don't forget to set the bootable
bootable flag.
, and then create the filesystem using:
# mkdosfs /dev/sdX1
Take care that you use the correct device name for your USB stick. The
mkdosfs command is contained in the
dosfstools &debian; package.
In order to start the kernel after booting from the USB stick, we will
put a boot loader on the stick. Although any boot loader
(e.g. lilo) should work, it's convenient to use
syslinux, since it uses a FAT16 partition and can
be reconfigured by just editing a text file. Any operating system
which supports the FAT file system can be used to make changes to the
configuration of the boot loader.
To put syslinux on the FAT16 partition on your USB
stick, install the syslinux and
mtools packages on your system, and do:
# syslinux /dev/sdX1
Again, take care that you use the correct device name. The partition
must not be mounted when starting syslinux. This
procedure writes a boot sector to the partition and creates the file
ldlinux.sys which contains the boot loader code.
Adding the installer image
Mount the partition
(mount /dev/sdX1 /mnt)
and copy the following installer image files to the stick:
vmlinuz or linux (kernel binary)
initrd.gz (initial ramdisk image)
You can choose between either the regular version or the graphical version
of the installer. The latter can be found in the gtk
subdirectory. If you want to rename the files, please note that
syslinux can only process DOS (8.3) file names.
Next you should create a syslinux.cfg configuration
file, which at a bare minimum should contain the following two lines (change
the name of the kernel binary to linux
if you used a netboot image):
default vmlinuz
append initrd=initrd.gz
For the graphical installer you should add
vga=788 to the second line.
If you used an hd-media image, you should now copy a
&debian; ISO image
You can use either a businesscard, a netinst or a full CD image (see
). Be sure to select one that fits.
Note that the netboot mini.iso
image is
not usable for this purpose.
onto the stick. When you are done, unmount the USB memory stick
(umount /mnt).