#/bin/sh

# fdisk -iau0 wd0	# do manually :-/ ....
# fdisk -iau0 wd1	# ditto ....
fdisk wd0 > LIST.fdisk.wd0.txt	# so I can post to NetBSD list if things go south ....
fdisk wd1 > LIST.fdisk.wd1.txt
# disklabel -i wd0
# disklabel -i wd1
disklabel -R wd0 proto.wd0.txt
disklabel -R wd1 proto.wd1.txt
raidctl -C raid1.root.txt raid0; raidctl -I 10 raid0; raidctl -A yes raid0
raidctl -i raid0; raidctl -S raid0
disklabel -i raid0	# <---- What to do here ????
newfs -O2 -b32k raid0a
mount -o async /dev/raid0a /altroot
mkdir /altroot/usr; mount -o async /dev/raid1a /altroot/usr
mkdir /altroot/home; mount_ffs -o async /dev/dk0 /altroot/home
df -h
cp NetBSD.fstab.WAM.txt  /altroot/etc/fstab
# cd /; pax -rw -pe -X / /altroot
cd /altroot; cp usr/mdec/boot .
installboot /dev/rwd0a usr/mdec/bootxx_ffsv2
installboot /dev/rwd1a usr/mdec/bootxx_ffsv2
raidctl -A root raid0
