BSD 4_3_Tahoe development
[unix-history] / usr / src / sys / tahoedist / makeboot
CommitLineData
ba5e0405
C
1#!/bin/sh
2#
3# Copyright (c) 1983 Regents of the University of California.
4# All rights reserved. The Berkeley software License Agreement
5# specifies the terms and conditions for redistribution.
6#
7# %W% (Berkeley) %G%
8#
9# maketape [ 6250 | 1600 [ tapename [ remotetapemachine ] ] ]
10miniroot=dk4a
11bootroot=dk5a
12tape=/dev/rmt12
13type=1600
14if [ $# -gt 0 ]; then type=$1; fi
15if [ $# -gt 1 ]; then tape=$2; fi
16tartape=$tape
17if [ $# -gt 2 ]; then remote=$3; tartape='-'; fi
18#
19trap "rm -f /tmp/tape.$$; exit" 0 1 2 3 13 15
20$remote mt -t ${tape} rew
21date
22umount /dev/dk1a
23umount /dev/dk4c
24mount -r /dev/dk1a /nbsd
25mount -r /dev/dk4c /nbsd/usr
26cd /nbsd
27sync
28echo "Add image of bootstrap file system"
29eval dd if=/dev/r${bootroot} bs=1024 count=250 conv=sync ${remote+'|'} \
30 ${remote-"of=$tape"} ${remote+'/usr/local/n20b 1024 ">" $tape'}
31echo "Add image of mini-root file system"
32eval dd if=/dev/r${miniroot} count=205 bs=n20b conv=sync ${remote+'|'} \
33 ${remote-"of=$tape"} ${remote+'/usr/local/n20b ">" $tape'}
34echo "Add full dump of real file system"
35/etc/${remote+r}dump 0uf $remote${remote+:}${tape} /nbsd
36echo "Done, rewinding tape"
37$remote mt -t ${tape} rew &