#!/bin/sh # Prepare USB stick to install using debian-installer set -e usbdev="$1" shift webroot="http://people.debian.org/~wouter/d-i/powerpc/daily/powerpc/netboot/" webitems="yaboot yaboot.conf vmlinux initrd.gz" # space required for webitems on HFS bootstrap filesystem diskspace="10M" echo "Initializing partition map on $usbdev..." mac-fdisk "$usbdev" </dev/null i y C 2p $diskspace bootstrap Apple_Bootstrap w y q EOF echo "Initializing HFS bootstrap filesystem on $usbdev..." hformat "${usbdev}2" echo "Installing files onto bootstrap filesystem on $usbdev..." hmount "${usbdev}2" for item in $webitems; do # Download only once if [ ! -f "$item" ]; then wget -O "$item.new" "$webroot/$item" mv "$item.new" "$item" fi hcopy -r "$item" : done #hcopy -r /usr/lib/yaboot/yaboot : hattrib -c UNIX -t tbxi :yaboot hattrib -b : humount echo "Done setting up $usbdev!"