Remove old files in preparation of rearrangement.
This commit is contained in:
parent
e1c01aff60
commit
7864d584a1
@ -1,12 +0,0 @@
|
||||
# $NetBSD: Makefile,v 1.6 2000/05/05 20:13:30 mycroft Exp $
|
||||
|
||||
TOP= ${.CURDIR}/..
|
||||
|
||||
.include "${TOP}/Makefile.inc"
|
||||
|
||||
IMAGE= boot.fs
|
||||
KERN!= cd $(.CURDIR)/../ramdisk-kernel/; \
|
||||
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/netbsd.INSTALL.gz\n" | \
|
||||
${MAKE} -s -f-
|
||||
|
||||
.include "${TOP}/bootfloppy-common/Makefile.inc"
|
@ -1,51 +0,0 @@
|
||||
# $NetBSD: Makefile,v 1.9 2000/09/21 04:43:32 jhawk Exp $
|
||||
|
||||
TOP= ${.CURDIR}/..
|
||||
|
||||
.include "${TOP}/Makefile.inc"
|
||||
.include <bsd.kernobj.mk>
|
||||
.include <bsd.own.mk>
|
||||
|
||||
MDEC= ${DESTDIR}/usr/mdec
|
||||
STRIP?= strip
|
||||
|
||||
COMMONDIR= ${TOP}/bootfloppy-common
|
||||
LISTS= ${COMMONDIR}/list
|
||||
RAMDISK!= cd $(.CURDIR)/../ramdisk/; \
|
||||
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk.fs\n" | \
|
||||
${MAKE} -s -f-
|
||||
RAMDISK_T!= cd ${.CURDIR}/../ramdisk-tiny/; \
|
||||
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk-tiny.fs\n" | \
|
||||
${MAKE} -s -f-
|
||||
|
||||
netbsd.INSTALL.gz: .NOTMAIN ${KERNOBJDIR}/INSTALL/netbsd ${RAMDISK}
|
||||
cp ${KERNOBJDIR}/INSTALL/netbsd netbsd.tmp
|
||||
${DESTDIR}/usr/sbin/mdsetimage -v netbsd.tmp ${RAMDISK}
|
||||
nm netbsd.tmp > netbsd.INSTALL.symbols
|
||||
${STRIP} netbsd.tmp
|
||||
gzip -9 netbsd.tmp
|
||||
mv netbsd.tmp.gz ${.TARGET}
|
||||
|
||||
netbsd.INSTALL_TINY.gz: .NOTMAIN ${KERNOBJDIR}/INSTALL_TINY/netbsd ${RAMDISK_T}
|
||||
cp ${KERNOBJDIR}/INSTALL_TINY/netbsd netbsd.tmp
|
||||
${DESTDIR}/usr/sbin/mdsetimage -v netbsd.tmp ${RAMDISK_T}
|
||||
nm netbsd.tmp > netbsd.INSTALL_TINY.symbols
|
||||
${STRIP} netbsd.tmp
|
||||
gzip -9 netbsd.tmp
|
||||
mv netbsd.tmp.gz ${.TARGET}
|
||||
|
||||
KERNELS=netbsd.INSTALL.gz netbsd.INSTALL_TINY.gz
|
||||
KERNELSYMS=netbsd.INSTALL.symbols netbsd.INSTALL_TINY.symbols
|
||||
|
||||
all: ${KERNELS}
|
||||
|
||||
release:
|
||||
-mkdir -p ${RELEASEDIR}/binary/kernel
|
||||
cp -p ${KERNELS} ${RELEASEDIR}/binary/kernel
|
||||
cp ${KERNELSYMS} ${RELEASEDIR}/binary/kernel
|
||||
|
||||
clean cleandir distclean:
|
||||
rm -f *.core ${KERNELS} ${KERNELSYMS}
|
||||
|
||||
.include <bsd.obj.mk>
|
||||
.include <bsd.subdir.mk>
|
@ -1,67 +0,0 @@
|
||||
# $NetBSD: dot.hdprofile,v 1.3 2000/06/14 17:24:33 cgd Exp $
|
||||
#
|
||||
# Copyright (c) 1994 Christopher G. Demetriou
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed for the
|
||||
# NetBSD Project. See http://www.netbsd.org/ for
|
||||
# information about NetBSD.
|
||||
# 4. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
|
||||
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
|
||||
export PATH
|
||||
TERM=pc3
|
||||
export TERM
|
||||
HOME=/
|
||||
export HOME
|
||||
|
||||
umask 022
|
||||
|
||||
if [ "X${DONEPROFILE}" = "X" ]; then
|
||||
DONEPROFILE=YES
|
||||
export DONEPROFILE
|
||||
|
||||
echo "Checking filesystems..."
|
||||
fsck -y
|
||||
|
||||
echo "Mounting root..."
|
||||
mount -u /
|
||||
|
||||
# set up some sane defaults
|
||||
echo 'erase ^?, werase ^W, kill ^U, intr ^C'
|
||||
stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
|
||||
echo ''
|
||||
|
||||
TERMCAP=/.termcap ; export TERMCAP
|
||||
|
||||
# pull in the functions that people will use from the shell prompt.
|
||||
. /.commonutils
|
||||
. /.instutils
|
||||
|
||||
echo "Follow the installation directions to install the NetBSD"
|
||||
echo "distribution sets."
|
||||
fi
|
@ -1,513 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: install.tmpl,v 1.3 2000/06/14 22:52:43 cgd Exp $
|
||||
#
|
||||
# Copyright (c) 1997 Perry E. Metzger
|
||||
# Copyright (c) 1994 Christopher G. Demetriou
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed for the
|
||||
# NetBSD Project. See http://www.netbsd.org/ for
|
||||
# information about NetBSD.
|
||||
# 4. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
|
||||
# NetBSD installation script.
|
||||
# In a perfect world, this would be a nice C program, with a reasonable
|
||||
# user interface.
|
||||
|
||||
DT=/etc/disktab # /etc/disktab
|
||||
FSTABDIR=/mnt/etc # /mnt/etc
|
||||
#DONTDOIT=echo
|
||||
ASYNC="-o async"
|
||||
|
||||
FSTAB=${FSTABDIR}/fstab
|
||||
|
||||
getresp() {
|
||||
read resp
|
||||
if [ "X$resp" = "X" ]; then
|
||||
resp=$1
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Welcome to the NetBSD @@VERSION@@ installation program."
|
||||
echo ""
|
||||
echo "This program is designed to help you put NetBSD on your hard disk,"
|
||||
echo "in a simple and rational way. You'll be asked several questions,"
|
||||
echo "and it would probably be useful to have your disk's hardware"
|
||||
echo "manual, the installation notes, and a calculator handy."
|
||||
echo ""
|
||||
echo "In particular, you will need to know some reasonably detailed"
|
||||
echo "information about your disk's geometry, because there is currently"
|
||||
echo "no way this this program can figure that information out."
|
||||
echo ""
|
||||
echo "As with anything which modifies your hard drive's contents, this"
|
||||
echo "program can cause SIGNIFICANT data loss, and you are advised"
|
||||
echo "to make sure your hard drive is backed up before beginning the"
|
||||
echo "installation process."
|
||||
echo ""
|
||||
echo "Default answers are displyed in brackets after the questions."
|
||||
echo "You can hit Control-C at any time to quit, but if you do so at a"
|
||||
echo "prompt, you may have to hit return. Also, quitting in the middle of"
|
||||
echo "installation may leave your system in an inconsistent state."
|
||||
echo ""
|
||||
echo -n "Proceed with installation? [n] "
|
||||
getresp "n"
|
||||
case "$resp" in
|
||||
y*|Y*)
|
||||
echo "Cool! Let's get to it..."
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "OK, then. Enter 'halt' at the prompt to halt the"
|
||||
echo "machine. Once the machine has halted, remove the"
|
||||
echo "floppy and press any key to reboot."
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo "To do the installation, you'll need to provide some information about"
|
||||
echo "your disk."
|
||||
echo ""
|
||||
echo "NetBSD can be installed on ST506, ESDI, IDE, or SCSI disks."
|
||||
echo -n "What kind of disk will you be installing on? [SCSI] "
|
||||
getresp "SCSI"
|
||||
case "$resp" in
|
||||
esdi|ESDI|st506|ST506)
|
||||
drivetype=wd
|
||||
echo -n "Does it support _automatic_ sector remapping? [y] "
|
||||
getresp "y"
|
||||
case "$resp" in
|
||||
n*|N*)
|
||||
sect_fwd="sf:"
|
||||
;;
|
||||
*)
|
||||
sect_fwd=""
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ide|IDE)
|
||||
drivetype=wd
|
||||
sect_fwd=""
|
||||
type=ST506
|
||||
;;
|
||||
scsi|SCSI)
|
||||
drivetype=sd
|
||||
sect_fwd=""
|
||||
type=SCSI
|
||||
;;
|
||||
esac
|
||||
|
||||
# find out what units are possible for that disk, and query the user.
|
||||
driveunits=`ls /dev/${drivetype}?a | sed -e 's,/dev/\(...\)a,\1,g'`
|
||||
if [ "X${driveunits}" = "X" ]; then
|
||||
echo "FATAL ERROR:"
|
||||
echo "No devices for disks of type '${drivetype}'."
|
||||
echo "This is probably a bug in the install disks."
|
||||
echo "Exiting install program."
|
||||
exit
|
||||
fi
|
||||
prefdrive=${drivetype}0
|
||||
|
||||
echo ""
|
||||
echo "The following ${drivetype}-type disks are supported by this"
|
||||
echo "installation procedure:"
|
||||
echo " "${driveunits}
|
||||
echo "Note that they may not exist in _your_ machine; the list of"
|
||||
echo "disks in your machine was printed when the system was booting."
|
||||
echo ""
|
||||
while [ "X${drivename}" = "X" ]; do
|
||||
echo -n "Which disk would like to install on? [${prefdrive}] "
|
||||
getresp ${prefdrive}
|
||||
otherdrives=`echo "${driveunits}" | sed -e s,${resp},,`
|
||||
if [ "X${driveunits}" = "X${otherdrives}" ]; then
|
||||
echo ""
|
||||
echo "\"${resp}\" is an invalid drive name. Valid choices"
|
||||
echo "are: "${driveunits}
|
||||
echo ""
|
||||
else
|
||||
drivename=${resp}
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Using disk ${drivename}."
|
||||
echo ""
|
||||
echo -n "What kind of disk is it? (one word please) [my${drivetype}] "
|
||||
getresp "my${drivetype}"
|
||||
labelname=$resp
|
||||
|
||||
echo ""
|
||||
echo "You will now need to provide some information about your disk's"
|
||||
echo "geometry. This should either be in the User's Manual for your disk,"
|
||||
echo "or you should have written down what NetBSD printed when booting."
|
||||
echo "(Note that he geometry that's printed at boot time is preferred.)"
|
||||
echo ""
|
||||
echo "You may choose to view the initial boot messages for your system"
|
||||
echo "again right now if you like."
|
||||
echo -n "View the boot messages again? [n] "
|
||||
getresp "n"
|
||||
case "$resp" in
|
||||
y*|Y*)
|
||||
more /kern/msgbuf
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo "You will now enter the disk geometry information"
|
||||
echo ""
|
||||
|
||||
echo -n "Number of bytes per disk sector? [512] "
|
||||
getresp 512
|
||||
bytes_per_sect="$resp"
|
||||
|
||||
echo -n "Number of disk cylinders? "
|
||||
getresp
|
||||
cyls_per_disk="$resp"
|
||||
|
||||
echo -n "Number of disk tracks (heads) per disk cylinder? "
|
||||
getresp
|
||||
tracks_per_cyl="$resp"
|
||||
|
||||
echo -n "Number of disk sectors per disk track? "
|
||||
getresp
|
||||
sects_per_track="$resp"
|
||||
|
||||
cylindersize=$(( $sects_per_track * $tracks_per_cyl ))
|
||||
cylbytes=$(( $cylindersize * $bytes_per_sect ))
|
||||
disksize=$(( $cylindersize * $cyls_per_disk ))
|
||||
|
||||
echo ""
|
||||
echo "Your disk has a total of $disksize $bytes_per_sect byte sectors,"
|
||||
echo "arranged as $cyls_per_disk cylinders which contain $cylindersize "
|
||||
echo "sectors ($cylbytes bytes) each."
|
||||
echo ""
|
||||
echo "You can specify partition sizes in cylinders ('c') or sectors ('s')."
|
||||
while [ "X${sizemult}" = "X" ]; do
|
||||
echo -n "What units would you like to use? [cylinders] "
|
||||
getresp cylinders
|
||||
case "$resp" in
|
||||
c*|C*)
|
||||
sizemult=$cylindersize
|
||||
sizeunit="cylinders"
|
||||
;;
|
||||
s*|S*)
|
||||
sizemult=1
|
||||
sizeunit="sectors"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "Enter cylinders ('c') or sectors ('s')."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $sizeunit = "sectors" ]; then
|
||||
echo ""
|
||||
echo "For best disk performance, partitions should begin and end on"
|
||||
echo "cylinder boundaries. Wherever possible, pick sizes that are"
|
||||
echo "multiples of the cylinder size ($cylindersize sectors)."
|
||||
fi
|
||||
|
||||
echo -n ""
|
||||
echo -n "Size of NetBSD portion of disk (in $sizeunit)? "
|
||||
getresp
|
||||
partition=$resp
|
||||
partition_sects=$(( $resp * $sizemult ))
|
||||
part_offset=0
|
||||
if [ $partition_sects -lt $disksize ]; then
|
||||
echo -n "Offset of NetBSD portion of disk (in $sizeunit)? "
|
||||
getresp
|
||||
part_offset=$resp
|
||||
fi
|
||||
badspacesec=0
|
||||
if [ "$sect_fwd" = "sf:" ]; then
|
||||
badspacecyl=$(( $sects_per_track + 126 ))
|
||||
badspacecyl=$(( $badspacecyl + $cylindersize - 1 ))
|
||||
badspacecyl=$(( $badspacecyl / $cylindersize ))
|
||||
badspacesec=$(( $badspacecyl * $cylindersize ))
|
||||
echo ""
|
||||
echo -n "Using $badspacesec sectors ($badspacecyl cylinders) for the "
|
||||
echo "bad144 bad block table"
|
||||
fi
|
||||
|
||||
sects_left=$(( $partition_sects - $badspacesec ))
|
||||
units_left=$(( $sects_left / $sizemult ))
|
||||
echo ""
|
||||
echo "There are $units_left $sizeunit left to allocate."
|
||||
echo ""
|
||||
root=0
|
||||
while [ $root -eq 0 ]; do
|
||||
echo -n "Root partition size (in $sizeunit)? "
|
||||
getresp
|
||||
case $resp in
|
||||
[1-9]*)
|
||||
total=$resp
|
||||
if [ $total -gt $units_left ]; then
|
||||
echo -n "Root size is greater than remaining "
|
||||
echo "free space on disk."
|
||||
else
|
||||
root=$resp
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
root_offset=$part_offset
|
||||
part_used=$(( $root + $badspacesec / $sizemult ))
|
||||
units_left=$(( $partition - $part_used ))
|
||||
echo ""
|
||||
|
||||
swap=0
|
||||
while [ $swap -eq 0 ]; do
|
||||
echo "$units_left $sizeunit remaining in NetBSD portion of disk."
|
||||
echo -n "Swap partition size (in $sizeunit)? "
|
||||
getresp
|
||||
case $resp in
|
||||
[1-9]*)
|
||||
if [ $swap -gt $units_left ]; then
|
||||
echo -n "Swap size is greater than remaining "
|
||||
echo "free space on disk."
|
||||
else
|
||||
swap=$resp
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
swap_offset=$(( $root_offset + $root ))
|
||||
part_used=$(( $part_used + $swap ))
|
||||
echo ""
|
||||
|
||||
fragsize=1024
|
||||
blocksize=8192
|
||||
|
||||
cat /etc/disktab.preinstall > $DT
|
||||
echo "" >> $DT
|
||||
echo "$labelname|NetBSD installation generated:\\" >> $DT
|
||||
echo " :dt=${type}:ty=winchester:\\" >> $DT
|
||||
echo -n " :nc#${cyls_per_disk}:ns#${sects_per_track}" >> $DT
|
||||
echo ":nt#${tracks_per_cyl}:\\" >> $DT
|
||||
echo " :se#${bytes_per_sect}:${sect_fwd}\\" >> $DT
|
||||
_size=$(( $root * $sizemult ))
|
||||
_offset=$(( $root_offset * $sizemult ))
|
||||
echo -n " :pa#${_size}:oa#${_offset}" >> $DT
|
||||
echo ":ta=4.2BSD:ba#${blocksize}:fa#${fragsize}:\\" >> $DT
|
||||
_size=$(( $swap * $sizemult ))
|
||||
_offset=$(( $swap_offset * $sizemult ))
|
||||
echo " :pb#${_size}:ob#${_offset}:tb=swap:\\" >> $DT
|
||||
_size=$(( $partition * $sizemult ))
|
||||
_offset=$(( $part_offset * $sizemult ))
|
||||
echo " :pc#${_size}:oc#${_offset}:\\" >> $DT
|
||||
|
||||
echo "You will now have to enter information about any other partitions"
|
||||
echo "to be created in the NetBSD portion of the disk. This process will"
|
||||
echo "be complete when you've filled up all remaining space in the NetBSD"
|
||||
echo "portion of the disk."
|
||||
|
||||
while [ $part_used -lt $partition ]; do
|
||||
part_size=0
|
||||
units_left=$(( $partition - $part_used ))
|
||||
while [ $part_size -eq 0 ]; do
|
||||
echo ""
|
||||
echo -n "$units_left $sizeunit remaining in NetBSD portion of "
|
||||
echo "the disk"
|
||||
echo -n "Next partition size (in $sizeunit)? "
|
||||
getresp
|
||||
case $resp in
|
||||
[1-9]*)
|
||||
total=$(( $part_used + $resp ))
|
||||
if [ $total -gt $partition ]; then
|
||||
echo -n "That would make the parition"
|
||||
echo "too large to fit!"
|
||||
else
|
||||
part_size=$resp
|
||||
part_used=$total
|
||||
part_name=""
|
||||
while [ "$part_name" = "" ]; do
|
||||
echo -n "Mount point? "
|
||||
getresp
|
||||
part_name=$resp
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ "$ename" = "" ]; then
|
||||
ename=$part_name
|
||||
offset=$(( $part_offset + $root + $swap ))
|
||||
_size=$(( $part_size * $sizemult ))
|
||||
_offset=$(( $offset * $sizemult ))
|
||||
echo -n " :pe#${_size}:oe#${_offset}" >> $DT
|
||||
echo ":te=4.2BSD:be#${blocksize}:fe#${fragsize}:\\" >> $DT
|
||||
offset=$(( $offset + $part_size ))
|
||||
elif [ "$fname" = "" ]; then
|
||||
fname=$part_name
|
||||
_size=$(( $part_size * $sizemult ))
|
||||
_offset=$(( $offset * $sizemult ))
|
||||
echo -n " :pf#${_size}:of#${_offset}" >> $DT
|
||||
echo ":tf=4.2BSD:bf#${blocksize}:ff#${fragsize}:\\" >> $DT
|
||||
offset=$(( $offset + $part_size ))
|
||||
elif [ "$gname" = "" ]; then
|
||||
gname=$part_name
|
||||
_size=$(( $part_size * $sizemult ))
|
||||
_offset=$(( $offset * $sizemult ))
|
||||
echo -n " :pg#${_size}:og#${_offset}" >> $DT
|
||||
echo ":tg=4.2BSD:bg#${blocksize}:fg#${fragsize}:\\" >> $DT
|
||||
offset=$(( $offset + $part_size ))
|
||||
elif [ "$hname" = "" ]; then
|
||||
hname=$part_name
|
||||
_size=$(( $part_size * $sizemult ))
|
||||
_offset=$(( $offset * $sizemult ))
|
||||
echo -n " :ph#${_size}:oh#${_offset}" >> $DT
|
||||
echo ":th=4.2BSD:bh#${blocksize}:fh#${fragsize}:\\" >> $DT
|
||||
part_used=$partition
|
||||
fi
|
||||
done
|
||||
echo " :pd#${disksize}:od#0:" >> $DT
|
||||
sync
|
||||
|
||||
echo ""
|
||||
echo "THIS IS YOUR LAST CHANCE!!!"
|
||||
echo ""
|
||||
echo -n "Are you SURE you want NetBSD installed on your hard drive? (yes/no) "
|
||||
answer=""
|
||||
while [ "$answer" = "" ]; do
|
||||
getresp
|
||||
case $resp in
|
||||
yes|YES)
|
||||
echo ""
|
||||
echo "Here we go..."
|
||||
answer=yes
|
||||
;;
|
||||
no|NO)
|
||||
echo ""
|
||||
echo -n "OK, then. enter 'halt' to halt the machine. "
|
||||
echo "Once the machine has halted,"
|
||||
echo -n "remove the floppy, and press any key to "
|
||||
echo "reboot."
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
echo -n "I want a yes or no answer... well? "
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo -n "Labeling disk $drivename..."
|
||||
$DONTDOIT disklabel -w -r $drivename $labelname
|
||||
echo " done."
|
||||
|
||||
if [ "$sect_fwd" = "sf:" ]; then
|
||||
echo -n "Initializing bad144 badblock table..."
|
||||
$DONTDOIT bad144 $drivename 0
|
||||
echo " done."
|
||||
fi
|
||||
|
||||
echo "Initializing root filesystem, and mounting..."
|
||||
$DONTDOIT newfs /dev/r${drivename}a $name
|
||||
$DONTDOIT mount -v $ASYNC /dev/${drivename}a /mnt
|
||||
if [ "$ename" != "" ]; then
|
||||
echo ""
|
||||
echo "Initializing $ename filesystem, and mounting..."
|
||||
$DONTDOIT newfs /dev/r${drivename}e $name
|
||||
$DONTDOIT mkdir -p /mnt/$ename
|
||||
$DONTDOIT mount -v $ASYNC /dev/${drivename}e /mnt/$ename
|
||||
fi
|
||||
if [ "$fname" != "" ]; then
|
||||
echo ""
|
||||
echo "Initializing $fname filesystem, and mounting..."
|
||||
$DONTDOIT newfs /dev/r${drivename}f $name
|
||||
$DONTDOIT mkdir -p /mnt/$fname
|
||||
$DONTDOIT mount -v $ASYNC /dev/${drivename}f /mnt/$fname
|
||||
fi
|
||||
if [ "$gname" != "" ]; then
|
||||
echo ""
|
||||
echo "Initializing $gname filesystem, and mounting..."
|
||||
$DONTDOIT newfs /dev/r${drivename}g $name
|
||||
$DONTDOIT mkdir -p /mnt/$gname
|
||||
$DONTDOIT mount -v $ASYNC /dev/${drivename}g /mnt/$gname
|
||||
fi
|
||||
if [ "$hname" != "" ]; then
|
||||
echo ""
|
||||
echo "Initializing $hname filesystem, and mounting..."
|
||||
$DONTDOIT newfs /dev/r${drivename}h $name
|
||||
$DONTDOIT mkdir -p /mnt/$hname
|
||||
$DONTDOIT mount -v $ASYNC /dev/${drivename}h /mnt/$hname
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Populating filesystems with bootstrapping binaries and config files"
|
||||
$DONTDOIT pax -Xrwpe . /mnt
|
||||
$DONTDOIT cp /tmp/.hdprofile /mnt/.profile
|
||||
|
||||
echo ""
|
||||
echo -n "Creating an fstab..."
|
||||
echo /dev/${drivename}a / ffs rw 1 1 | sed -e s,//,/, > $FSTAB
|
||||
echo /dev/${drivename}b none swap sw 0 0 | sed -e s,//,/, >> $FSTAB
|
||||
if [ "$ename" != "" ]; then
|
||||
echo /dev/${drivename}e /$ename ffs rw 1 2 | sed -e s,//,/, >> $FSTAB
|
||||
fi
|
||||
if [ "$fname" != "" ]; then
|
||||
echo /dev/${drivename}f /$fname ffs rw 1 3 | sed -e s,//,/, >> $FSTAB
|
||||
fi
|
||||
if [ "$gname" != "" ]; then
|
||||
echo /dev/${drivename}g /$gname ffs rw 1 4 | sed -e s,//,/, >> $FSTAB
|
||||
fi
|
||||
if [ "$hname" != "" ]; then
|
||||
echo /dev/${drivename}h /$hname ffs rw 1 5 | sed -e s,//,/, >> $FSTAB
|
||||
fi
|
||||
sync
|
||||
echo " done."
|
||||
|
||||
echo ""
|
||||
echo -n "Installing boot blocks on $drivename..."
|
||||
# shouldn't be needed, but...
|
||||
$DONTDOIT rm -f /mnt/boot
|
||||
$DONTDOIT /usr/mdec/installboot /usr/mdec/biosboot.sym /dev/r${drivename}a
|
||||
echo " done."
|
||||
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "OK! The preliminary work of setting up your disk is now complete."
|
||||
echo ""
|
||||
echo "The remaining tasks are:"
|
||||
echo ""
|
||||
echo "To load and install the NetBSD distribution sets."
|
||||
echo "Currently the hard drive's root filesystem is mounted on /mnt"
|
||||
echo ""
|
||||
echo "To copy a NetBSD kernel to the hard drive's root filesystem."
|
||||
echo "Once accomplished, you can boot off the hard drive."
|
||||
echo ""
|
||||
echo "Consult the installation notes which will describe how to"
|
||||
echo "install the distribution sets and kernel. Post-installation"
|
||||
echo "configuration is also discussed therein."
|
||||
echo ""
|
||||
echo "GOOD LUCK!"
|
||||
echo ""
|
@ -1,49 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $NetBSD: start.tmpl,v 1.1 2000/06/12 18:51:18 he Exp $
|
||||
|
||||
again="true"
|
||||
|
||||
echo "Welcome to the NetBSD @@VERSION@@ installation floppy."
|
||||
echo
|
||||
|
||||
while [ $again = "true" ]; do
|
||||
|
||||
echo 'enter "sysinst" to run the new system install program,'
|
||||
echo ' "install" to install NetBSD,'
|
||||
echo ' "upgrade" to upgrade an existing NetBSD system,'
|
||||
echo ' or "shell" for a shell prompt.'
|
||||
echo
|
||||
echo -n "your choice? "
|
||||
read resp
|
||||
|
||||
case "$resp" in
|
||||
sysinst|install|upgrade|shell)
|
||||
again="false"
|
||||
;;
|
||||
"")
|
||||
echo
|
||||
;;
|
||||
*)
|
||||
echo "Sorry, $resp isn't valid."
|
||||
echo
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "$resp" in
|
||||
sysinst)
|
||||
sysinst
|
||||
;;
|
||||
install)
|
||||
install
|
||||
;;
|
||||
upgrade)
|
||||
upgrade
|
||||
;;
|
||||
shell)
|
||||
echo 'If you want to run install or upgrade later,'
|
||||
echo 'simply type "install" or "upgrade" to the shell.'
|
||||
echo 'good luck!'
|
||||
;;
|
||||
esac
|
@ -1,257 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: upgrade.tmpl,v 1.3 2000/06/14 22:52:43 cgd Exp $
|
||||
#
|
||||
# Copyright (c) 1997 Perry E. Metzger
|
||||
# Copyright (c) 1994 Christopher G. Demetriou
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed for the
|
||||
# NetBSD Project. See http://www.netbsd.org/ for
|
||||
# information about NetBSD.
|
||||
# 4. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
|
||||
# NetBSD upgrade script.
|
||||
# In a perfect world, this would be a nice C program, with a reasonable
|
||||
# user interface.
|
||||
|
||||
DT=/etc/disktab # /etc/disktab
|
||||
FSTABDIR=/mnt/etc # /mnt/etc
|
||||
#DONTDOIT=echo
|
||||
UARGS="-c 2"
|
||||
|
||||
FSTAB=${FSTABDIR}/fstab
|
||||
|
||||
getresp() {
|
||||
read resp
|
||||
if [ "X$resp" = "X" ]; then
|
||||
resp=$1
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Welcome to the NetBSD @@VERSION@@ upgrade program."
|
||||
echo ""
|
||||
echo "This program is designed to help you put the new version of NetBSD"
|
||||
echo "on your hard disk, in a simple and rational way. To upgrade, you"
|
||||
echo "must have plenty of free space on all partitions which will be"
|
||||
echo "upgraded. If you have at least 1MB free on your root partition,"
|
||||
echo "and several free on your /usr patition, you should be fine."
|
||||
echo ""
|
||||
echo "As with anything which modifies your hard drive's contents, this"
|
||||
echo "program can cause SIGNIFICANT data loss, and you are advised"
|
||||
echo "to make sure your hard drive is backed up before beginning the"
|
||||
echo "upgrade process."
|
||||
echo ""
|
||||
echo "Default answers are displyed in brackets after the questions."
|
||||
echo "You can hit Control-C at any time to quit, but if you do so at a"
|
||||
echo "prompt, you may have to hit return. Also, quitting in the middle of"
|
||||
echo "the upgrade may leave your system in an inconsistent (and unusable)"
|
||||
echo "state."
|
||||
echo ""
|
||||
echo -n "Proceed with upgrade? [n] "
|
||||
getresp "n"
|
||||
case "$resp" in
|
||||
y*|Y*)
|
||||
echo "Cool! Let's get to it..."
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "OK, then. Enter 'halt' at the prompt to halt the"
|
||||
echo "machine. Once the machine has halted, remove the"
|
||||
echo "floppy and press any key to reboot."
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
# find out what units are possible, and query the user.
|
||||
driveunits=`ls /dev/[sw]d?a | sed -e 's,/dev/\(...\)a,\1,g'`
|
||||
if [ "X${driveunits}" = "X" ]; then
|
||||
echo "FATAL ERROR:"
|
||||
echo "No disk devices."
|
||||
echo "This is probably a bug in the install disks."
|
||||
echo "Exiting install program."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "The following disks are supported by this upgrade procedure:"
|
||||
echo " "${driveunits}
|
||||
echo "If your system was previously completely contained within the"
|
||||
echo "disks listed above (i.e. if your system didn't occupy any space"
|
||||
echo "on disks NOT listed above), this upgrade disk can upgrade your"
|
||||
echo "system. If it cannot, hit Control-C at the prompt."
|
||||
echo ""
|
||||
while [ "X${drivename}" = "X" ]; do
|
||||
echo -n "Which disk contains your root partition? "
|
||||
getresp
|
||||
otherdrives=`echo "${driveunits}" | sed -e s,${resp},,`
|
||||
if [ "X${driveunits}" = "X${otherdrives}" ]; then
|
||||
echo ""
|
||||
echo "\"${resp}\" is an invalid drive name. Valid choices"
|
||||
echo "are: "${driveunits}
|
||||
echo ""
|
||||
else
|
||||
drivename=${resp}
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Root partition is on ${drivename}a."
|
||||
|
||||
echo ""
|
||||
echo "If (and only if!) you are upgrading from NetBSD 0.9 or below,"
|
||||
echo "you should upgrade to the new file system format. Do not answer"
|
||||
echo "yes if you are upgrading from NetBSD 1.0 or above."
|
||||
echo "Would you like to upgrade your file systems to the new file system"
|
||||
echo -n "format? [y] "
|
||||
getresp "y"
|
||||
case "$resp" in
|
||||
n*|N*)
|
||||
echo ""
|
||||
echo "If you are upgrading from NetBSD 0.9 or below,"
|
||||
echo "you should upgrade your file systems with 'fsck -c 2'"
|
||||
echo "as soon as is feasible, because the new file system"
|
||||
echo "code is better-tested and more performant."
|
||||
upgrargs=""
|
||||
upgradefs=NO
|
||||
;;
|
||||
*)
|
||||
upgrargs=$UARGS
|
||||
upgradefs=YES
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ $upgradefs = YES ]; then
|
||||
echo ""
|
||||
echo "your file systems will be upgraded while they are checked"
|
||||
fi
|
||||
|
||||
echo "checking the file system on ${drivename}a..."
|
||||
|
||||
fsck -f -p $upgrargs /dev/r${drivename}a
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: FILE SYSTEM UPGRADE FAILED."
|
||||
echo "You should probably reboot the machine, fsck your"
|
||||
echo "disk(s), and try the upgrade procedure again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Mounting root partition on /mnt..."
|
||||
mount /dev/${drivename}a /mnt
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: MOUNT FAILED."
|
||||
echo "You should verify that your system is set up as you"
|
||||
echo "described, and re-attempt the upgrade procedure."
|
||||
exit 1
|
||||
fi
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo -n "Copying new fsck binary to your hard disk..."
|
||||
if [ ! -d /mnt/sbin ]; then
|
||||
mkdir /mnt/sbin
|
||||
fi
|
||||
cp /sbin/fsck /mnt/sbin/fsck
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: COPY FAILED."
|
||||
echo "It in unclear why this error would occur. It looks"
|
||||
echo "like you may end up having to upgrade by hand."
|
||||
exit 1
|
||||
fi
|
||||
echo " Done."
|
||||
|
||||
echo ""
|
||||
echo "Re-mounting root partition read-only..."
|
||||
mount -u -o ro /dev/${drivename}a /mnt
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: RE-MOUNT FAILED."
|
||||
echo "It in unclear why this error would occur. It looks"
|
||||
echo "like you may end up having to upgrade by hand."
|
||||
exit 1
|
||||
fi
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo "checking the rest of your file systems..."
|
||||
chroot /mnt fsck -f -p $upgrargs
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: FILE SYSTEM UPGRADE(S) FAILED."
|
||||
echo "You should probably reboot the machine, fsck your"
|
||||
echo "file system(s), and try the upgrade procedure"
|
||||
echo "again."
|
||||
exit 1
|
||||
fi
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo "Re-mounting root partition read-write..."
|
||||
mount -u -o rw /dev/${drivename}a /mnt
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: RE-MOUNT FAILED."
|
||||
echo "It in unclear why this error would occur. It looks"
|
||||
echo "like you may end up having to upgrade by hand."
|
||||
exit 1
|
||||
fi
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo "Updating boot blocks on ${drivename}..."
|
||||
# shouldn't be needed, but...
|
||||
$DONTDOIT rm -f /mnt/boot
|
||||
$DONTDOIT /usr/mdec/installboot /usr/mdec/biosboot.sym /dev/r${drivename}a
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: UPDATE OF BOOT CODE FAILED."
|
||||
echo "It in unclear why this error would occur. It looks"
|
||||
echo "like you may end up having to upgrade by hand."
|
||||
exit 1
|
||||
fi
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo "Copying bootstrapping binaries and config files to the hard drive..."
|
||||
$DONTDOIT cp /mnt/.profile /mnt/.profile.bak
|
||||
$DONTDOIT pax -s '#^\./etc/.*##' -Xrwpe . /mnt
|
||||
$DONTDOIT mv /mnt/etc/rc /mnt/etc/rc.bak
|
||||
$DONTDOIT cp /tmp/.hdprofile /mnt/.profile
|
||||
|
||||
echo ""
|
||||
echo "Mounting remaining partitions..."
|
||||
chroot /mnt mount -at ffs > /dev/null 2>&1
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "OK! The preliminary work of setting up your disk is now complete,"
|
||||
echo "and you can now upgrade the actual NetBSD software."
|
||||
echo ""
|
||||
echo "Right now, your hard disk is mounted on /mnt. You should consult"
|
||||
echo "the installation notes to determine how to load and install the new"
|
||||
echo "NetBSD distribution sets, and how to clean up after the upgrade"
|
||||
echo "software, when you are done."
|
||||
echo ""
|
||||
echo "GOOD LUCK!"
|
||||
echo ""
|
@ -1,94 +0,0 @@
|
||||
# $NetBSD: Makefile,v 1.31 2000/08/30 23:51:50 jhawk Exp $
|
||||
|
||||
TOP= ${.CURDIR}/..
|
||||
WARNS=1
|
||||
|
||||
.include "${TOP}/Makefile.inc"
|
||||
IMAGE= ramdisk.fs
|
||||
|
||||
AUXTARGETS= install.sh upgrade.sh start.sh
|
||||
AUXDEPENDS= dot.profile dot.hdprofile disktab.preinstall \
|
||||
termcap.mini
|
||||
AUXCLEAN= ${AUXTARGETS}
|
||||
|
||||
CBIN= ramdiskbin
|
||||
|
||||
MOUNT_POINT?= /mnt
|
||||
# DEV/RDEV file system device, CDEV/RDEV vnconfig device
|
||||
VND?= vnd0
|
||||
VND_DEV= /dev/${VND}a
|
||||
VND_RDEV= /dev/r${VND}a
|
||||
VND_CDEV= /dev/${VND}d
|
||||
VND_CRDEV= /dev/r${VND}d
|
||||
IMAGE?= xxx.fs
|
||||
MDEC= ${DESTDIR}/usr/mdec
|
||||
|
||||
LISTS= list
|
||||
CRUNCHCONF= ${CBIN}.conf
|
||||
MTREE= mtree.conf
|
||||
|
||||
RAMDISKSPC= 128
|
||||
RAMDISKCYLS= 32
|
||||
RAMDISKSIZE!= expr ${RAMDISKSPC} \* ${RAMDISKCYLS}
|
||||
|
||||
install.sh: install.tmpl
|
||||
sed "s/@@VERSION@@/${VER}/" < ${.ALLSRC} > ${.TARGET}
|
||||
|
||||
upgrade.sh: upgrade.tmpl
|
||||
sed "s/@@VERSION@@/${VER}/" < ${.ALLSRC} > ${.TARGET}
|
||||
|
||||
start.sh: start.tmpl
|
||||
sed "s/@@VERSION@@/${VER}/" < ${.ALLSRC} > ${.TARGET}
|
||||
|
||||
realall: ${IMAGE}
|
||||
|
||||
${IMAGE}: ${AUXTARGETS} ${CBIN} ${AUXDEPENDS} ${MTREE} ${LISTS}
|
||||
rm -f ${IMAGE}.tmp
|
||||
dd if=/dev/zero of=${IMAGE}.tmp count=${RAMDISKSIZE}
|
||||
vnconfig -v -c ${VND_CDEV} ${IMAGE}.tmp \
|
||||
512/${RAMDISKSPC}/1/${RAMDISKCYLS}
|
||||
-disklabel ${VND_CDEV} >tmplabel
|
||||
disklabel -r -R ${VND_CDEV} tmplabel
|
||||
newfs -B le -m 0 -o space -i 3950 -c 80 ${VND_RDEV}
|
||||
mount ${VND_DEV} ${MOUNT_POINT}
|
||||
mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -U
|
||||
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
|
||||
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
|
||||
@echo ""
|
||||
@df -i ${MOUNT_POINT}
|
||||
@echo ""
|
||||
umount ${MOUNT_POINT}
|
||||
vnconfig -u ${VND_CDEV}
|
||||
mv -f ${IMAGE}.tmp ${IMAGE}
|
||||
|
||||
unconfig:
|
||||
-umount -f ${MOUNT_POINT}
|
||||
-vnconfig -u ${VND_DEV}
|
||||
-/bin/rm -f ${IMAGE} ${IMAGE}.tmp
|
||||
|
||||
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
|
||||
crunchgen -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
|
||||
|
||||
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
|
||||
${MAKE} -f ${CBIN}.mk all
|
||||
|
||||
# This is listed in ramdiskbin.conf but is built here.
|
||||
${CBIN}: libhack.o
|
||||
|
||||
# Use stubs to eliminate some large stuff from libc
|
||||
HACKSRC=${TOP}/../../utils/libhack
|
||||
.include "${HACKSRC}/Makefile.inc"
|
||||
|
||||
# turn off small gethostby* temporarily
|
||||
HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o setlocale.o yplib.o
|
||||
|
||||
release:
|
||||
|
||||
clean cleandir distclean:
|
||||
/bin/rm -f ${AUXCLEAN} *.core ${IMAGE} ${IMAGE}.tmp ${CBIN} \
|
||||
${CBIN}.mk ${CBIN}.cache *.o *.cro *.c tmplabel
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include <bsd.obj.mk>
|
||||
.include <bsd.subdir.mk>
|
||||
.include <bsd.sys.mk>
|
@ -1,56 +0,0 @@
|
||||
# $NetBSD: Makefile.inc,v 1.14 2000/08/30 23:51:50 jhawk Exp $
|
||||
|
||||
# TOP is assumed to be defined by Makefile including this one.
|
||||
|
||||
CBIN= ramdiskbin
|
||||
COMMONDIR= ${TOP}/ramdisk-common
|
||||
|
||||
MOUNT_POINT?= /mnt
|
||||
VND?= vnd0
|
||||
VND_DEV= /dev/${VND}a
|
||||
VND_RDEV= /dev/r${VND}a
|
||||
VND_CDEV= /dev/${VND}d
|
||||
VND_CRDEV= /dev/r${VND}d
|
||||
IMAGE?= xxx.fs
|
||||
MDEC= ${DESTDIR}/usr/mdec
|
||||
|
||||
LISTS= ${COMMONDIR}/list ${.CURDIR}/list
|
||||
CRUNCHCONF= ${COMMONDIR}/${CBIN}.conf
|
||||
MTREE= ${COMMONDIR}/mtree.conf
|
||||
|
||||
DISKTYPE= floppy3
|
||||
|
||||
realall: ${AUXTARGETS} ${CBIN}
|
||||
rm -f ${IMAGE}.tmp
|
||||
dd if=/dev/zero of=${IMAGE}.tmp count=3072
|
||||
vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}.tmp
|
||||
disklabel -rw ${VND_CDEV} ${DISKTYPE}
|
||||
newfs -B le -m 0 -o space -i 5120 -c 80 ${VND_RDEV} ${DISKTYPE}
|
||||
mount ${VND_DEV} ${MOUNT_POINT}
|
||||
mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
|
||||
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
|
||||
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS}
|
||||
@echo ""
|
||||
@df -i ${MOUNT_POINT}
|
||||
@echo ""
|
||||
umount ${MOUNT_POINT}
|
||||
vnconfig -u ${VND_CDEV}
|
||||
mv -f ${IMAGE}.tmp ${IMAGE}
|
||||
|
||||
unconfig:
|
||||
-umount -f ${MOUNT_POINT}
|
||||
-vnconfig -u ${VND_DEV}
|
||||
-/bin/rm -f ${IMAGE} ${IMAGE}.tmp
|
||||
|
||||
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
|
||||
crunchgen -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${CRUNCHCONF}
|
||||
|
||||
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
|
||||
${MAKE} -f ${CBIN}.mk all
|
||||
|
||||
clean cleandir distclean:
|
||||
/bin/rm -f ${AUXCLEAN} *.core ${IMAGE} ${IMAGE}.tmp ${CBIN} \
|
||||
${CBIN}.mk ${CBIN}.cache *.o *.cro *.c
|
||||
|
||||
.include <bsd.obj.mk>
|
||||
.include <bsd.subdir.mk>
|
@ -1,31 +0,0 @@
|
||||
# $NetBSD: disktab.preinstall,v 1.1 1997/06/14 18:56:07 perry Exp $
|
||||
#
|
||||
# Disk geometry and partition layout tables.
|
||||
# Key:
|
||||
# dt controller type
|
||||
# ty type of disk (fixed, removeable, simulated)
|
||||
# d[0-4] drive-type-dependent parameters
|
||||
# ns #sectors/track
|
||||
# nt #tracks/cylinder
|
||||
# nc #cylinders/disk
|
||||
# sc #sectors/cylinder, nc*nt default
|
||||
# su #sectors/unit, sc*nc default
|
||||
# se sector size, DEV_BSIZE default
|
||||
# rm rpm, 3600 default
|
||||
# sf supports bad144-style bad sector forwarding
|
||||
# sk sector skew per track, default 0
|
||||
# cs sector skew per cylinder, default 0
|
||||
# hs headswitch time, default 0
|
||||
# ts one-cylinder seek time, default 0
|
||||
# il sector interleave (n:1), 1 default
|
||||
# bs boot block size, default BBSIZE
|
||||
# sb superblock size, default SBSIZE
|
||||
# o[a-h] partition offsets in sectors
|
||||
# p[a-h] partition sizes in sectors
|
||||
# b[a-h] partition block sizes in bytes
|
||||
# f[a-h] partition fragment sizes in bytes
|
||||
# t[a-h] partition types (filesystem, swap, etc)
|
||||
#
|
||||
# All partition sizes reserve space for bad sector tables.
|
||||
# (5 cylinders needed for maintenance + replacement sectors)
|
||||
#
|
@ -1,62 +0,0 @@
|
||||
# $NetBSD: dot.hdprofile,v 1.6 2000/06/14 17:24:34 cgd Exp $
|
||||
#
|
||||
# Copyright (c) 1994 Christopher G. Demetriou
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed for the
|
||||
# NetBSD Project. See http://www.netbsd.org/ for
|
||||
# information about NetBSD.
|
||||
# 4. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
|
||||
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
|
||||
export PATH
|
||||
TERM=pc3
|
||||
export TERM
|
||||
HOME=/
|
||||
export HOME
|
||||
|
||||
umask 022
|
||||
|
||||
if [ "X${DONEPROFILE}" = "X" ]; then
|
||||
DONEPROFILE=YES
|
||||
export DONEPROFILE
|
||||
|
||||
echo "Checking filesystems..."
|
||||
fsck -y
|
||||
|
||||
echo "Mounting root..."
|
||||
mount -u /
|
||||
|
||||
# set up some sane defaults
|
||||
echo 'erase ^?, werase ^W, kill ^U, intr ^C'
|
||||
stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
|
||||
echo ''
|
||||
|
||||
TERMCAP=/.termcap ; export TERMCAP
|
||||
|
||||
[ -x /sysinst ] && /sysinst
|
||||
fi
|
@ -1,74 +0,0 @@
|
||||
# $NetBSD: dot.profile,v 1.12 2000/06/14 22:52:44 cgd Exp $
|
||||
#
|
||||
# Copyright (c) 1997 Perry E. Metzger
|
||||
# Copyright (c) 1994 Christopher G. Demetriou
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed for the
|
||||
# NetBSD Project. See http://www.netbsd.org/ for
|
||||
# information about NetBSD.
|
||||
# 4. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
|
||||
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
|
||||
export PATH
|
||||
TERM=pc3
|
||||
export TERM
|
||||
HOME=/
|
||||
export HOME
|
||||
BLOCKSIZE=1k
|
||||
export BLOCKSIZE
|
||||
EDITOR=ed
|
||||
export EDITOR
|
||||
|
||||
umask 022
|
||||
|
||||
ROOTDEV=/dev/md0a
|
||||
|
||||
if [ "X${DONEPROFILE}" = "X" ]; then
|
||||
DONEPROFILE=YES
|
||||
export DONEPROFILE
|
||||
|
||||
# set up some sane defaults
|
||||
echo 'erase ^?, werase ^W, kill ^U, intr ^C'
|
||||
stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
|
||||
echo ''
|
||||
|
||||
# mount the ramdisk read write
|
||||
mount -u $ROOTDEV /
|
||||
|
||||
# mount the kern_fs so that we can examine the dmesg state
|
||||
mount -t kernfs /kern /kern
|
||||
|
||||
# pull in the functions that people will use from the shell prompt.
|
||||
# . /.commonutils
|
||||
# . /.instutils
|
||||
dmesg() cat /kern/msgbuf
|
||||
grep() sed -n "/$1/p"
|
||||
|
||||
# run the installation or upgrade script.
|
||||
sysinst
|
||||
fi
|
@ -1,513 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: install.tmpl,v 1.6 2000/06/14 22:52:44 cgd Exp $
|
||||
#
|
||||
# Copyright (c) 1997 Perry E. Metzger
|
||||
# Copyright (c) 1994 Christopher G. Demetriou
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed for the
|
||||
# NetBSD Project. See http://www.netbsd.org/ for
|
||||
# information about NetBSD.
|
||||
# 4. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
|
||||
# NetBSD installation script.
|
||||
# In a perfect world, this would be a nice C program, with a reasonable
|
||||
# user interface.
|
||||
|
||||
DT=/etc/disktab # /etc/disktab
|
||||
FSTABDIR=/mnt/etc # /mnt/etc
|
||||
#DONTDOIT=echo
|
||||
ASYNC="-o async"
|
||||
|
||||
FSTAB=${FSTABDIR}/fstab
|
||||
|
||||
getresp() {
|
||||
read resp
|
||||
if [ "X$resp" = "X" ]; then
|
||||
resp=$1
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Welcome to the NetBSD @@VERSION@@ installation program."
|
||||
echo ""
|
||||
echo "This program is designed to help you put NetBSD on your hard disk,"
|
||||
echo "in a simple and rational way. You'll be asked several questions,"
|
||||
echo "and it would probably be useful to have your disk's hardware"
|
||||
echo "manual, the installation notes, and a calculator handy."
|
||||
echo ""
|
||||
echo "In particular, you will need to know some reasonably detailed"
|
||||
echo "information about your disk's geometry, because there is currently"
|
||||
echo "no way this this program can figure that information out."
|
||||
echo ""
|
||||
echo "As with anything which modifies your hard drive's contents, this"
|
||||
echo "program can cause SIGNIFICANT data loss, and you are advised"
|
||||
echo "to make sure your hard drive is backed up before beginning the"
|
||||
echo "installation process."
|
||||
echo ""
|
||||
echo "Default answers are displyed in brackets after the questions."
|
||||
echo "You can hit Control-C at any time to quit, but if you do so at a"
|
||||
echo "prompt, you may have to hit return. Also, quitting in the middle of"
|
||||
echo "installation may leave your system in an inconsistent state."
|
||||
echo ""
|
||||
echo -n "Proceed with installation? [n] "
|
||||
getresp "n"
|
||||
case "$resp" in
|
||||
y*|Y*)
|
||||
echo "Cool! Let's get to it..."
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "OK, then. Enter 'halt' at the prompt to halt the"
|
||||
echo "machine. Once the machine has halted, remove the"
|
||||
echo "floppy and press any key to reboot."
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo "To do the installation, you'll need to provide some information about"
|
||||
echo "your disk."
|
||||
echo ""
|
||||
echo "NetBSD can be installed on ST506, ESDI, IDE, or SCSI disks."
|
||||
echo -n "What kind of disk will you be installing on? [SCSI] "
|
||||
getresp "SCSI"
|
||||
case "$resp" in
|
||||
esdi|ESDI|st506|ST506)
|
||||
drivetype=wd
|
||||
echo -n "Does it support _automatic_ sector remapping? [y] "
|
||||
getresp "y"
|
||||
case "$resp" in
|
||||
n*|N*)
|
||||
sect_fwd="sf:"
|
||||
;;
|
||||
*)
|
||||
sect_fwd=""
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ide|IDE)
|
||||
drivetype=wd
|
||||
sect_fwd=""
|
||||
type=ST506
|
||||
;;
|
||||
scsi|SCSI)
|
||||
drivetype=sd
|
||||
sect_fwd=""
|
||||
type=SCSI
|
||||
;;
|
||||
esac
|
||||
|
||||
# find out what units are possible for that disk, and query the user.
|
||||
driveunits=`ls /dev/${drivetype}?a | sed -e 's,/dev/\(...\)a,\1,g'`
|
||||
if [ "X${driveunits}" = "X" ]; then
|
||||
echo "FATAL ERROR:"
|
||||
echo "No devices for disks of type '${drivetype}'."
|
||||
echo "This is probably a bug in the install disks."
|
||||
echo "Exiting install program."
|
||||
exit
|
||||
fi
|
||||
prefdrive=${drivetype}0
|
||||
|
||||
echo ""
|
||||
echo "The following ${drivetype}-type disks are supported by this"
|
||||
echo "installation procedure:"
|
||||
echo " "${driveunits}
|
||||
echo "Note that they may not exist in _your_ machine; the list of"
|
||||
echo "disks in your machine was printed when the system was booting."
|
||||
echo ""
|
||||
while [ "X${drivename}" = "X" ]; do
|
||||
echo -n "Which disk would like to install on? [${prefdrive}] "
|
||||
getresp ${prefdrive}
|
||||
otherdrives=`echo "${driveunits}" | sed -e s,${resp},,`
|
||||
if [ "X${driveunits}" = "X${otherdrives}" ]; then
|
||||
echo ""
|
||||
echo "\"${resp}\" is an invalid drive name. Valid choices"
|
||||
echo "are: "${driveunits}
|
||||
echo ""
|
||||
else
|
||||
drivename=${resp}
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Using disk ${drivename}."
|
||||
echo ""
|
||||
echo -n "What kind of disk is it? (one word please) [my${drivetype}] "
|
||||
getresp "my${drivetype}"
|
||||
labelname=$resp
|
||||
|
||||
echo ""
|
||||
echo "You will now need to provide some information about your disk's"
|
||||
echo "geometry. This should either be in the User's Manual for your disk,"
|
||||
echo "or you should have written down what NetBSD printed when booting."
|
||||
echo "(Note that he geometry that's printed at boot time is preferred.)"
|
||||
echo ""
|
||||
echo "You may choose to view the initial boot messages for your system"
|
||||
echo "again right now if you like."
|
||||
echo -n "View the boot messages again? [n] "
|
||||
getresp "n"
|
||||
case "$resp" in
|
||||
y*|Y*)
|
||||
more /kern/msgbuf
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo "You will now enter the disk geometry information"
|
||||
echo ""
|
||||
|
||||
echo -n "Number of bytes per disk sector? [512] "
|
||||
getresp 512
|
||||
bytes_per_sect="$resp"
|
||||
|
||||
echo -n "Number of disk cylinders? "
|
||||
getresp
|
||||
cyls_per_disk="$resp"
|
||||
|
||||
echo -n "Number of disk tracks (heads) per disk cylinder? "
|
||||
getresp
|
||||
tracks_per_cyl="$resp"
|
||||
|
||||
echo -n "Number of disk sectors per disk track? "
|
||||
getresp
|
||||
sects_per_track="$resp"
|
||||
|
||||
cylindersize=$(( $sects_per_track * $tracks_per_cyl ))
|
||||
cylbytes=$(( $cylindersize * $bytes_per_sect ))
|
||||
disksize=$(( $cylindersize * $cyls_per_disk ))
|
||||
|
||||
echo ""
|
||||
echo "Your disk has a total of $disksize $bytes_per_sect byte sectors,"
|
||||
echo "arranged as $cyls_per_disk cylinders which contain $cylindersize "
|
||||
echo "sectors ($cylbytes bytes) each."
|
||||
echo ""
|
||||
echo "You can specify partition sizes in cylinders ('c') or sectors ('s')."
|
||||
while [ "X${sizemult}" = "X" ]; do
|
||||
echo -n "What units would you like to use? [cylinders] "
|
||||
getresp cylinders
|
||||
case "$resp" in
|
||||
c*|C*)
|
||||
sizemult=$cylindersize
|
||||
sizeunit="cylinders"
|
||||
;;
|
||||
s*|S*)
|
||||
sizemult=1
|
||||
sizeunit="sectors"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "Enter cylinders ('c') or sectors ('s')."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $sizeunit = "sectors" ]; then
|
||||
echo ""
|
||||
echo "For best disk performance, partitions should begin and end on"
|
||||
echo "cylinder boundaries. Wherever possible, pick sizes that are"
|
||||
echo "multiples of the cylinder size ($cylindersize sectors)."
|
||||
fi
|
||||
|
||||
echo -n ""
|
||||
echo -n "Size of NetBSD portion of disk (in $sizeunit)? "
|
||||
getresp
|
||||
partition=$resp
|
||||
partition_sects=$(( $resp * $sizemult ))
|
||||
part_offset=0
|
||||
if [ $partition_sects -lt $disksize ]; then
|
||||
echo -n "Offset of NetBSD portion of disk (in $sizeunit)? "
|
||||
getresp
|
||||
part_offset=$resp
|
||||
fi
|
||||
badspacesec=0
|
||||
if [ "$sect_fwd" = "sf:" ]; then
|
||||
badspacecyl=$(( $sects_per_track + 126 ))
|
||||
badspacecyl=$(( $badspacecyl + $cylindersize - 1 ))
|
||||
badspacecyl=$(( $badspacecyl / $cylindersize ))
|
||||
badspacesec=$(( $badspacecyl * $cylindersize ))
|
||||
echo ""
|
||||
echo -n "Using $badspacesec sectors ($badspacecyl cylinders) for the "
|
||||
echo "bad144 bad block table"
|
||||
fi
|
||||
|
||||
sects_left=$(( $partition_sects - $badspacesec ))
|
||||
units_left=$(( $sects_left / $sizemult ))
|
||||
echo ""
|
||||
echo "There are $units_left $sizeunit left to allocate."
|
||||
echo ""
|
||||
root=0
|
||||
while [ $root -eq 0 ]; do
|
||||
echo -n "Root partition size (in $sizeunit)? "
|
||||
getresp
|
||||
case $resp in
|
||||
[1-9]*)
|
||||
total=$resp
|
||||
if [ $total -gt $units_left ]; then
|
||||
echo -n "Root size is greater than remaining "
|
||||
echo "free space on disk."
|
||||
else
|
||||
root=$resp
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
root_offset=$part_offset
|
||||
part_used=$(( $root + $badspacesec / $sizemult ))
|
||||
units_left=$(( $partition - $part_used ))
|
||||
echo ""
|
||||
|
||||
swap=0
|
||||
while [ $swap -eq 0 ]; do
|
||||
echo "$units_left $sizeunit remaining in NetBSD portion of disk."
|
||||
echo -n "Swap partition size (in $sizeunit)? "
|
||||
getresp
|
||||
case $resp in
|
||||
[1-9]*)
|
||||
if [ $swap -gt $units_left ]; then
|
||||
echo -n "Swap size is greater than remaining "
|
||||
echo "free space on disk."
|
||||
else
|
||||
swap=$resp
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
swap_offset=$(( $root_offset + $root ))
|
||||
part_used=$(( $part_used + $swap ))
|
||||
echo ""
|
||||
|
||||
fragsize=1024
|
||||
blocksize=8192
|
||||
|
||||
cat /etc/disktab.preinstall > $DT
|
||||
echo "" >> $DT
|
||||
echo "$labelname|NetBSD installation generated:\\" >> $DT
|
||||
echo " :dt=${type}:ty=winchester:\\" >> $DT
|
||||
echo -n " :nc#${cyls_per_disk}:ns#${sects_per_track}" >> $DT
|
||||
echo ":nt#${tracks_per_cyl}:\\" >> $DT
|
||||
echo " :se#${bytes_per_sect}:${sect_fwd}\\" >> $DT
|
||||
_size=$(( $root * $sizemult ))
|
||||
_offset=$(( $root_offset * $sizemult ))
|
||||
echo -n " :pa#${_size}:oa#${_offset}" >> $DT
|
||||
echo ":ta=4.2BSD:ba#${blocksize}:fa#${fragsize}:\\" >> $DT
|
||||
_size=$(( $swap * $sizemult ))
|
||||
_offset=$(( $swap_offset * $sizemult ))
|
||||
echo " :pb#${_size}:ob#${_offset}:tb=swap:\\" >> $DT
|
||||
_size=$(( $partition * $sizemult ))
|
||||
_offset=$(( $part_offset * $sizemult ))
|
||||
echo " :pc#${_size}:oc#${_offset}:\\" >> $DT
|
||||
|
||||
echo "You will now have to enter information about any other partitions"
|
||||
echo "to be created in the NetBSD portion of the disk. This process will"
|
||||
echo "be complete when you've filled up all remaining space in the NetBSD"
|
||||
echo "portion of the disk."
|
||||
|
||||
while [ $part_used -lt $partition ]; do
|
||||
part_size=0
|
||||
units_left=$(( $partition - $part_used ))
|
||||
while [ $part_size -eq 0 ]; do
|
||||
echo ""
|
||||
echo -n "$units_left $sizeunit remaining in NetBSD portion of "
|
||||
echo "the disk"
|
||||
echo -n "Next partition size (in $sizeunit)? "
|
||||
getresp
|
||||
case $resp in
|
||||
[1-9]*)
|
||||
total=$(( $part_used + $resp ))
|
||||
if [ $total -gt $partition ]; then
|
||||
echo -n "That would make the parition"
|
||||
echo "too large to fit!"
|
||||
else
|
||||
part_size=$resp
|
||||
part_used=$total
|
||||
part_name=""
|
||||
while [ "$part_name" = "" ]; do
|
||||
echo -n "Mount point? "
|
||||
getresp
|
||||
part_name=$resp
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ "$ename" = "" ]; then
|
||||
ename=$part_name
|
||||
offset=$(( $part_offset + $root + $swap ))
|
||||
_size=$(( $part_size * $sizemult ))
|
||||
_offset=$(( $offset * $sizemult ))
|
||||
echo -n " :pe#${_size}:oe#${_offset}" >> $DT
|
||||
echo ":te=4.2BSD:be#${blocksize}:fe#${fragsize}:\\" >> $DT
|
||||
offset=$(( $offset + $part_size ))
|
||||
elif [ "$fname" = "" ]; then
|
||||
fname=$part_name
|
||||
_size=$(( $part_size * $sizemult ))
|
||||
_offset=$(( $offset * $sizemult ))
|
||||
echo -n " :pf#${_size}:of#${_offset}" >> $DT
|
||||
echo ":tf=4.2BSD:bf#${blocksize}:ff#${fragsize}:\\" >> $DT
|
||||
offset=$(( $offset + $part_size ))
|
||||
elif [ "$gname" = "" ]; then
|
||||
gname=$part_name
|
||||
_size=$(( $part_size * $sizemult ))
|
||||
_offset=$(( $offset * $sizemult ))
|
||||
echo -n " :pg#${_size}:og#${_offset}" >> $DT
|
||||
echo ":tg=4.2BSD:bg#${blocksize}:fg#${fragsize}:\\" >> $DT
|
||||
offset=$(( $offset + $part_size ))
|
||||
elif [ "$hname" = "" ]; then
|
||||
hname=$part_name
|
||||
_size=$(( $part_size * $sizemult ))
|
||||
_offset=$(( $offset * $sizemult ))
|
||||
echo -n " :ph#${_size}:oh#${_offset}" >> $DT
|
||||
echo ":th=4.2BSD:bh#${blocksize}:fh#${fragsize}:\\" >> $DT
|
||||
part_used=$partition
|
||||
fi
|
||||
done
|
||||
echo " :pd#${disksize}:od#0:" >> $DT
|
||||
sync
|
||||
|
||||
echo ""
|
||||
echo "THIS IS YOUR LAST CHANCE!!!"
|
||||
echo ""
|
||||
echo -n "Are you SURE you want NetBSD installed on your hard drive? (yes/no) "
|
||||
answer=""
|
||||
while [ "$answer" = "" ]; do
|
||||
getresp
|
||||
case $resp in
|
||||
yes|YES)
|
||||
echo ""
|
||||
echo "Here we go..."
|
||||
answer=yes
|
||||
;;
|
||||
no|NO)
|
||||
echo ""
|
||||
echo -n "OK, then. enter 'halt' to halt the machine. "
|
||||
echo "Once the machine has halted,"
|
||||
echo -n "remove the floppy, and press any key to "
|
||||
echo "reboot."
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
echo -n "I want a yes or no answer... well? "
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo -n "Labeling disk $drivename..."
|
||||
$DONTDOIT disklabel -w -r $drivename $labelname
|
||||
echo " done."
|
||||
|
||||
if [ "$sect_fwd" = "sf:" ]; then
|
||||
echo -n "Initializing bad144 badblock table..."
|
||||
$DONTDOIT bad144 $drivename 0
|
||||
echo " done."
|
||||
fi
|
||||
|
||||
echo "Initializing root filesystem, and mounting..."
|
||||
$DONTDOIT newfs /dev/r${drivename}a $name
|
||||
$DONTDOIT mount -v $ASYNC /dev/${drivename}a /mnt
|
||||
if [ "$ename" != "" ]; then
|
||||
echo ""
|
||||
echo "Initializing $ename filesystem, and mounting..."
|
||||
$DONTDOIT newfs /dev/r${drivename}e $name
|
||||
$DONTDOIT mkdir -p /mnt/$ename
|
||||
$DONTDOIT mount -v $ASYNC /dev/${drivename}e /mnt/$ename
|
||||
fi
|
||||
if [ "$fname" != "" ]; then
|
||||
echo ""
|
||||
echo "Initializing $fname filesystem, and mounting..."
|
||||
$DONTDOIT newfs /dev/r${drivename}f $name
|
||||
$DONTDOIT mkdir -p /mnt/$fname
|
||||
$DONTDOIT mount -v $ASYNC /dev/${drivename}f /mnt/$fname
|
||||
fi
|
||||
if [ "$gname" != "" ]; then
|
||||
echo ""
|
||||
echo "Initializing $gname filesystem, and mounting..."
|
||||
$DONTDOIT newfs /dev/r${drivename}g $name
|
||||
$DONTDOIT mkdir -p /mnt/$gname
|
||||
$DONTDOIT mount -v $ASYNC /dev/${drivename}g /mnt/$gname
|
||||
fi
|
||||
if [ "$hname" != "" ]; then
|
||||
echo ""
|
||||
echo "Initializing $hname filesystem, and mounting..."
|
||||
$DONTDOIT newfs /dev/r${drivename}h $name
|
||||
$DONTDOIT mkdir -p /mnt/$hname
|
||||
$DONTDOIT mount -v $ASYNC /dev/${drivename}h /mnt/$hname
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Populating filesystems with bootstrapping binaries and config files"
|
||||
$DONTDOIT pax -Xrwpe . /mnt
|
||||
$DONTDOIT cp /tmp/.hdprofile /mnt/.profile
|
||||
|
||||
echo ""
|
||||
echo -n "Creating an fstab..."
|
||||
echo /dev/${drivename}a / ffs rw 1 1 | sed -e s,//,/, > $FSTAB
|
||||
echo /dev/${drivename}b none swap sw 0 0 | sed -e s,//,/, >> $FSTAB
|
||||
if [ "$ename" != "" ]; then
|
||||
echo /dev/${drivename}e /$ename ffs rw 1 2 | sed -e s,//,/, >> $FSTAB
|
||||
fi
|
||||
if [ "$fname" != "" ]; then
|
||||
echo /dev/${drivename}f /$fname ffs rw 1 3 | sed -e s,//,/, >> $FSTAB
|
||||
fi
|
||||
if [ "$gname" != "" ]; then
|
||||
echo /dev/${drivename}g /$gname ffs rw 1 4 | sed -e s,//,/, >> $FSTAB
|
||||
fi
|
||||
if [ "$hname" != "" ]; then
|
||||
echo /dev/${drivename}h /$hname ffs rw 1 5 | sed -e s,//,/, >> $FSTAB
|
||||
fi
|
||||
sync
|
||||
echo " done."
|
||||
|
||||
echo ""
|
||||
echo -n "Installing boot blocks on $drivename..."
|
||||
# shouldn't be needed, but...
|
||||
$DONTDOIT rm -f /mnt/boot
|
||||
$DONTDOIT /usr/mdec/installboot /usr/mdec/biosboot.sym /dev/r${drivename}a
|
||||
echo " done."
|
||||
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "OK! The preliminary work of setting up your disk is now complete."
|
||||
echo ""
|
||||
echo "The remaining tasks are:"
|
||||
echo ""
|
||||
echo "To load and install the NetBSD distribution sets."
|
||||
echo "Currently the hard drive's root filesystem is mounted on /mnt"
|
||||
echo ""
|
||||
echo "To copy a NetBSD kernel to the hard drive's root filesystem."
|
||||
echo "Once accomplished, you can boot off the hard drive."
|
||||
echo ""
|
||||
echo "Consult the installation notes which will describe how to"
|
||||
echo "install the distribution sets and kernel. Post-installation"
|
||||
echo "configuration is also discussed therein."
|
||||
echo ""
|
||||
echo "GOOD LUCK!"
|
||||
echo ""
|
@ -1,121 +0,0 @@
|
||||
# $NetBSD: list,v 1.32 2000/09/19 20:35:51 christos Exp $
|
||||
|
||||
# copy the crunched binary, link to it, and kill it
|
||||
COPY ${OBJDIR}/ramdiskbin ramdiskbin
|
||||
LINK ramdiskbin sysinst
|
||||
LINK ramdiskbin bin/cat
|
||||
LINK ramdiskbin bin/chio
|
||||
LINK ramdiskbin bin/chmod
|
||||
LINK ramdiskbin bin/cp
|
||||
LINK ramdiskbin bin/dd
|
||||
LINK ramdiskbin bin/df
|
||||
LINK ramdiskbin bin/ed
|
||||
LINK ramdiskbin bin/ln
|
||||
LINK ramdiskbin bin/ls
|
||||
LINK ramdiskbin bin/mkdir
|
||||
LINK ramdiskbin bin/mt
|
||||
LINK ramdiskbin bin/mv
|
||||
LINK ramdiskbin bin/pax
|
||||
LINK ramdiskbin bin/pwd
|
||||
LINK ramdiskbin bin/rcmd
|
||||
LINK ramdiskbin bin/rm
|
||||
LINK ramdiskbin bin/sh
|
||||
LINK ramdiskbin bin/stty
|
||||
LINK ramdiskbin bin/sync
|
||||
LINK ramdiskbin bin/test
|
||||
LINK ramdiskbin bin/[
|
||||
LINK ramdiskbin sbin/cd9660
|
||||
LINK ramdiskbin sbin/dhclient
|
||||
LINK ramdiskbin sbin/disklabel
|
||||
LINK ramdiskbin sbin/fdisk
|
||||
LINK ramdiskbin sbin/ffs
|
||||
LINK ramdiskbin sbin/fsck
|
||||
LINK ramdiskbin sbin/fsck_ffs
|
||||
LINK ramdiskbin sbin/halt
|
||||
LINK ramdiskbin sbin/ifconfig
|
||||
LINK ramdiskbin sbin/init
|
||||
LINK ramdiskbin sbin/kernfs
|
||||
LINK ramdiskbin sbin/mbrlabel
|
||||
LINK ramdiskbin sbin/mknod
|
||||
LINK ramdiskbin sbin/mount
|
||||
LINK ramdiskbin sbin/mount_cd9660
|
||||
LINK ramdiskbin sbin/mount_ext2fs
|
||||
LINK ramdiskbin sbin/mount_ffs
|
||||
LINK ramdiskbin sbin/mount_kernfs
|
||||
LINK ramdiskbin sbin/mount_msdos
|
||||
LINK ramdiskbin sbin/mount_nfs
|
||||
LINK ramdiskbin sbin/mount_ntfs
|
||||
LINK ramdiskbin sbin/msdos
|
||||
LINK ramdiskbin sbin/newfs
|
||||
LINK ramdiskbin sbin/nfs
|
||||
LINK ramdiskbin sbin/ntfs
|
||||
LINK ramdiskbin sbin/ping
|
||||
LINK ramdiskbin sbin/ping6
|
||||
LINK ramdiskbin sbin/reboot
|
||||
LINK ramdiskbin sbin/restore
|
||||
LINK ramdiskbin sbin/route
|
||||
LINK ramdiskbin sbin/rtsol
|
||||
LINK ramdiskbin sbin/scsictl
|
||||
LINK ramdiskbin sbin/shutdown
|
||||
LINK ramdiskbin sbin/slattach
|
||||
LINK ramdiskbin sbin/swapctl
|
||||
LINK ramdiskbin sbin/umount
|
||||
SYMLINK /bin/cat usr/bin/chgrp
|
||||
SYMLINK /bin/cat usr/bin/ftp
|
||||
SYMLINK /bin/cat usr/bin/gunzip
|
||||
SYMLINK /bin/cat usr/bin/gzcat
|
||||
SYMLINK /bin/cat usr/bin/gzip
|
||||
SYMLINK /bin/cat usr/bin/less
|
||||
SYMLINK /bin/cat usr/bin/more
|
||||
SYMLINK /bin/cat usr/bin/sed
|
||||
SYMLINK /bin/cat usr/bin/tar
|
||||
SYMLINK /bin/cat usr/bin/tip
|
||||
SYMLINK /bin/cat usr/mdec/installboot
|
||||
SYMLINK /bin/cat usr/sbin/bad144
|
||||
SYMLINK /bin/cat usr/sbin/chown
|
||||
SYMLINK /bin/cat usr/sbin/chroot
|
||||
SYMLINK /bin/cat usr/sbin/wiconfig
|
||||
SPECIAL /bin/rm ramdiskbin
|
||||
|
||||
# various files that we need in /etc for the install
|
||||
COPY ${CURDIR}/../../../../etc/group etc/group
|
||||
COPY ${CURDIR}/../../../../etc/master.passwd etc/master.passwd
|
||||
COPY ${CURDIR}/../../../../etc/protocols etc/protocols
|
||||
COPY ${CURDIR}/../../../../etc/netconfig etc/netconfig
|
||||
COPY ${CURDIR}/../../../../etc/services etc/services
|
||||
COPY ${CURDIR}/../../../../usr.sbin/dhcp/client/scripts/netbsd etc/dhclient-script
|
||||
|
||||
SPECIAL pwd_mkdb -p -d ./ etc/master.passwd
|
||||
SPECIAL /bin/rm etc/spwd.db
|
||||
SPECIAL /bin/rm etc/pwd.db
|
||||
|
||||
# copy the MAKEDEV script and make some devices
|
||||
COPY ${CURDIR}/../../../../etc/etc.i386/MAKEDEV dev/MAKEDEV
|
||||
SPECIAL cd dev; sh MAKEDEV ramdisk bpf0 bpf1
|
||||
SPECIAL /bin/rm dev/MAKEDEV
|
||||
|
||||
# we need the boot block in /usr/mdec + the MBR copy
|
||||
COPY ${DESTDIR}/usr/mdec/biosboot.sym usr/mdec/biosboot.sym
|
||||
COPY ${DESTDIR}/usr/mdec/mbr usr/mdec/mbr
|
||||
COPY ${DESTDIR}/usr/mdec/mbr_bootsel usr/mdec/mbr_bootsel
|
||||
|
||||
# and the common installation tools
|
||||
# COPY ${CURDIR}/../../../utils/script-installer/dot.commonutils .commonutils
|
||||
# COPY ${CURDIR}/../../../utils/script-installer/dot.instutils .instutils
|
||||
COPY ${CURDIR}/termcap.mini usr/share/misc/termcap
|
||||
|
||||
# the disktab explanation file
|
||||
COPY ${CURDIR}/disktab.preinstall etc/disktab.preinstall
|
||||
|
||||
#the lists of obsolete files used by sysinst
|
||||
SPECIAL sh ${CURDIR}/../../../../distrib/sets/makeobsolete -b -s ${CURDIR}/../../../../distrib/sets -t ./dist
|
||||
|
||||
# and the installation tools
|
||||
COPY ${CURDIR}/dot.profile .profile
|
||||
# COPY ${OBJDIR}/install.sh install
|
||||
# COPY ${OBJDIR}/upgrade.sh upgrade
|
||||
# COPY ${OBJDIR}/start.sh start
|
||||
COPY ${CURDIR}/dot.hdprofile tmp/.hdprofile
|
||||
# SPECIAL chmod 755 install
|
||||
# SPECIAL chmod 755 upgrade
|
||||
# SPECIAL chmod 755 start
|
@ -1,100 +0,0 @@
|
||||
# $NetBSD: mtree.conf,v 1.3 2000/06/18 23:57:32 cyber Exp $
|
||||
|
||||
/set type=dir uname=root gname=wheel mode=0755
|
||||
# .
|
||||
.
|
||||
|
||||
# ./bin
|
||||
bin
|
||||
# ./bin
|
||||
..
|
||||
|
||||
# ./dev
|
||||
dev
|
||||
# ./dev
|
||||
..
|
||||
|
||||
# ./dist
|
||||
dist
|
||||
# ./dist
|
||||
..
|
||||
|
||||
# ./etc
|
||||
etc
|
||||
# ./etc
|
||||
..
|
||||
|
||||
# ./mnt
|
||||
mnt
|
||||
# ./mnt
|
||||
..
|
||||
|
||||
# ./mnt2
|
||||
mnt2
|
||||
# ./mnt2
|
||||
..
|
||||
|
||||
# ./kern
|
||||
kern
|
||||
# ./kern
|
||||
..
|
||||
|
||||
# ./sbin
|
||||
sbin
|
||||
# ./sbin
|
||||
..
|
||||
|
||||
# ./tmp
|
||||
tmp mode=01777
|
||||
# ./tmp
|
||||
..
|
||||
|
||||
# ./usr
|
||||
usr
|
||||
|
||||
# ./usr/bin
|
||||
bin
|
||||
# ./usr/bin
|
||||
..
|
||||
|
||||
# ./usr/mdec
|
||||
mdec
|
||||
# ./usr/mdec
|
||||
..
|
||||
|
||||
# ./usr/sbin
|
||||
sbin
|
||||
# ./usr/sbin
|
||||
..
|
||||
|
||||
# ./usr/share
|
||||
share
|
||||
|
||||
# ./usr/share/misc
|
||||
misc
|
||||
# ./usr/share/misc
|
||||
..
|
||||
|
||||
# ./usr/share
|
||||
..
|
||||
|
||||
# ./usr
|
||||
..
|
||||
|
||||
# ./var
|
||||
var
|
||||
# ./var/db
|
||||
db
|
||||
# ./var/db
|
||||
..
|
||||
# ./var
|
||||
run
|
||||
# ./var/run
|
||||
..
|
||||
# ./var/log
|
||||
log
|
||||
# ./var/log
|
||||
..
|
||||
# ./var
|
||||
..
|
||||
|
@ -1,51 +0,0 @@
|
||||
# $NetBSD: ramdiskbin.conf,v 1.26 2000/09/18 11:56:09 darrenr Exp $
|
||||
#
|
||||
# ramdiskbin.conf - unified binary for the install ramdisk
|
||||
#
|
||||
|
||||
srcdirs bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin sys/arch/i386/stand
|
||||
|
||||
progs bad144 cat chio chmod chown chroot cp dd df disklabel ed
|
||||
progs fsck fsck_ffs ftp gzip ifconfig wiconfig init installboot less
|
||||
progs ln ls mkdir mknod
|
||||
progs mount mount_cd9660 mount_ext2fs mount_ffs mount_msdos mount_ntfs
|
||||
progs mount_nfs mount_kernfs mt mv newfs ping pwd rcmd reboot rm
|
||||
progs route scsictl sed sh shutdown slattach stty swapctl sync test
|
||||
progs tip umount
|
||||
progs sysinst pax
|
||||
progs fdisk mbrlabel
|
||||
progs ping6 rtsol
|
||||
progs dhclient
|
||||
|
||||
special sysinst srcdir distrib/utils/sysinst/arch/i386
|
||||
special init srcdir distrib/utils/init_s
|
||||
|
||||
special dd srcdir distrib/utils/x_dd
|
||||
special ftp srcdir distrib/utils/x_ftp
|
||||
special ifconfig srcdir distrib/utils/x_ifconfig
|
||||
special route srcdir distrib/utils/x_route
|
||||
special sh srcdir distrib/utils/x_sh
|
||||
special ping srcdir distrib/utils/x_ping
|
||||
special ping6 srcdir distrib/utils/x_ping6
|
||||
special dhclient srcdir distrib/utils/x_dhclient
|
||||
special dhclient objs OMalloc.o clparse.o dns.o hash.o options.o socket.o OMdispatch.o conflex.o dst_api.o hmac_link.o packet.o support.o OMsupport.o connection.o errwarn.o inet.o parse.o tables.o alloc.o convert.o ethernet.o listener.o prandom.o tree.o base64.o dhclient.o execute.o memory.o print.o bpf.o discover.o generic.o message.o protocol.o buffer.o dispatch.o handle.o comapi.o result.o fddi.o auth.o
|
||||
|
||||
# "special" gzip is actually larger assuming nothing else uses -lz..
|
||||
#special gzip srcdir distrib/utils/x_gzip
|
||||
|
||||
ln pax tar
|
||||
ln chown chgrp
|
||||
ln gzip gzcat gunzip
|
||||
ln less more
|
||||
ln sh -sh # init invokes the shell this way
|
||||
ln test [
|
||||
ln mount_cd9660 cd9660
|
||||
ln mount_ffs ffs
|
||||
ln mount_msdos msdos
|
||||
ln mount_nfs nfs
|
||||
ln mount_kernfs kernfs
|
||||
ln mount_ntfs ntfs
|
||||
ln reboot halt
|
||||
|
||||
# libhack.o is built by Makefile & included Makefile.inc
|
||||
libs libhack.o -lbz2 -ledit -lutil -lcurses -ltermcap -lrmt -lcrypt -ll -lm
|
@ -1,49 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $NetBSD: start.tmpl,v 1.3 1998/01/09 08:03:20 perry Exp $
|
||||
|
||||
again="true"
|
||||
|
||||
echo "Welcome to the NetBSD @@VERSION@@ installation floppy."
|
||||
echo
|
||||
|
||||
while [ $again = "true" ]; do
|
||||
|
||||
echo 'enter "sysinst" to run the new system install program,'
|
||||
echo ' "install" to install NetBSD,'
|
||||
echo ' "upgrade" to upgrade an existing NetBSD system,'
|
||||
echo ' or "shell" for a shell prompt.'
|
||||
echo
|
||||
echo -n "your choice? "
|
||||
read resp
|
||||
|
||||
case "$resp" in
|
||||
sysinst|install|upgrade|shell)
|
||||
again="false"
|
||||
;;
|
||||
"")
|
||||
echo
|
||||
;;
|
||||
*)
|
||||
echo "Sorry, $resp isn't valid."
|
||||
echo
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "$resp" in
|
||||
sysinst)
|
||||
sysinst
|
||||
;;
|
||||
install)
|
||||
install
|
||||
;;
|
||||
upgrade)
|
||||
upgrade
|
||||
;;
|
||||
shell)
|
||||
echo 'If you want to run install or upgrade later,'
|
||||
echo 'simply type "install" or "upgrade" to the shell.'
|
||||
echo 'good luck!'
|
||||
;;
|
||||
esac
|
@ -1,61 +0,0 @@
|
||||
# $NetBSD: termcap.mini,v 1.2 1999/03/13 09:03:28 itohy Exp $
|
||||
#
|
||||
# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed by the University of
|
||||
# California, Berkeley and its contributors.
|
||||
# 4. Neither the name of the University nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# @(#)termcap.src 5.109 (Berkeley) 3/8/93
|
||||
#
|
||||
pc3|ibmpc3|IBM PC 386BSD Console:\
|
||||
:DO=\E[%dB:K1=\E[H:K2=\E[E:K3=\E[I:K4=\E[F:K5=\E[G:LE=\E[%dD:\
|
||||
:RI=\E[%dC:UP=\E[%dA:am:bl=^G:bs:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
|
||||
:cm=\E[%i%d;%dH:co#80:cr=^M:do=^J:ho=\E[H:is=\E[m:k0=\E[V:k1=\E[M:\
|
||||
:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:k9=\E[U:\
|
||||
:kD=\177:kH=\E[F:kN=\E[G:kP=\E[I:kb=\177:kd=\E[B:kh=\E[H:kl=\E[D:\
|
||||
:kr=\E[C:ku=\E[A:le=^H:li#25:ms:nd=\E[C:rs=\E[m\E[x\E[14r:se=\E[m:\
|
||||
:sf=\E[S:so=\E[7m:sr=\E[T:ta=^I:te=\E[m:ti=\E[m:up=\E[A:km:pt:\
|
||||
:AL=\E[%dL:DL=\E[%dM:SF=\E[%dS:SR=\E[%dT:al=\E[L:dl=\E[M:
|
||||
|
||||
vt100|vt100-am|dec vt100 (w/advanced video):\
|
||||
:am:bs:ms:xn:xo:\
|
||||
:co#80:it#8:li#24:vt#3:\
|
||||
:@8=\EOM:DO=\E[%dB:K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:\
|
||||
:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:UP=\E[%dA:\
|
||||
:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
|
||||
:ae=\E(B:as=\E(0:bl=^G:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
|
||||
:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:do=^J:\
|
||||
:eA=\E(B:ho=\E[H:k0=\EOy:k1=\EOP:k2=\EOQ:k3=\EOR:\
|
||||
:k4=\EOS:k5=\EOt:k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:k;=\EOx:\
|
||||
:kb=^H:kd=\EOB:ke=\E[?1l\E>:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\
|
||||
:ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[m\017:mr=\E[7m:\
|
||||
:nd=\E[C:r2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:rc=\E8:\
|
||||
:..sa=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;:\
|
||||
:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:ue=\E[m:\
|
||||
:up=\E[A:us=\E[4m:
|
@ -1,257 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: upgrade.tmpl,v 1.5 2000/06/14 22:52:44 cgd Exp $
|
||||
#
|
||||
# Copyright (c) 1997 Perry E. Metzger
|
||||
# Copyright (c) 1994 Christopher G. Demetriou
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All advertising materials mentioning features or use of this software
|
||||
# must display the following acknowledgement:
|
||||
# This product includes software developed for the
|
||||
# NetBSD Project. See http://www.netbsd.org/ for
|
||||
# information about NetBSD.
|
||||
# 4. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||
|
||||
# NetBSD upgrade script.
|
||||
# In a perfect world, this would be a nice C program, with a reasonable
|
||||
# user interface.
|
||||
|
||||
DT=/etc/disktab # /etc/disktab
|
||||
FSTABDIR=/mnt/etc # /mnt/etc
|
||||
#DONTDOIT=echo
|
||||
UARGS="-c 2"
|
||||
|
||||
FSTAB=${FSTABDIR}/fstab
|
||||
|
||||
getresp() {
|
||||
read resp
|
||||
if [ "X$resp" = "X" ]; then
|
||||
resp=$1
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Welcome to the NetBSD @@VERSION@@ upgrade program."
|
||||
echo ""
|
||||
echo "This program is designed to help you put the new version of NetBSD"
|
||||
echo "on your hard disk, in a simple and rational way. To upgrade, you"
|
||||
echo "must have plenty of free space on all partitions which will be"
|
||||
echo "upgraded. If you have at least 1MB free on your root partition,"
|
||||
echo "and several free on your /usr patition, you should be fine."
|
||||
echo ""
|
||||
echo "As with anything which modifies your hard drive's contents, this"
|
||||
echo "program can cause SIGNIFICANT data loss, and you are advised"
|
||||
echo "to make sure your hard drive is backed up before beginning the"
|
||||
echo "upgrade process."
|
||||
echo ""
|
||||
echo "Default answers are displyed in brackets after the questions."
|
||||
echo "You can hit Control-C at any time to quit, but if you do so at a"
|
||||
echo "prompt, you may have to hit return. Also, quitting in the middle of"
|
||||
echo "the upgrade may leave your system in an inconsistent (and unusable)"
|
||||
echo "state."
|
||||
echo ""
|
||||
echo -n "Proceed with upgrade? [n] "
|
||||
getresp "n"
|
||||
case "$resp" in
|
||||
y*|Y*)
|
||||
echo "Cool! Let's get to it..."
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "OK, then. Enter 'halt' at the prompt to halt the"
|
||||
echo "machine. Once the machine has halted, remove the"
|
||||
echo "floppy and press any key to reboot."
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
# find out what units are possible, and query the user.
|
||||
driveunits=`ls /dev/[sw]d?a | sed -e 's,/dev/\(...\)a,\1,g'`
|
||||
if [ "X${driveunits}" = "X" ]; then
|
||||
echo "FATAL ERROR:"
|
||||
echo "No disk devices."
|
||||
echo "This is probably a bug in the install disks."
|
||||
echo "Exiting install program."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "The following disks are supported by this upgrade procedure:"
|
||||
echo " "${driveunits}
|
||||
echo "If your system was previously completely contained within the"
|
||||
echo "disks listed above (i.e. if your system didn't occupy any space"
|
||||
echo "on disks NOT listed above), this upgrade disk can upgrade your"
|
||||
echo "system. If it cannot, hit Control-C at the prompt."
|
||||
echo ""
|
||||
while [ "X${drivename}" = "X" ]; do
|
||||
echo -n "Which disk contains your root partition? "
|
||||
getresp
|
||||
otherdrives=`echo "${driveunits}" | sed -e s,${resp},,`
|
||||
if [ "X${driveunits}" = "X${otherdrives}" ]; then
|
||||
echo ""
|
||||
echo "\"${resp}\" is an invalid drive name. Valid choices"
|
||||
echo "are: "${driveunits}
|
||||
echo ""
|
||||
else
|
||||
drivename=${resp}
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Root partition is on ${drivename}a."
|
||||
|
||||
echo ""
|
||||
echo "If (and only if!) you are upgrading from NetBSD 0.9 or below,"
|
||||
echo "you should upgrade to the new file system format. Do not answer"
|
||||
echo "yes if you are upgrading from NetBSD 1.0 or above."
|
||||
echo "Would you like to upgrade your file systems to the new file system"
|
||||
echo -n "format? [y] "
|
||||
getresp "y"
|
||||
case "$resp" in
|
||||
n*|N*)
|
||||
echo ""
|
||||
echo "If you are upgrading from NetBSD 0.9 or below,"
|
||||
echo "you should upgrade your file systems with 'fsck -c 2'"
|
||||
echo "as soon as is feasible, because the new file system"
|
||||
echo "code is better-tested and more performant."
|
||||
upgrargs=""
|
||||
upgradefs=NO
|
||||
;;
|
||||
*)
|
||||
upgrargs=$UARGS
|
||||
upgradefs=YES
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ $upgradefs = YES ]; then
|
||||
echo ""
|
||||
echo "your file systems will be upgraded while they are checked"
|
||||
fi
|
||||
|
||||
echo "checking the file system on ${drivename}a..."
|
||||
|
||||
fsck -f -p $upgrargs /dev/r${drivename}a
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: FILE SYSTEM UPGRADE FAILED."
|
||||
echo "You should probably reboot the machine, fsck your"
|
||||
echo "disk(s), and try the upgrade procedure again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Mounting root partition on /mnt..."
|
||||
mount /dev/${drivename}a /mnt
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: MOUNT FAILED."
|
||||
echo "You should verify that your system is set up as you"
|
||||
echo "described, and re-attempt the upgrade procedure."
|
||||
exit 1
|
||||
fi
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo -n "Copying new fsck binary to your hard disk..."
|
||||
if [ ! -d /mnt/sbin ]; then
|
||||
mkdir /mnt/sbin
|
||||
fi
|
||||
cp /sbin/fsck /mnt/sbin/fsck
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: COPY FAILED."
|
||||
echo "It in unclear why this error would occur. It looks"
|
||||
echo "like you may end up having to upgrade by hand."
|
||||
exit 1
|
||||
fi
|
||||
echo " Done."
|
||||
|
||||
echo ""
|
||||
echo "Re-mounting root partition read-only..."
|
||||
mount -u -o ro /dev/${drivename}a /mnt
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: RE-MOUNT FAILED."
|
||||
echo "It in unclear why this error would occur. It looks"
|
||||
echo "like you may end up having to upgrade by hand."
|
||||
exit 1
|
||||
fi
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo "checking the rest of your file systems..."
|
||||
chroot /mnt fsck -f -p $upgrargs
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: FILE SYSTEM UPGRADE(S) FAILED."
|
||||
echo "You should probably reboot the machine, fsck your"
|
||||
echo "file system(s), and try the upgrade procedure"
|
||||
echo "again."
|
||||
exit 1
|
||||
fi
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo "Re-mounting root partition read-write..."
|
||||
mount -u -o rw /dev/${drivename}a /mnt
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: RE-MOUNT FAILED."
|
||||
echo "It in unclear why this error would occur. It looks"
|
||||
echo "like you may end up having to upgrade by hand."
|
||||
exit 1
|
||||
fi
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo "Updating boot blocks on ${drivename}..."
|
||||
# shouldn't be needed, but...
|
||||
$DONTDOIT rm -f /mnt/boot
|
||||
$DONTDOIT /usr/mdec/installboot /usr/mdec/biosboot.sym /dev/r${drivename}a
|
||||
if [ $? != 0 ]; then
|
||||
echo "FATAL ERROR: UPDATE OF DISK LABEL FAILED."
|
||||
echo "It in unclear why this error would occur. It looks"
|
||||
echo "like you may end up having to upgrade by hand."
|
||||
exit 1
|
||||
fi
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo "Copying bootstrapping binaries and config files to the hard drive..."
|
||||
$DONTDOIT cp /mnt/.profile /mnt/.profile.bak
|
||||
$DONTDOIT pax -s '#^\./etc/.*##' -Xrwpe . /mnt
|
||||
$DONTDOIT mv /mnt/etc/rc /mnt/etc/rc.bak
|
||||
$DONTDOIT cp /tmp/.hdprofile /mnt/.profile
|
||||
|
||||
echo ""
|
||||
echo "Mounting remaining partitions..."
|
||||
chroot /mnt mount -at ffs > /dev/null 2>&1
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "OK! The preliminary work of setting up your disk is now complete,"
|
||||
echo "and you can now upgrade the actual NetBSD software."
|
||||
echo ""
|
||||
echo "Right now, your hard disk is mounted on /mnt. You should consult"
|
||||
echo "the installation notes to determine how to load and install the new"
|
||||
echo "NetBSD distribution sets, and how to clean up after the upgrade"
|
||||
echo "software, when you are done."
|
||||
echo ""
|
||||
echo "GOOD LUCK!"
|
||||
echo ""
|
Loading…
Reference in New Issue
Block a user