Partitioning the USB stick
Most USB sticks do not come pre-configured in such a way that Open
Firmware can boot from them, so you will need to repartition the stick.
On Mac systems, run
mac-fdisk /dev/sdX,
initialise a new partition map using the i
command, and create a new partition of type Apple_Bootstrap using the
C command. (Note that the first "partition" will
always be the partition map itself.) Then type
$ hformat /dev/sdX2
Take care that you use the correct device name for your USB stick. The
hformat command is contained in the
hfsutils Debian package.
In order to start the kernel after booting from the USB stick, we will
put a boot loader on the stick. The yaboot boot
loader can be installed on an HFS filesystem and can be reconfigured by
just editing a text file. Any operating system which supports the HFS
file system can be used to make changes to the configuration of the boot
loader.
The normal ybin tool that comes with
yaboot does not yet understand USB storage devices,
so you will have to install yaboot by hand using the
hfsutils tools. Type
$ hmount /dev/sdX2
$ hcopy -r /usr/lib/yaboot/yaboot :
$ hattrib -c UNIX -t tbxi :yaboot
$ hattrib -b :
$ humount
Again, take care that you use the correct device name. The partition
must not be otherwise mounted during this procedure. This procedure
writes the boot loader to the partition, and uses the HFS utilities to
mark it in such a way that Open Firmware will boot it. Having done this,
the rest of the USB stick may be prepared using the normal Unix
utilities.
Adding the installer image
Mount the partition
(mount /dev/sdX2 /mnt)
and copy the following installer image files to the stick:
vmlinux (kernel binary)
initrd.gz (initial ramdisk image)
yaboot.conf (yaboot configuration file)
boot.msg (optional boot message)
The yaboot.conf configuration file should
contain the following lines:
default=install
root=/dev/ram
message=/boot.msg
image=/vmlinux
label=install
initrd=/initrd.gz
initrd-size=10000
read-only
Please note that the initrd-size parameter
may need to be increased, depending on the image you are booting.
If you used an hd-media image, you should now copy a
Debian ISO image (businesscard, netinst or full CD image; be sure to select
one that fits) onto the stick. When you are done, unmount the USB memory
stick (umount /mnt).