From f85c80fe8de5ac8b0e30350d7115c5fc9f337174 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 12 Apr 2008 19:16:57 +0000 Subject: *** empty log message *** --- localusbbootmacinit | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 localusbbootmacinit (limited to 'localusbbootmacinit') diff --git a/localusbbootmacinit b/localusbbootmacinit new file mode 100755 index 0000000..8d9a411 --- /dev/null +++ b/localusbbootmacinit @@ -0,0 +1,47 @@ +#!/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!" -- cgit v1.2.3