#!/bin/rc

echo creating partitions
disk/prep /dev/hd0 > /dev/null <<EOF
partboot

64
boot

2048
boot1

2048
swap

20000
cache

10000
fs


*
y
EOF
ls '#w'

echo copying partboot
dd -bs 512 -conv sync < /sys/src/boot/magnum/partboot > /dev/hd0partboot

echo copying kernel
dd -bs 512 -conv sync < /mips/9indigo > /dev/hd0boot

echo making file system
disk/kfs -rb 4096 -f /dev/hd0fs

echo copying over files
cputype=mips disk/mkfs /lib/proto/portproto /lib/proto/usrproto
