1#!/bin/sh
2#	$NetBSD: installboot.sh,v 1.2 2002/07/11 16:03:18 christos Exp $
3
4# simple installboot program we can use until we have disklabel to do the job.
5# (This one has the advantage that it runs on any architecture. However it
6#  expects the bootblock to be located at a very fixed position.)
7#
8Usage() {
9	echo "Usage: installboot bootprog device" >&2
10	if [ -n "$1" ]; then echo "$1" >&2; fi
11	exit 1
12}
13
14if [ $# != 2 ]; then Usage; fi
15if [ ! -f $1 ]; then Usage "bootprog must be a regular file"; fi
16if [ ! -c $2 ]; then Usage "device must be a character special file"; fi
17
18dd if="$1" of="$2" obs=1024 seek=32 conv=osync
19dd if="$1" of="$2" obs=1024 seek=96 conv=osync
20exit $?
21