#!/bin/rc -e # mkboot - prepare disk for booting(8) fn usage { echo >[1=2] usage: mkboot disk exit usage } if (~ $#* 0) usage disk/mbr -m /386/mbr $1/data disk/fdisk -bw -a $1/data disk/prep -bw -a^(9fat nvram) $1/plan9 kernel=`{awk -F! '/^bootfile=/{print $NF}' 9fat/plan9.ini} disk/format -b /386/pbslba -d -r 2 $1/9fat \ /386/9load /386/$kernel 9fat/* exit ''