# Copyright (c) 1988 Regents of the University of California.
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# distribution and use acknowledge that the software was developed
# by the University of California, Berkeley. The name of the
# University may not be used to endorse or promote products derived
# from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
# @(#)get 1.5 (Berkeley) %G%
# Shell script to build a mini-root file system in preparation for building
# a distribution tape. The file system created here is image copied onto
# tape, then image copied onto disk as the "first" step in a cold boot of
echo You just
'(almost)' destroyed the root
cp $DISTROOT/sys
/GENERIC
/vmunix .
# create necessary directories
DIRLIST
="bin dev etc a tmp stand"
# copy in files from /etc
ETCFILE
="disklabel disktab fsck ifconfig init mknod mount newfs restore \
cp $DISTROOT/etc
/$i etc
/$i
# copy in files from /bin
BINFILE
="[ awk cat cp dd echo ed expr ls make mkdir mt mv rcp rm sh stty \
cp $DISTROOT/bin
/$i bin
/$i
# copy in files from /stand
STANDFILE
="copy vdformat"
cp $DISTROOT/stand
/$i stand
/$i
#DOTFILE=".profile boot fppoc fppwcs poc poc1 poc2 wcs"
DOTFILE
=".profile boot wcs"
cp $DISTROOT/dev
/MAKEDEV dev
/MAKEDEV
cp /dev
/null dev
/MAKEDEV.
local
(cd dev
; .
/MAKEDEV std dk0
; .
/MAKEDEV cy0
; mv rmt12 cy0
; rm *mt
*)
: ${disk?'Usage: disk=xx0 tape=yy xtr'}
: ${tape?'Usage: disk=xx0 tape=yy xtr'}
echo 'Build root file system'
echo 'Check the file system'
echo 'Restore the dump image of the root'
restore rsf 3 /dev/${tape}0
echo 'Root filesystem extracted'
# make xtr script executable