-$OpenBSD: README.files,v 1.3 1996/04/25 21:27:17 niklas Exp $
-$NetBSD: README.files,v 1.3 1995/12/21 02:40:49 cgd Exp $
+$NetBSD: README.files,v 1.4.4.2 1996/06/13 20:52:44 cgd Exp $
README.files This list.
-Snapshots are organized by release, numbered by year, month, and date, in
-directories with names of the form "YYMMDD".
+ported-software A list of software ported to NetBSD/Alpha,
+ and patches to make software go.
+
+Snapshots are organized by release. Releases are numbered by year, month,
+and day, in directories with names of the form "YYMMDD".
In each directory:
README_FIRST Important last-minute notes about the snapshot.
-README Installation notes; probably incomplete.
-STATUS Status of OpenBSD/Alpha.
+README Installation notes; incomplete.
+STATUS Status of NetBSD/Alpha, supported hardware list.
TODO.users Things that I think users could do to help out.
bin/ Directory with binaries for this snapshot.
bin.tar.gz Everything on the disk image except /etc,
/usr/X11R6, /boot, and the kernel.
etc.tar.gz /etc from the disk image.
- bsd.gz Gzipped GENERIC kernel (also on disk image).
- bsd.gdb.gz Gzipped GENERIC kernel w/debugging symbols.
- bsd_nfs.gz Gzipped GENERIC_NFS kernel.
- bsd_nfs.gdb.gz Gzipped GENERIC_NFS kernel w/debugging symbols.
+ netbsd.gz Gzipped GENERIC kernel (also on disk image).
+ netbsd.gdb.gz Gzipped GENERIC kernel w/debugging symbols.
rz25-image.gz Disk image, of an RZ25, for installation.
x11.tar.gz /usr/X11R6 from the disk image.
X11R6-XF86-3.1.2-diffs.gz
Diffs from XFree86 3.1.2 used to make the
X11 binaries in the distribution.
+ X11 sources should be placed in
+ /usr/alphasrc/xc.
cygnus.tar.gz Toolchain (gcc, gas, ld, etc.) sources
used to build the compiler toolchain.
- sys.tar.gz Kernel sources.
- userland-diffs.gz Diffs from the OpenBSD-current user-land
- sources used to build the distribution.
+ Should be untarred into /usr/alphasrc/cygnus.
-# $OpenBSD: Makefile,v 1.4 1996/04/25 21:27:25 niklas Exp $
-# $NetBSD: Makefile,v 1.12 1995/12/21 14:22:25 cgd Exp $
+# $NetBSD: Makefile,v 1.13.4.2 1996/06/15 04:02:42 cgd Exp $
# Make a distribution for the alpha, on a spare disk.
# This creates a large, gzipped disk image in ${.OBJDIR}
build-fs:
cd ${.CURDIR}/../../../etc && make distribution
- cd ${.CURDIR}/../../../cygnus && \
- make prefix=${DESTDIR}/usr/local install
- cd ${.CURDIR}/../../../xc && make install install.man
- cp ${.CURDIR}/../../../sys/arch/alpha/compile/GENERIC/bsd ${DESTDIR}
+ if [ -d /usr/alphasrc/cygnus ]; then \
+ cd /usr/alphasrc/cygnus && \
+ make prefix=${DESTDIR}/usr/local install; \
+ else \
+ true; \
+ fi
+ if [ -d /usr/alphasrc/xc ]; then \
+ cd /usr/alphasrc/xc && make install install.man; \
+ else \
+ true; \
+ fi
+ cp ${.CURDIR}/../../../sys/arch/alpha/compile/GENERIC/netbsd ${DESTDIR}
ln -s gcc ${DESTDIR}/usr/local/bin/cc
- ln -s \
- ../local/lib/gcc-lib/alpha-unknown-netbsd1.1A./2.7-95q4/cpp \
- ${DESTDIR}/usr/libexec
+ (cd ${DESTDIR}/usr/libexec && ln -s \
+ ../local/lib/gcc-lib/alpha-unknown-netbsd*/*/cpp .)
ln -s ../local/bin/ar ${DESTDIR}/usr/bin
ln -s ../local/bin/as ${DESTDIR}/usr/bin
ln -s ../local/bin/cc ${DESTDIR}/usr/bin
fsck /dev/r${DESTDISK}a /dev/r${DESTDISK}d
rz25-image.gz: mount-fs build-fs unmount-fs
+ mount /dev/${DESTDISK}a ${DESTDIR}
+ mount /dev/${DESTDISK}d ${DESTDIR}/usr
+ mkdir ${DESTDIR}/alphadist
+ cp -p ${DESTDIR}/usr/sbin/sysctl ${DESTDIR}/alphadist
+ mv ${DESTDIR}/etc/rc ${DESTDIR}/alphadist/rc.real
+ cp ${.CURDIR}/rc.hack ${DESTDIR}/alphadist/rc.hack
+ cp -p ${DESTDIR}/alphadist/rc.hack ${DESTDIR}/etc/rc
+ umount ${DESTDIR}/usr ${DESTDIR}
/bin/rm -f $@
dd if=/dev/r${DESTDISK}c bs=`expr ${SECPERCYL} \* 512` \
count=${CYLS} | gzip -9 > $@
bin.tar.gz: mount-fs build-fs
/bin/rm -f $@
(cd ${DESTDIR} ; find . | grep -v '^./etc' | \
- grep -v '^./usr/X11R6' | grep -v '^./bsd' | \
+ grep -v '^./usr/X11R6' | grep -v '^./netbsd' | \
grep -v '^./boot' | pax -w -d | gzip -9) > $@
etc.tar.gz: mount-fs build-fs
--- /dev/null
+# $NetBSD: rc.hack,v 1.1.2.1 1996/06/15 04:02:44 cgd Exp $
+
+# Hackish /etc/rc to do basic setup for a distribution rz25 image to
+# make it slightly easier to use.
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/alphadist
+export PATH
+
+single_user()
+{
+ echo "Returning to single-user mode..."
+ exit 1
+}
+
+root_dev=`(sysctl -n machdep.root_device) 2> /dev/null`
+#echo "root_dev is '$root_dev'"
+
+if [ X"${root_dev}" = X'' ] || [ X"${root_dev}" = X'??' ]; then
+ echo "Can't figure out root device!"
+ single_user
+fi
+
+root_dev_base=`expr $root_dev : '\([a-z][a-z]*\)[0-9]*[a-z]'`
+root_dev_unit=`expr $root_dev : '[a-z][a-z]*\([0-9]*\)[a-z]'`
+root_dev_part=`expr $root_dev : '[a-z][a-z]*[0-9]*\([a-z]\)'`
+
+#echo $root_dev_base
+#echo $root_dev_unit
+#echo $root_dev_part
+
+usr_dev="${root_dev_base}${root_dev_unit}d"
+#echo usr_dev = $usr_dev
+
+case $root_dev_base in
+cd|sd)
+ ;;
+
+*)
+ echo "Unexpected root device type '$root_dev_base'."
+ single_user
+ ;;
+esac
+
+# If /tmp is already writeable, we've already been run... punt!
+if [ -w /tmp ]; then
+ echo ""
+ case $root_dev_base in
+ cd)
+ echo "Can't boot multi-user from a CD-ROM, because"
+ echo "the system can't have been configured."
+ echo ""
+ echo "Install on a real disk!"
+ echo ""
+ single_user
+ ;;
+
+ sd)
+ echo "If you want to boot multi-user, make sure that you've"
+ echo "configured the system properly, then run the"
+ echo "following:"
+ echo ""
+ echo " /bin/rm -f /etc/rc"
+ echo " /bin/cp -p /alphadist/rc.real /etc/rc"
+ echo ""
+ echo "from single-user mode then exit the single-user shell."
+ echo ""
+ single_user
+ ;;
+ esac
+fi
+
+case $root_dev_base in
+cd)
+ echo -n "Remounting root device..."
+ mount -u -o ro /dev/$root_dev /
+ echo ""
+
+ echo -n "Mounting /usr..."
+ mount -o ro /dev/$usr_dev /usr
+ echo ""
+
+ echo -n "Preparing temporary file systems..."
+ mount -t mfs -o -s=6144 swap /tmp
+ mount -t mfs -o -s=6144 swap /var/tmp
+ mkdir /var/tmp/vi.recover
+ chmod -R 1777 /tmp /var/tmp
+ echo ""
+ ;;
+
+sd)
+ echo "Checking root and /usr..."
+ fsck -n /dev/r$root_dev /dev/r$usr_dev > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ echo "File system check failed!"
+ single_user
+ fi
+
+ echo -n "Remounting root device..."
+ mount -u /dev/$root_dev /
+ echo ""
+
+ echo -n "Mounting /usr..."
+ mount /dev/$usr_dev /usr
+ echo ""
+ ;;
+esac
+
+single_user
--- /dev/null
+# $NetBSD: Makefile,v 1.1 1996/05/16 19:58:49 mark Exp $
+
+SUBDIR= inst upgr
+
+.include <bsd.subdir.mk>
--- /dev/null
+# $NetBSD: Makefile.inc,v 1.1 1996/05/16 19:58:50 mark Exp $
+
+# Revision is 1.1
+# all these private copies of the version number really lose.
+REV= 11
--- /dev/null
+# $NetBSD: Makefile.inc,v 1.1 1996/05/16 19:59:03 mark Exp $
+
+# TOP is assumed to be defined by Makefile including this one.
+
+CBIN= instbin
+COMMONDIR= ${TOP}/inst-common
+
+MOUNT_POINT?= /mnt
+VND?= vnd0
+VND_DEV= /dev/${VND}a
+VND_RDEV= /dev/r${VND}a
+IMAGE?= xxx-${REV}.fs
+MDEC= ${DESTDIR}/usr/mdec
+
+LISTS= ${COMMONDIR}/list ${.CURDIR}/list
+CRUNCHCONF= ${COMMONDIR}/${CBIN}.conf
+MTREE= ${COMMONDIR}/mtree.conf
+
+all: ${CBIN}
+ dd if=/dev/zero of=${IMAGE} bs=144k count=10
+ vnconfig -v -c ${VND_DEV} ${IMAGE}
+ newfs -O -m 0 -o space -i 5120 -c 80 ${VND_RDEV} floppy
+ 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_DEV}
+ cat /*bin/* > /dev/null
+
+unconfig:
+ -umount -f ${MOUNT_POINT}
+ -vnconfig -u ${VND_DEV}
+ -/bin/rm -f ${IMAGE}
+
+${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:
+ /bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.c
+
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
--- /dev/null
+# $NetBSD: dot.commonutils,v 1.1 1996/05/16 19:59:04 mark 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 by Christopher G. Demetriou.
+# 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.
+#
+
+# Installation utilites (functions), to get NetBSD installed on
+# the hard disk. These are meant to be invoked from the shell prompt,
+# by people installing NetBSD.
+
+# we know that /etc/fstab is only generated on the hard drive
+dest_dir=/
+if [ ! -f /etc/fstab ]; then
+ dest_dir=/mnt/
+fi
+
+# counter for possible shared library confusion
+TAR=/usr/bin/tar
+GUNZIP=/usr/bin/gunzip
+
+Set_tmp_dir()
+{
+ def_tmp_dir=`pwd`
+ if [ "$def_tmp_dir" = "/" -o "$def_tmp_dir" = "/mnt" ]; then
+ def_tmp_dir="$dest_dir"usr/distrib
+ fi
+
+ echo -n "What directory should be used to find and/or store "
+ echo "installtion"
+ echo -n "files? [$def_tmp_dir] "
+ read tmp_dir
+ if [ "$tmp_dir" = "" ]; then
+ tmp_dir=$def_tmp_dir
+ fi
+ if [ ! -d "$tmp_dir" ]; then
+ /bin/rm -rf $tmp_dir
+ mkdir -p $tmp_dir
+ fi
+}
+
+Tmp_dir()
+{
+ if [ "$tmp_dir" = "" ]; then
+ Set_tmp_dir
+ fi
+ cd $tmp_dir
+}
+
+Load_fd()
+{
+ Tmp_dir
+ which=
+ echo "Don't forget that you can't load from the drive you booted from."
+ echo "unless you booted with a ramdisk."
+ echo ""
+
+ while [ "$which" != "0" -a "$which" != "1" ]; do
+ echo -n "Read from which floppy drive ('0' or '1')? [0] "
+ read which
+ if [ "X$which" = "X" ]; then
+ which=0
+ fi
+ done
+ echo ""
+ echo "WARNING: during the floppy loading process, you should only"
+ echo "use Control-C at the prompt."
+ echo ""
+ while echo -n \
+ "Insert floppy (hit Control-C to terminate, enter to load): "
+ do
+ read foo
+ mount -t msdos /dev/fd${which}a /mnt2
+ cp -rp /mnt2/* .
+ umount /mnt2
+ done
+}
+
+Load_tape()
+{
+ Tmp_dir
+ echo -n "Which tape drive will you be using? [rst0] "
+ read which
+ if [ "X$which" = "X" ]; then
+ which=rst0
+ fi
+ echo -n "Insert the tape into the tape drive and hit return to "
+ echo -n "continue..."
+ read foo
+ echo "Extracting files from the tape..."
+ $TAR xvpf --unlink /dev/$which
+ echo "Done."
+}
+
+Extract()
+{
+ Tmp_dir
+ echo -n "Would you like to list the files as they're extracted? [n] "
+ read verbose
+ case $verbose in
+ y*|Y*)
+ tarverbose=v
+ ;;
+ *)
+ tarverbose=
+ ;;
+ esac
+ cat "$1"* | $GUNZIP | (cd $dest_dir ; $TAR --unlink -xp"$tarverbose"f - )
+}
--- /dev/null
+#!/bin/sh
+#
+# $NetBSD: inst.sh,v 1.1 1996/05/16 19:59:05 mark Exp $
+#
+# Copyright (c) 1995-1996 Mark Brinicombe
+# 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 Mark Brinicombe.
+# 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.
+#
+# from inst,v 1.9 1996/04/18 20:56:14 mark Exp $
+#
+
+#
+# Installation utilites (functions), to get NetBSD installed on
+# the hard disk. These are meant to be invoked from the shell prompt,
+# by people installing NetBSD.
+#
+
+VERSION=`echo '$Revision: 1.1 $' | cut '-d ' -f2`
+
+Load_tape()
+{
+ Tmp_dir
+ echo -n "Which tape drive will you be using? [rst0] "
+ read which
+ if [ "X$which" = "X" ]; then
+ which=rst0
+ fi
+ echo -n "Insert the tape into the tape drive and hit return to "
+ echo -n "continue..."
+ read foo
+ echo "Extracting files from the tape..."
+ $TAR xvpf --unlink /dev/$which
+ echo "Done."
+}
+
+
+Get_Dest_Dir()
+{
+ echo -n "Enter new path to dest directory [$dest_dir] "
+ read newdir
+ if [ ! "X$newdir" = "X" ]; then
+ dest_dir=$newdir
+ fi
+}
+
+
+Get_Distrib_Dir()
+{
+ echo -n "Enter new path to distrib directory [$distribdir] "
+ read distribdir
+ if [ "X$distribdir" = "X" ]; then
+ distribdir=$destdir/usr/distrib
+ fi
+ if [ ! -d $distribdir ]; then
+ echo -n "$distribdir does not exist, create it [n] "
+ read yorn
+ if [ "$yorn" = "y" ]; then
+ mkdir $distribdir
+ fi
+ fi
+}
+
+
+Set_Distrib_Dir()
+{
+ while [ ! -d $distribdir ]; do
+ echo "Directory $distribdir does not exist"
+ Get_Distrib_Dir
+ done
+
+ cd $distribdir
+}
+
+
+Load_Msdos_Fd()
+{
+ echo "Loading sets from msdos floppies"
+ Set_Distrib_Dir
+
+ which=
+ while [ "$which" != "0" -a "$which" != "1" ]; do
+ echo -n "Read from which floppy drive ('0' or '1')? [0] "
+ read which
+ if [ "X$which" = "X" ]; then
+ which=0
+ fi
+ done
+
+ foo=
+ while [ "X$foo" = "X" ]; do
+ echo -n "Insert floppy (type s to stop, enter to load): "
+ read foo
+ if [ "X$foo" = "X" ]; then
+ mount -t msdos /dev/fd${which}a /mnt2
+ cp -rp /mnt2/* .
+ umount /mnt2
+ fi
+ done
+}
+
+
+Load_Tar_Fd()
+{
+ echo "Loading sets from tar floppies"
+ Set_Distrib_Dir
+
+ which=
+ while [ "$which" != "0" -a "$which" != "1" ]; do
+ echo -n "Read from which floppy drive ('0' or '1')? [0] "
+ read which
+ if [ "X$which" = "X" ]; then
+ which=0
+ fi
+ done
+
+ foo=
+ while [ "X$foo" = "X" ]; do
+ echo -n "Insert floppy (type s to stop, enter to load): "
+ read foo
+ if [ "X$foo" = "X" ]; then
+ tar xf /dev/fd${which}a
+ fi
+ done
+}
+
+
+Load_Tar_Fd1()
+{
+ echo "Loading sets from multi-volume tar floppies"
+ Set_Distrib_Dir
+
+ which=
+ while [ "$which" != "0" -a "$which" != "1" ]; do
+ echo -n "Read from which floppy drive ('0' or '1')? [0] "
+ read which
+ if [ "X$which" = "X" ]; then
+ which=0
+ fi
+ done
+
+ foo=
+ while [ "X$foo" = "X" ]; do
+ echo -n "Insert floppy (type s to stop, enter to load): "
+ read foo
+ if [ "X$foo" = "X" ]; then
+ tar xfM /dev/fd${which}a
+ fi
+ done
+}
+
+
+Load_Sets()
+{
+ res0=
+ while [ "$res0" != "q" -a "$res0" != "Q" ]; do
+ echo ""
+ echo -n "1. Set distrib directory (Currently $distribdir"
+ if [ ! -d $distribdir ]; then
+ echo " - non-existant)"
+ else
+ echo ")"
+ fi
+ echo "2. Load sets from msdos floppies"
+ echo "3. Load sets from tar floppies"
+ echo "4. Load sets from multi-volume tar floppies"
+ echo "Q. Return to previous menu"
+ echo ""
+ echo -n "Choice : "
+ read res0
+ case "$res0" in
+ 1)
+ Get_Distrib_Dir
+ ;;
+ 2)
+ Load_Msdos_Fd
+ ;;
+ 3)
+ Load_Tar_Fd
+ ;;
+ 4)
+ Load_Tar_Fd1
+ ;;
+ q|Q)
+# echo "Returning to previous menu"
+ ;;
+ esac
+ done
+}
+
+
+Mount_SCSI_CDROM()
+{
+ which=
+ while [ "$which" != "0" -a "$which" != "1" ]; do
+ echo -n "Mount which CDROM drive ('0' or '1')? [0] "
+ read which
+ if [ "X$which" = "X" ]; then
+ which=0
+ fi
+ done
+
+ mount -r -t cd9660 /dev/cd${which}a /cdrom
+ if [ ! $? = 0 ]; then
+ echo "Mount failed"
+ else
+ distribdir="/cdrom/usr/distrib"
+ fi
+
+}
+
+
+Mount_SCSI_Disc()
+{
+ echo -n "Mount which SCSI device as CDROM ? [sd0a] "
+ read which
+
+ mount -r -t cd9660 /dev/${which} /cdrom
+ if [ ! $? = 0 ]; then
+ echo "Mount failed"
+ else
+ distribdir="/cdrom/usr/distrib"
+ fi
+
+}
+
+
+Mount_ATAPI_CDROM()
+{
+ mount -r -t cd9660 /dev/wcd0a /cdrom
+ if [ ! $? = 0 ]; then
+ mount -r -t cd9660 /dev/wcd0a /cdrom
+ if [ ! $? = 0 ]; then
+ echo "Mount failed"
+ else
+ distribdir="/cdrom/usr/distrib"
+ fi
+ else
+ distribdir="/cdrom/usr/distrib"
+ fi
+
+}
+
+
+CDROM_Sets() {
+ res0=
+ while [ "$res0" != "q" -a "$res0" != "Q" ]; do
+ echo ""
+ echo -n "1. Set distrib directory (Currently $distribdir"
+ if [ ! -d $distribdir ]; then
+ echo " - non-existant)"
+ else
+ echo ")"
+ fi
+ echo -n "2. Mount SCSI CDROM "
+ if [ ! -b /dev/cd0a ]; then
+ echo "- Not available"
+ else
+ echo ""
+ fi
+ echo -n "3. Mount ATAPI CDROM "
+ if [ ! -b /dev/wcd0a ]; then
+ echo "- Not available"
+ else
+ echo ""
+ fi
+ if [ -f /var/inst/developer ]; then
+ echo "D. Mount SCSI disc as CDROM"
+ fi
+ echo "Q. Return to previous menu"
+ echo ""
+ echo -n "Choice : "
+ read res0
+ case "$res0" in
+ 1)
+ Get_Distrib_Dir
+ ;;
+ 2)
+ Mount_SCSI_CDROM
+ ;;
+ 3)
+ Mount_ATAPI_CDROM
+ ;;
+ d|D)
+ Mount_SCSI_Disc
+ ;;
+ q|Q)
+ ;;
+ esac
+ done
+}
+
+
+Show_Sets()
+{
+ Set_Distrib_Dir
+ sets=`ls *.[sS][eE][tT] 2>/dev/null | sed -e 's/.[sS][eE][tT]//'`
+
+ echo "Loaded sets in $distribdir :"
+ for set in $sets; do
+ cat "$set".set 2>/dev/null | grep 'desc:' | cut -f2-
+ cat "$set".SET 2>/dev/null | grep 'desc:' | cut -f2-
+ done
+}
+
+
+Show_Installed_Sets()
+{
+ INSTALLDIR=$dest_dir/var/inst/installed
+ cd $INSTALLDIR
+ if [ ! $? = 0 ]; then
+ return
+ fi
+ sets=`ls *.[sS][eE][tT] 2>/dev/null | sed -e 's/.[sS][eE][tT]//'`
+
+ echo "Installed sets:"
+ for set in $sets; do
+ cat "$set".set 2>/dev/null | grep 'desc:' | cut -f2-
+ cat "$set".SET 2>/dev/null | grep 'desc:' | cut -f2-
+ done
+}
+
+
+Validate_Sets()
+{
+ Set_Distrib_Dir
+ sets=`ls *.[sS][eE][tT] 2>/dev/null | sed -e 's/.[sS][eE][tT]//'`
+ list=""
+
+ echo "Loaded sets in $distribdir :"
+ for set in $sets; do
+ printf "$set\t"
+ list="$list $set"
+ done
+ echo ""
+
+ echo -n "Enter set names or 'all' for all sets : "
+ read res2
+ res2=`echo "$res2" | tr "," " " | tr "[A-Z]" "[a-z]"`
+ if [ "$res2" = "all" ]; then
+ res2="$list"
+ fi
+ sets="$res2"
+
+ echo "Validating in $distribdir :"
+ fail=""
+ for set in $sets; do
+ setname="set"
+ if [ ! -f "$set"."$setname" ]; then
+ setname="SET"
+ set=`echo $set | tr [a-z] [A-Z]`
+ fi
+ p1=`cat $set.$setname 2>/dev/null | grep 'parts:' | cut -f2`
+ if [ "$p1" = "" ]; then
+ continue
+ fi
+ p2=`ls "$set".[0-9a-z][0-9a-z] 2>/dev/null | wc | awk '{print $1}'`
+ printf "$set\t:"
+# echo "$p1 , $p2"
+ if [ ! "$p1" = "$p2" ]; then
+ echo -n " Failed parts check (need $p1, got $p2)"
+ else
+ echo -n " Passed parts check"
+ fi
+ loop=0
+ while [ $loop -lt $p1 ]; do
+ if [ $loop -lt 10 ]; then
+ file="0$loop"
+ else
+ file=$loop
+ fi
+ echo -n " [$file]"
+ cksum=`cat $set.$setname | grep "cksum.$file:" | cut -f2`
+ cksum1=`cat "$set".$file 2>&1 | cksum | cut "-d " -f1`
+ #echo "#$cksum, $cksum1#"
+ if [ ! "$cksum" = "$cksum1" ]; then
+ echo -n " part $file failed checksum"
+ fail="yes"
+ fi
+ loop=$(($loop+1))
+ done
+ if [ "$fail" = "" ]; then
+ echo " Passed checksum"
+ else
+ echo ""
+ fi
+ done
+}
+
+
+Verify_Sets()
+{
+ Set_Distrib_Dir
+ sets=`ls *.[sS][eE][tT] 2>/dev/null | sed -e 's/.[sS][eE][tT]//'`
+ list=""
+
+ echo "Loaded sets in $distribdir :"
+ for set in $sets; do
+ printf "$set\t"
+ list="$list $set"
+ done
+ echo ""
+
+ echo -n "Enter set names or 'all' for all sets : "
+ read res2
+ res2=`echo "$res2" | tr "," " " | tr "[A-Z]" "[a-z]"`
+ if [ "$res2" = "all" ]; then
+ res2="$list"
+ fi
+ sets="$res2"
+
+ echo "Verifing sets in $distribdir :"
+ for set in $sets; do
+ setname="set"
+ if [ ! -f "$set"."$setname" ]; then
+ setname="SET"
+ set=`echo $set | tr [a-z] [A-Z]`
+ fi
+ printf "$set\t:"
+ cat "$set".[0-9a-z][0-9a-z] 2>/dev/null | $GUNZIP -t 2>/dev/null 1>/dev/null
+ if [ ! $? = 0 ]; then
+ echo " Failed archive integrity"
+ else
+ echo " Passed"
+ fi
+ done
+}
+
+
+Verify_Checksums()
+{
+ echo -n "Enter name of checksums file : "
+ read checkfile
+ if [ "X$checkfile" = "X" ]; then
+ return
+ fi
+
+ Set_Distrib_Dir
+ sets=`ls *.[sS][eE][tT] 2>/dev/null | sed -e 's/.[sS][eE][tT]//'`
+ list=""
+
+ echo "Available sets in $distribdir :"
+ for set in $sets; do
+ printf "$set\t"
+ list="$list $set"
+ done
+ echo ""
+
+ echo -n "Enter set names or 'all' for all sets : "
+ read res2
+ res2=`echo "$res2" | tr "," " " | tr "[A-Z]" "[a-z]"`
+ if [ "$res2" = "all" ]; then
+ res2="$list"
+ fi
+ sets="$res2"
+
+ TMPFILE1="/tmp/inst.cksum1"
+ TMPFILE2="/tmp/inst.cksum2"
+
+ echo "Verifing checksums for sets in $distribdir :"
+ for set in $sets; do
+ setname="set"
+ if [ ! -f "$set"."$setname" ]; then
+ setname="SET"
+ set=`echo $set | tr [a-z] [A-Z]`
+ fi
+ printf "$set\t:"
+ grep cksum $set.$setname >$TMPFILE1
+ egrep -i "`echo ^$set.$setname | sed -e 's/\+/\\\\+/g'`" $checkfile | cut '-d:' -f2- >$TMPFILE2
+ cmp -s $TMPFILE1 $TMPFILE2
+ if [ $? = 0 ]; then
+ echo "checksums ok"
+ else
+ echo "checksum error"
+ fi
+ done
+ rm -f $TMPFILE1
+ rm -f $TMPFILE2
+}
+
+
+Check_Sets() {
+ res0=
+ while [ "$res0" != "q" -a "$res0" != "Q" ]; do
+ echo ""
+ echo "1. Validate distribution sets (confirm checksums)"
+ echo "2. Verify distribution sets (integrity check)"
+ echo "3. Verify checksums (confirm set checksums)"
+ echo "Q. Return to previous menu"
+ echo ""
+ echo -n "Choice : "
+ read res0
+ case "$res0" in
+ 1)
+ Validate_Sets
+ ;;
+ 2)
+ Verify_Sets
+ ;;
+ 3)
+ Verify_Checksums
+ ;;
+ q|Q)
+ ;;
+ esac
+ done
+}
+
+
+
+
+List_Sets()
+{
+ Set_Distrib_Dir
+ sets=`ls *.[sS][eE][tT] 2>/dev/null | sed -e 's/.[sS][eE][tT]//'`
+ list=""
+
+ echo "Loaded sets in $distribdir :"
+ for set in $sets; do
+ printf "$set\t"
+ list="$list $set"
+ done
+ echo ""
+
+ echo -n "Enter set names or 'all' for all sets : "
+ read res2
+ res2=`echo "$res2" | tr "," " " | tr "[A-Z]" "[a-z]"`
+ if [ "$res2" = "all" ]; then
+ res2="$list"
+ fi
+ sets="$res2"
+
+ echo "Listing contents of sets in $distribdir :"
+ for set in $sets; do
+ setname="set"
+ if [ ! -f "$set"."$setname" ]; then
+ setname="SET"
+ set=`echo $set | tr [a-z] [A-Z]`
+ fi
+ echo "$set:"
+ cat "$set".[0-9a-z][0-9a-z] | $GUNZIP | $TAR -tpvf -
+ done
+}
+
+
+Install_Sets()
+{
+# Make sure all the directories exist for recording the installation
+
+ INSTALLDIR=$dest_dir/var/inst
+ if [ ! -d $dest_dir/var ]; then
+ echo "Creating $dest_dir/var"
+ mkdir $dest_dir/var
+ fi
+ if [ ! -d $INSTALLDIR ]; then
+ echo "Creating $INSTALLDIR"
+ mkdir $INSTALLDIR
+ fi
+ if [ ! -d $INSTALLDIR/installed ]; then
+ echo "Creating $INSTALLDIR/installed"
+ mkdir $INSTALLDIR/installed
+ fi
+ if [ ! -d $INSTALLDIR/sets ]; then
+ echo "Creating $INSTALLDIR/sets"
+ mkdir $INSTALLDIR/sets
+ fi
+
+ if [ ! -d $dest_dir/tmp ]; then
+ echo "Creating $dest_dir/tmp"
+ mkdir $dest_dir/tmp
+ chmod 1777 $dest_dir/tmp
+ fi
+
+# Set the distribution directory and list all the available sets
+
+ Set_Distrib_Dir
+ sets=`ls *.[sS][eE][tT] 2>/dev/null | sed -e 's/.[sS][eE][tT]//'`
+ list=""
+
+ echo "Loaded sets in $distribdir :"
+ for set in $sets; do
+ printf "$set\t"
+ list="$list $set"
+ done
+ echo ""
+
+# Prompt for the sets to install
+
+ echo -n "Enter set names or 'all' for all sets : "
+ read res2
+ res2=`echo "$res2" | tr "," " " | tr "[A-Z]" "[a-z]"`
+
+# Check for any of the special sets
+
+ if [ "$res2" = "all" ]; then
+ res2="$list"
+ fi
+
+ if [ "$res2" = "req" ]; then
+ res2="base etc misc text kern"
+ fi
+
+ if [ "$res2" = "std" ]; then
+ res2="base etc misc text local man kern"
+ fi
+
+# Hack to make sure the base set is the first installed
+
+ echo "$res2" | grep base 2>/dev/null >/dev/null
+ if [ $? = 0 ]; then
+ res2="base "`echo "$res2" | sed 's/base//'`
+ fi
+
+ echo "$res2" | grep BASE 2>/dev/null >/dev/null
+ if [ $? = 0 ]; then
+ res2="BASE "`echo "$res2" | sed 's/BASE//'`
+ fi
+
+ echo -n "Would you like to list the files as they're extracted? [n] "
+ read verbose
+ case $verbose in
+ y*|Y*)
+ tarverbose=v
+ ;;
+ *)
+ tarverbose=
+ ;;
+ esac
+
+ for set in $res2; do
+ setname="set"
+ if [ ! -f "$set"."$setname" ]; then
+ setname="SET"
+ set=`echo $set | tr [a-z] [A-Z]`
+ fi
+
+# Test for conflicts
+
+ ok=""
+ for file in `ls $INSTALLDIR/installed/*.[sS][eE][tT] 2>/dev/null`; do
+ conflict="`grep conflict: $file | cut -d: -f2- 2>/dev/null`"
+ echo $conflict | egrep -i "(^|[[:space:]])$set([[:space:]]|$)" 2>/dev/null > /dev/null
+ if [ $? = 0 ]; then
+ echo "Set $set conflicts with installed set `basename $file`"
+ ok="no"
+ break
+ fi
+ done
+
+ if [ ! "$ok" = "" ]; then
+ continue
+ fi
+
+ conflicts="`grep conflict: $set.$setname | cut -d: -f2-`"
+ installed="`(cd $INSTALLDIR/installed ; ls *.[sS][eE][tT]) 2>/dev/null`"
+
+ for conflict in $conflicts ; do
+ echo $installed | egrep -i "(^|[[:space:]])$conflict.set([[:space:]]|$)" 2>/dev/null > /dev/null
+ if [ $? = 0 ]; then
+ echo "Set $set conflicts with installed set $conflict"
+ ok="no"
+ break;
+ fi
+ done
+
+ if [ ! "$ok" = "" ]; then
+ continue
+ fi
+
+ dependancies="`grep depend: $set.$setname | cut -d: -f2-`"
+ installed="`(cd $INSTALLDIR/installed ; ls *.[sS][eE][tT]) 2>/dev/null`"
+
+ for depend in $dependancies ; do
+ echo $installed | egrep -i "(^|[[:space:]])$depend\.set([[:space:]]|$)" 2> /dev/null >/dev/null
+ if [ ! $? = 0 ]; then
+ echo "Set $depend must be installed before $set"
+ ok="no"
+ break;
+ fi
+ done
+
+ if [ ! "$ok" = "" ]; then
+ continue
+ fi
+
+ if [ -f "$set".00 ]; then
+ if [ -x "$INSTALLDIR/scripts/$set" ]; then
+ echo "Running deinstallation script for $set"
+ (cd $dest_dir ; INSTALLROOT=$dest_dir; export INSTALLROOT ; $INSTALLDIR/scripts/$set deinstall)
+ fi
+
+ filelist="$dest_dir/tmp/$set.files"
+ echo "Installing $set"
+ case $verbose in
+ y*|Y*)
+ cat "$set".[0-9a-z][0-9a-z] | $GUNZIP | (cd $dest_dir ; $TAR --unlink -xpvf - | tee $filelist)
+ ;;
+ *)
+ cat "$set".[0-9a-z][0-9a-z] | $GUNZIP | (cd $dest_dir ; $TAR --unlink -xpvf - >$filelist)
+ ;;
+ esac
+ echo "Generating installation information"
+ cat $filelist | awk '{ print $0 }' > $INSTALLDIR/installed/$set.files
+# cat $filelist | awk '{ print $3 $8 }' > $INSTALLDIR/installed/$set.files
+ rm $filelist
+ cp $set.$setname $INSTALLDIR/installed/
+
+# Run any install script
+
+ if [ -x "$INSTALLDIR/scripts/$set" ]; then
+ echo "Running installation script for $set"
+ (cd $dest_dir ; INSTALLROOT=$dest_dir; export INSTALLROOT ; $INSTALLDIR/scripts/$set install)
+ fi
+ else
+ echo "Set $set not available for installation"
+ fi
+ sync
+ done
+
+# Test for other set requirements
+
+ echo "Checking installed set requirements"
+
+ installed="`(cd $INSTALLDIR/installed ; ls *.[sS][eE][tT]) 2>/dev/null`"
+
+ for set in $installed; do
+ required="`grep req: $INSTALLDIR/installed/$set | cut -d: -f2- 2>/dev/null`"
+ for require in $required; do
+ echo $installed | egrep -i "(^|[[:space:]])$require.set([[:space:]]|$)" 2>/dev/null > /dev/null
+ if [ ! $? = 0 ]; then
+ echo "Set $set requires set $require"
+# break
+ fi
+ done
+ done
+}
+
+
+Deinstall_Sets()
+{
+# Make sure all the directories exist for recording the installation
+
+ INSTALLDIR=$dest_dir/var/inst
+
+# Set the distribution directory and list all the available sets
+
+ cd $INSTALLDIR/installed
+ sets=`ls *.[sS][eE][tT] 2>/dev/null | sed -e 's/.[sS][eE][tT]//'`
+ list=""
+
+ echo "Installed sets :"
+ for set in $sets; do
+ printf "$set\t"
+ list="$list $set"
+ done
+ echo ""
+
+# Prompt for the sets to deinstall
+
+ echo -n "Enter set names : "
+ read res2
+ res2=`echo "$res2" | tr "," " " | tr "[A-Z]" "[a-z]"`
+
+ echo -n "Would you like to list the files as they're removed? [n] "
+ read verbose
+
+ for set in $res2; do
+ setname="set"
+ if [ ! -f "$set"."$setname" ]; then
+ setname="SET"
+ set=`echo $set | tr [a-z] [A-Z]`
+ fi
+
+ if [ -f "$set".set ]; then
+# Test for dependancies
+
+ ok=""
+ for file in `ls $INSTALLDIR/installed/*.[sS][eE][tT] 2>/dev/null`; do
+ depend="`grep depend: $file 2>/dev/null`"
+ echo $depend | egrep -i "(^|[[:space:]])$set([[:space:]]|$)" 2>/dev/null > /dev/null
+ if [ $? = 0 ]; then
+ echo "Installed set $file depends on set $set"
+ ok="no"
+ break
+ fi
+ done
+
+ if [ ! "$ok" = "" ]; then
+ continue
+ fi
+
+ echo "Deinstalling $set"
+ if [ -x "$INSTALLDIR/scripts/$set" ]; then
+ echo "Running deinstallation script for $set"
+ (cd $dest_dir ; INSTALLROOT=$dest_dir; export INSTALLROOT ; $INSTALLDIR/scripts/$set deinstall)
+ fi
+ case $verbose in
+ y*|Y*)
+ for file in `cat $set.files`; do
+ echo $file
+ (cd $dest_dir ; rm $file) 2>/dev/null >/dev/null
+ done
+ ;;
+ *)
+ cat "$set.files" | (cd $dest_dir ; xargs rm 2>/dev/null >/dev/null )
+ ;;
+ esac
+ rm "$set.files"
+ rm "$set.set"
+ else
+ echo "Set $set not available for deinstallation"
+ fi
+ sync
+ done
+
+# Test for other set requirements
+
+ echo "Checking installed set requirements"
+
+ installed="`(cd $INSTALLDIR/installed ; ls *.[sS][eE][tT]) 2>/dev/null`"
+
+ for set in $installed; do
+ required="`grep req: $INSTALLDIR/installed/$set | cut -d: -f2- 2>/dev/null`"
+ for require in $required; do
+ echo $installed | egrep -i "(^|[[:space:]])$require.set([[:space:]]|$)" 2>/dev/null > /dev/null
+ if [ ! $? = 0 ]; then
+ echo "Set $set requires set $require"
+# break
+ fi
+ done
+ done
+}
+
+
+Select_Sets()
+{
+}
+
+
+Main_Menu()
+{
+ res1=
+ while [ "$res1" != "q" -a "$res1" != "Q" ]; do
+ echo ""
+ echo "RiscBSD (NetBSD/arm32) Installer V$VERSION"
+ echo ""
+ echo -n "1. Set distrib directory (Currently $distribdir"
+ if [ ! -d $distribdir ]; then
+ echo " - non-existant)"
+ else
+ echo ")"
+ fi
+ echo "2. Load distribution sets onto harddisc"
+ echo "3. Load distribution sets from CDROM"
+ echo "4. Show distribution sets"
+ echo "5. Show installed sets"
+ echo "6. Check sets (verify/validate)"
+ echo "7. List contents of distribution sets in $distribdir"
+ echo "8. Install distribution sets from $distribdir"
+ echo "D. Deinstall installed sets"
+ echo "R. Set root directory for install (Currently $dest_dir)"
+ echo "Q. Quit"
+ echo ""
+ echo -n "Choice : "
+ read res1
+ case "$res1" in
+ 1)
+ Get_Distrib_Dir
+ ;;
+ 2)
+ Load_Sets
+ ;;
+ 3)
+ CDROM_Sets
+ ;;
+ 4)
+ Show_Sets
+ ;;
+ 5)
+ Show_Installed_Sets
+ ;;
+ 6)
+ Check_Sets
+ ;;
+ 7)
+ List_Sets
+ ;;
+ 8)
+ Install_Sets
+ ;;
+ d|D)
+ Deinstall_Sets
+ ;;
+ r|R)
+ Get_Dest_Dir
+ ;;
+ q|Q)
+# echo "Quitting"
+ ;;
+ esac
+ done
+}
+
+
+# we know that /etc/fstab is only generated on the hard drive
+destdir=
+dest_dir=/
+if [ ! -f /etc/fstab ]; then
+ dest_dir=/mnt/
+fi
+if [ -f /etc/cdrom ]; then
+ dest_dir=/mnt/
+fi
+
+# counter for possible shared library confusion
+TAR=/usr/bin/tar
+GUNZIP=/usr/bin/gunzip
+
+distribdir=$destdir/usr/distrib
+
+#IAM=`whoami`
+#
+#if [ ! "$IAM" = "root" ]; then
+# echo "inst should be run as root"
+# exit
+#fi
+
+Main_Menu
+
+exit
--- /dev/null
+#
+# $NetBSD: instbin.conf,v 1.1 1996/05/16 19:59:07 mark Exp $
+#
+
+srcdirs bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin
+
+progs cat chmod chown chroot cp dd df disklabel ed expr fsck_ffs ftp gawk grep
+progs gzip ifconfig init less ln ls mkdir mknod mount mount_cd9660
+progs mount_ffs mount_msdos mount_nfs mount_kernfs
+progs mv newfs ping printf pwd reboot rm route
+progs sed sh shutdown slattach strings stty sync tar test tip umount
+progs update cksum wc tee tr cut cmp xargs
+
+ln chown chgrp
+ln fsck_ffs fsck
+ln gawk awk
+ln grep egrep
+ln gzip gzcat gunzip
+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 less more
+ln reboot halt
+
+libs -ledit -lutil -ltermcap -lcrypt -ll -lm
--- /dev/null
+# $NetBSD: list,v 1.1 1996/05/16 19:59:08 mark Exp $
+
+# copy the crunched binary, link to it, and kill it
+COPY ${OBJDIR}/instbin instbin
+LINK instbin bin/cat
+LINK instbin bin/chmod
+LINK instbin bin/cp
+LINK instbin bin/dd
+LINK instbin bin/df
+LINK instbin bin/ed
+LINK instbin bin/expr
+LINK instbin bin/ln
+LINK instbin bin/ls
+LINK instbin bin/mkdir
+LINK instbin bin/mv
+LINK instbin bin/pwd
+LINK instbin bin/rm
+LINK instbin bin/sh
+LINK instbin bin/stty
+LINK instbin bin/sync
+LINK instbin bin/test
+LINK instbin bin/[
+LINK instbin sbin/disklabel
+LINK instbin sbin/fsck
+LINK instbin sbin/fsck_ffs
+LINK instbin sbin/halt
+LINK instbin sbin/ifconfig
+LINK instbin sbin/init
+LINK instbin sbin/mknod
+LINK instbin sbin/mount
+LINK instbin sbin/mount_cd9660
+LINK instbin sbin/mount_ffs
+LINK instbin sbin/mount_msdos
+LINK instbin sbin/mount_nfs
+LINK instbin sbin/mount_kernfs
+LINK instbin sbin/newfs
+LINK instbin sbin/ping
+LINK instbin sbin/reboot
+LINK instbin sbin/route
+LINK instbin sbin/shutdown
+LINK instbin sbin/slattach
+LINK instbin sbin/umount
+SYMLINK /bin/cat usr/bin/awk
+SYMLINK /bin/cat usr/bin/chgrp
+SYMLINK /bin/cat usr/bin/cksum
+SYMLINK /bin/cat usr/bin/cmp
+SYMLINK /bin/cat usr/bin/cut
+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/grep
+SYMLINK /bin/cat usr/bin/more
+SYMLINK /bin/cat usr/bin/printf
+SYMLINK /bin/cat usr/bin/sed
+SYMLINK /bin/cat usr/bin/strings
+SYMLINK /bin/cat usr/bin/tar
+SYMLINK /bin/cat usr/bin/tee
+SYMLINK /bin/cat usr/bin/tip
+SYMLINK /bin/cat usr/bin/tr
+SYMLINK /bin/cat usr/bin/wc
+SYMLINK /bin/cat usr/bin/xargs
+SYMLINK /bin/cat usr/sbin/chown
+SYMLINK /bin/cat usr/sbin/chroot
+SYMLINK /bin/cat usr/sbin/update
+SPECIAL /bin/rm instbin
+
+# copy the MAKEDEV script and make some devices
+COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
+SPECIAL cd dev; sh MAKEDEV floppy
+SPECIAL /bin/rm dev/MAKEDEV
+
+# we need the contents of /usr/mdec
+#COPYDIR ${DESTDIR}/usr/mdec usr/mdec
+
+# various files that we need in /etc for the install
+COPY ${DESTDIR}/etc/group etc/group
+COPY ${DESTDIR}/etc/master.passwd etc/master.passwd
+COPY ${DESTDIR}/etc/passwd etc/passwd
+COPY ${DESTDIR}/etc/protocols etc/protocols
+COPY ${DESTDIR}/etc/pwd.db etc/pwd.db
+COPY ${DESTDIR}/etc/services etc/services
+COPY ${DESTDIR}/etc/spwd.db etc/spwd.db
+
+# and the common installation tools
+COPY ${TOPDIR}/inst-common/dot.commonutils .commonutils
+COPY ${TOPDIR}/inst-common/termcap.vt100 usr/share/misc/termcap
+
+COPY ${TOPDIR}/inst-common/inst.sh usr/local/sbin/inst
+SPECIAL /bin/chmod 755 usr/local/sbin/inst
--- /dev/null
+# $NetBSD: mtree.conf,v 1.1 1996/05/16 19:59:09 mark Exp $
+
+/set type=dir uname=root gname=wheel mode=0755
+# .
+.
+
+# ./bin
+bin
+# ./bin
+..
+
+# ./dev
+dev
+# ./dev
+..
+
+# ./etc
+etc
+# ./etc
+..
+
+# ./mnt
+mnt
+# ./mnt
+..
+
+# ./mnt2
+mnt2
+# ./mnt2
+..
+
+# ./kern
+kern
+# ./kern
+..
+
+# ./cdrom
+cdrom
+# ./cdrom
+..
+
+# ./sbin
+sbin
+# ./sbin
+..
+
+# ./tmp
+tmp
+# ./tmp
+..
+
+# ./usr
+usr
+
+# ./usr/bin
+bin
+# ./usr/bin
+..
+
+# ./usr/mdec
+mdec
+# ./usr/mdec
+..
+
+# ./usr/sbin
+sbin
+# ./usr/sbin
+..
+
+# ./usr/local
+local
+
+# ./usr/local/sbin
+sbin
+
+# ./usr/local
+..
+
+# ./usr
+..
+
+# ./usr/share
+share
+
+# ./usr/share/misc
+misc
+# ./usr/share/misc
+..
+
+# ./usr/share
+..
+
+# ./usr
+..
+
--- /dev/null
+# $NetBSD: termcap.vt100,v 1.1 1996/05/16 19:59:11 mark 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
+#
+vt100|vt100-am|dec vt100 (w/advanced video):\
+ :am:mi:ms:xn:xo:\
+ :co#80:it#8:li#24:vt#3:\
+ :DO=\E[%dB:K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:\
+ :LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:ae=^O:as=^N:bl=^G:\
+ :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:ho=\E[H:k0=\EOy:\
+ :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOt:k6=\EOu:\
+ :k7=\EOv:k8=\EOl:k9=\EOw: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: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:
--- /dev/null
+# $NetBSD: Makefile,v 1.1 1996/05/16 19:58:54 mark Exp $
+
+TOP= ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+IMAGE= inst-${REV}.fs
+
+.include "${TOP}/inst-common/Makefile.inc"
--- /dev/null
+# 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)
+#
--- /dev/null
+# $NetBSD: dot.hdprofile,v 1.1 1996/05/16 19:58:57 mark 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 by Christopher G. Demetriou.
+# 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.
+#
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+TERM=vt100
+export TERM
+
+umask 022
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+ DONEPROFILE=YES
+
+ echo "Checking filesystems..."
+ fsck -y
+
+ echo "Mounting filesystems..."
+ mount -a
+ mount -t kernfs /kern /kern 2>/dev/null >/dev/null
+
+ # set up some sane defaults
+ echo 'erase ^H, werase ^W, kill ^U, intr ^C'
+ stty newcrt werase ^W intr ^C kill ^U erase ^H 9600
+ echo ''
+
+ # run update, so that installed software is written as it goes.
+ update
+
+ # 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
--- /dev/null
+# $NetBSD: dot.instutils,v 1.1 1996/05/16 19:58:58 mark 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 by Christopher G. Demetriou.
+# 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.
+#
+
+# Installation configuration utilites (functions), to get NetBSD configured
+# reasonably once it is installed on the hard disk. These are meant to be
+# invoked from the shell prompt, by people installing NetBSD.
+
+Configure()
+{
+ DEV=/dev
+ ETC=/etc
+ if [ ! -f /etc/fstab ]; then
+ DEV=/mnt/dev
+ ETC=/mnt/etc
+ fi
+
+ echo "You will now be prompted for information about this"
+ echo "machine. If you hit return, the default answer (in"
+ echo "brackets) will be used."
+
+ echo ""
+ echo -n "What is this machine's hostname? [unknown.host.domain] "
+ read hname
+ if [ "$hname" = "" ]; then
+ hname=unknown.host.domain
+ fi
+ echo $hname > ${ETC}/myname
+ proto_domain=`echo $hname | sed -e 's/[^.]*\.//'`
+
+ echo ""
+ echo "What domain is this machine in (this is NOT its YP"
+ echo -n "domain name)? [$proto_domain] "
+ read dname
+ if [ "$dname" = "" ]; then
+ dname=$proto_domain
+ fi
+
+ echo "\a"
+ if [ -e $ETC/sendmail.cf ]; then
+ echo "WARNING: A default sendmail.cf exists, and probably"
+ echo "needs to be tuned and/or replaced, to work properly at"
+ echo "your site!"
+ else
+ echo "WARNING: No default sendmail.cf installed. Did you"
+ echo "forget to install the 'etc' distribution?"
+ fi
+
+ echo "127.0.0.1 localhost localhost.$dname" > ${ETC}/hosts
+
+ echo ""
+ echo -n "Does this machine have an ethernet interface? [y] "
+ read resp
+ case "$resp" in
+ n*)
+ ;;
+ *)
+ intf=
+ while [ "$intf" = "" ]; do
+ echo -n "What is the primary interface name "
+ echo -n "(e.g. ed0, ep0, etc)? "
+ read intf
+ done
+ echo -n "What is the hostname for this interface? [$hname] "
+ read ifname
+ if [ "$ifname" = "" ]; then
+ ifname=$hname
+ fi
+ ifaddr=
+ while [ "$ifaddr" = "" ]; do
+ echo -n "What is the IP address associated with "
+ echo -n "interface ${intf}? "
+ read ifaddr
+ done
+ echo "$ifaddr $ifname `echo $ifname | sed -e s/\.$dname//`" \
+ >> ${ETC}/hosts
+
+ echo -n "Does this interface have a special netmask? [n] "
+ read resp
+ case "$resp" in
+ y*)
+ echo -n "What is the netmask? [0xffffff00] "
+ read ifnetmask
+ if [ "$ifnetmask" = "" ]; then
+ ifnetmask=0xffffff00
+ fi
+ ;;
+ *)
+ ifnetmask=
+ ;;
+ esac
+
+ echo -n "Does this interface need additional flags? [n] "
+ read resp
+ case "$resp" in
+ y*)
+ echo -n "What flags? [link0] "
+ read ifflags
+ if [ "$ifflags" = "" ]; then
+ ifflags=link0
+ fi
+ ;;
+ *)
+ ifflags=
+ ;;
+ esac
+ echo "inet $ifname $ifnetmask $ifflags" > ${ETC}/hostname.$intf
+
+ echo "\a"
+ echo -n "WARNING: if you have any more ethernet interfaces, "
+ echo "you will have to configure"
+ echo -n "them by hand. Read the comments in /etc/netstart to "
+ echo "learn how to do this."
+ ;;
+ esac
+
+ echo ""
+ echo -n "Making device nodes (may take a while)..."
+ cd ${DEV}
+ sh MAKEDEV all
+ echo " done."
+
+ sync
+
+ echo ""
+ echo "If you haven't already installed a kernel on the hard drive"
+ echo "using your kernel-copy floppy, do so now. Kernel"
+ echo "installation instructions can be found in the"
+ echo "installation notes."
+}
--- /dev/null
+#
+# 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 by Christopher G. Demetriou.
+# 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: dot.profile,v 1.1 1996/09/05 21:26:18 deraadt Exp $
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+TERM=vt100
+export TERM
+
+umask 022
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+ DONEPROFILE=YES
+
+ # set up some sane defaults
+ echo 'erase ^H, werase ^W, kill ^U, intr ^C'
+ stty newcrt werase ^W intr ^C kill ^U erase ^H 9600
+ echo ''
+
+ # run update, so that installed software is written as it goes.
+ update
+
+ # 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
+
+ # run the installation script.
+ install
+fi
--- /dev/null
+#!/bin/sh
+#
+# 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 by Christopher G. Demetriou.
+# 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: install.sh,v 1.1 1996/09/05 21:26:19 deraadt Exp $
+
+# NetBSD installation script.
+# In a perfect world, this would be a nice C program, with a reasonable
+# user interface.
+
+stty erase ^H
+
+DT=/etc/disktab # /etc/disktab
+FSTABDIR=/mnt/etc # /mnt/etc
+#DONTDOIT=echo
+
+VERSION=1.1
+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."
+ 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? [IDE] "
+getresp "IDE"
+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=`expr $sects_per_track \* $tracks_per_cyl`
+cylbytes=`expr $cylindersize \* $bytes_per_sect`
+disksize=`expr $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=`expr $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=`expr $sects_per_track + 126`
+ badspacecyl=`expr $badspacecyl + $cylindersize - 1`
+ badspacecyl=`expr $badspacecyl / $cylindersize`
+ badspacesec=`expr $badspacecyl \* $cylindersize`
+ echo ""
+ echo -n "Using $badspacesec sectors ($badspacecyl cylinders) for the "
+ echo "bad144 bad block table"
+fi
+
+sects_left=`expr $partition_sects - $badspacesec`
+units_left=`expr $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=`expr $root + $badspacesec / $sizemult`
+units_left=`expr $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=`expr $root_offset + $root`
+part_used=`expr $part_used + $swap`
+echo ""
+
+fragsize=1024
+blocksize=8192
+$DONTDOIT mount -u /dev/rd0 /
+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=`expr $root \* $sizemult`
+_offset=`expr $root_offset \* $sizemult`
+echo -n " :pa#${_size}:oa#${_offset}" >> $DT
+echo ":ta=4.2BSD:ba#${blocksize}:fa#${fragsize}:\\" >> $DT
+_size=`expr $swap \* $sizemult`
+_offset=`expr $swap_offset \* $sizemult`
+echo " :pb#${_size}:ob#${_offset}:tb=swap:\\" >> $DT
+_size=`expr $partition \* $sizemult`
+echo " :pd#${_size}:od#0:\\" >> $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=`expr $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=`expr $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=`expr $part_offset + $root + $swap`
+ _size=`expr $part_size \* $sizemult`
+ _offset=`expr $offset \* $sizemult`
+ echo -n " :pe#${_size}:oe#${_offset}" >> $DT
+ echo ":te=4.2BSD:be#${blocksize}:fe#${fragsize}:\\" >> $DT
+ offset=`expr $offset + $part_size`
+ elif [ "$fname" = "" ]; then
+ fname=$part_name
+ _size=`expr $part_size \* $sizemult`
+ _offset=`expr $offset \* $sizemult`
+ echo -n " :pf#${_size}:of#${_offset}" >> $DT
+ echo ":tf=4.2BSD:bf#${blocksize}:ff#${fragsize}:\\" >> $DT
+ offset=`expr $offset + $part_size`
+ elif [ "$gname" = "" ]; then
+ gname=$part_name
+ _size=`expr $part_size \* $sizemult`
+ _offset=`expr $offset \* $sizemult`
+ echo -n " :pg#${_size}:og#${_offset}" >> $DT
+ echo ":tg=4.2BSD:bg#${blocksize}:fg#${fragsize}:\\" >> $DT
+ offset=`expr $offset + $part_size`
+ elif [ "$hname" = "" ]; then
+ hname=$part_name
+ _size=`expr $part_size \* $sizemult`
+ _offset=`expr $offset \* $sizemult`
+ echo -n " :ph#${_size}:oh#${_offset}" >> $DT
+ echo ":th=4.2BSD:bh#${blocksize}:fh#${fragsize}:\\" >> $DT
+ part_used=$partition
+ fi
+done
+echo " :pc#${disksize}:oc#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. "
+ 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 /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 /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 /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 /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 /dev/${drivename}h /mnt/$hname
+fi
+
+echo ""
+echo "Populating filesystems with bootstrapping binaries and config files"
+$DONTDOIT tar --one-file-system -cf - . | (cd /mnt ; tar --unlink -xpf - )
+$DONTDOIT cp /tmp/.hdprofile /mnt/.profile
+
+echo ""
+echo -n "Creating an fstab..."
+echo /dev/${drivename}a / ffs rw 1 1 | 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 ""
+echo "OK! The preliminary work of setting up your disk is now complete."
+echo ""
+echo "The remaining tasks are:"
+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 "To load and install the NetBSD distribution sets."
+echo "Currently the hard drive's root filesystem is mounted on /mnt"
+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 ""
--- /dev/null
+# $NetBSD: list,v 1.1 1996/05/16 19:59:01 mark Exp $
+
+# the disktab explanation file
+COPY disktab.preinstall etc/disktab.preinstall
+
+# and the installation tools
+COPY dot.profile .profile
+COPY dot.instutils .instutils
+COPY install.sh install
+COPY dot.hdprofile tmp/.hdprofile
+SPECIAL chmod 755 install
--- /dev/null
+# $NetBSD: list2sh.awk,v 1.1 1996/05/16 19:58:51 mark Exp $
+
+BEGIN {
+ printf("cd ${CURDIR}\n");
+ printf("\n");
+}
+/^$/ || /^#/ {
+ print $0;
+ next;
+}
+$1 == "COPY" {
+ printf("echo '%s'\n", $0);
+ printf("rm -f ${TARGDIR}/%s\n", $3);
+ printf("cp %s ${TARGDIR}/%s\n", $2, $3);
+ next;
+}
+$1 == "LINK" {
+ printf("echo '%s'\n", $0);
+ printf("rm -f ${TARGDIR}/%s\n", $3);
+ printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $3);
+ next;
+}
+$1 == "SYMLINK" {
+ printf("echo '%s'\n", $0);
+ printf("rm -f ${TARGDIR}/%s\n", $3);
+ printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $3);
+ next;
+}
+$1 == "COPYDIR" {
+ printf("echo '%s'\n", $0);
+ printf("(cd ${TARGDIR}/%s && find . ! -name . | xargs /bin/rm -rf)\n",
+ $3);
+ printf("(cd %s && find . ! -name . | cpio -pdamu ${TARGDIR}/%s)\n", $2,
+ $3);
+ next;
+}
+$1 == "SPECIAL" {
+ printf("echo '%s'\n", $0);
+ printf("(cd ${TARGDIR};");
+ for (i = 2; i <= NF; i++)
+ printf(" %s", $i);
+ printf(")\n");
+ next;
+}
+{
+ printf("echo '%s'\n", $0);
+ printf("echo 'Unknown keyword \"%s\" at line %d of input.'\n", $1, NR);
+ printf("exit 1\n");
+ exit 1;
+}
+END {
+ printf("\n");
+ printf("exit 0\n");
+ exit 0;
+}
--- /dev/null
+# $NetBSD: runlist.sh,v 1.1 1996/05/16 19:58:52 mark Exp $
+
+if [ "X$1" = "X-d" ]; then
+ SHELLCMD=cat
+ shift
+else
+ SHELLCMD="sh -e"
+fi
+
+( while [ "X$1" != "X" ]; do
+ cat $1
+ shift
+done ) | awk -f ${TOPDIR}/list2sh.awk | ${SHELLCMD}
--- /dev/null
+# $NetBSD: Makefile,v 1.1 1996/05/16 19:59:15 mark Exp $
+
+TOP= ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+IMAGE= upgr-${REV}.fs
+
+.include "${TOP}/inst-common/Makefile.inc"
--- /dev/null
+# $NetBSD: dot.hdprofile,v 1.1 1996/05/16 19:59:17 mark 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 by Christopher G. Demetriou.
+# 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.
+#
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+TERM=vt100
+export TERM
+
+umask 022
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+ DONEPROFILE=YES
+
+ echo "Checking filesystems..."
+ fsck -y
+
+ echo "Mounting filesystems..."
+ mount -a
+
+ # set up some sane defaults
+ echo 'erase ^H, werase ^W, kill ^U, intr ^C'
+ stty newcrt werase ^W intr ^C kill ^U erase ^H 9600
+ echo ''
+
+ # run update, so that installed software is written as it goes.
+ update
+
+ # pull in the functions that people will use from the shell prompt.
+ . /.commonutils
+ . /.upgrutils
+
+ echo "Follow the installation directions to install the NetBSD"
+ echo "distribution sets."
+fi
--- /dev/null
+# $NetBSD
+#
+# 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 by Christopher G. Demetriou.
+# 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.
+#
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+TERM=vt100
+export TERM
+
+umask 022
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+ DONEPROFILE=YES
+
+ # set up some sane defaults
+ echo 'erase ^H, werase ^W, kill ^U, intr ^C'
+ stty newcrt werase ^W intr ^C kill ^U erase ^H 9600
+ echo ''
+
+ # run update, so that installed software is written as it goes.
+ update
+
+ # pull in the functions that people will use from the shell prompt.
+ . /.commonutils
+ . /.upgrutils
+
+ # run the upgrade script.
+ upgrade
+fi
--- /dev/null
+# $NetBSD: dot.upgrutils,v 1.1 1996/05/16 19:59:19 mark 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 by Christopher G. Demetriou.
+# 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.
+#
+
+# Upgrade cleanup utilites (functions), to make sure a recently-upgraded
+# system is safely runnable. These are meant to be invoked from the shell
+# prompt, by people installing NetBSD.
+
+Cleanup()
+{
+ upgrade_dir=/
+
+ if [ ! -f /etc/fstab ]; then
+ upgrade_dir=/mnt
+ fi
+
+ echo "Cleaning up miscellaneous files in /etc..."
+ mv $upgrade_dir/etc/rc.bak $upgrade_dir/etc/rc
+ chroot $upgrade_dir /usr/sbin/pwd_mkdb -p /etc/master.passwd
+ chroot $upgrade_dir /bin/rm /etc/sendmail.fc > /dev/null 2>&1
+ sync
+ echo "Done."
+
+ echo ""
+ echo "All that's left to do now is to install a new NetBSD kernel"
+ echo "on your hard disk. You should now halt your machine using"
+ echo "the 'halt' command. Once the machine is halted, replace the"
+ echo "installation floppy with the kernel-copy floppy and hit any"
+ echo "key to reboot. Use the kernel-copy floppy to copy a kernel"
+ echo "to your hard disk."
+}
--- /dev/null
+# $NetBSD: list,v 1.1 1996/05/16 19:59:20 mark Exp $
+
+# and the upgrade tools
+COPY dot.profile .profile
+COPY dot.upgrutils .upgrutils
+COPY upgrade.sh upgrade
+COPY dot.hdprofile tmp/.hdprofile
+SPECIAL chmod 755 upgrade
--- /dev/null
+#!/bin/sh
+#
+# $NetBSD: upgrade.sh,v 1.1 1996/05/16 19:59:21 mark 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 by Christopher G. Demetriou.
+# 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.
+#
+
+# NetBSD upgrade script.
+# In a perfect world, this would be a nice C program, with a reasonable
+# user interface.
+
+stty erase ^H
+
+DT=/etc/disktab # /etc/disktab
+FSTABDIR=/mnt/etc # /mnt/etc
+#DONTDOIT=echo
+
+VERSION=1.1
+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."
+ 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 partion? "
+ 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 "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 "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."
+ upgradefs=NO
+ ;;
+ *)
+ upgradefs=YES
+ ;;
+esac
+
+if [ $upgradefs = YES ]; then
+ echo ""
+ echo "Upgrading the file system on ${drivename}a..."
+
+ fsck -p -c 2 /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 "Done."
+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."
+
+if [ $upgradefs = YES ]; then
+ 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 "Upgrading the rest of your file systems..."
+ chroot /mnt fsck -p -c 2
+ 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."
+fi
+
+echo ""
+echo "Updating boot blocks on ${drivename}..."
+disklabel -r $drivename > /mnt/tmp/${drivename}.label
+if [ $? != 0 ]; then
+ echo "FATAL ERROR: READ 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
+disklabel -R -B $drivename /mnt/tmp/${drivename}.label
+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 tar --exclude etc --one-file-system -cf - . | (cd /mnt ; tar --unlink -xpf - )
+$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 ""
#
-# $OpenBSD: dot.commonutils,v 1.5 1996/06/29 05:54:08 tholo Exp $
# $NetBSD: dot.commonutils,v 1.4 1996/02/28 10:06:40 leo Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# Installation utilites (functions), to get OpenBSD installed on
+# Installation utilites (functions), to get NetBSD installed on
# the hard disk. These are meant to be invoked from the shell prompt,
-# by people installing OpenBSD.
+# by people installing NetBSD.
# we know that /etc/fstab is only generated on the hard drive
dest_dir=/
if [ $snapshot = n ]
then
cat "$1".?? | gunzip |
- (cd $dest_dir ; tar -xp"$tarverbose"f -)
+ (cd $dest_dir ; tar --unlink -xp"$tarverbose"f -)
else
cat "$1".tar.gz | gunzip |
- (cd $dest_dir ; tar -xp"$tarverbose"f -)
+ (cd $dest_dir ; tar --unlink -xp"$tarverbose"f -)
fi
}
progs cat chmod chown chroot cp dd df disklabel ed expr fsck ftp
progs gzip ifconfig init ln ls mkdir mknod more mount mount_cd9660
-progs mount_ffs mount_msdos mount_nfs mv newfs pax printf pwd reboot rm route sed
-progs sh shutdown slattach strings stty sync test tip umount update
+progs mount_ffs mount_msdos mount_nfs mv newfs printf pwd reboot rm route sed
+progs sh shutdown slattach strings stty sync tar test tip umount update
ln chown chgrp
ln gzip gzcat gunzip
ln reboot halt
ln sh -sh # init invokes the shell this way
-ln pax tar
ln test [
ln mount_ffs ffs
ln mount_msdos msdos
LINK instbin bin/-sh
LINK instbin bin/stty
LINK instbin bin/sync
-LINK instbin bin/tar
LINK instbin bin/test
LINK instbin bin/[
LINK instbin sbin/disklabel
LINK instbin usr/bin/printf
LINK instbin usr/bin/sed
LINK instbin usr/bin/strings
+LINK instbin usr/bin/tar
LINK instbin usr/bin/tip
LINK instbin usr/sbin/chown
LINK instbin usr/sbin/chroot
-# $OpenBSD: dot.instutils,v 1.2 1996/04/25 21:27:44 niklas Exp $
+#
# $NetBSD: dot.instutils,v 1.2 1995/05/10 13:41:08 leo Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# 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.
+#
-# Installation configuration utilites (functions), to get OpenBSD configured
+# Installation configuration utilites (functions), to get NetBSD configured
# reasonably once it is installed on the hard disk. These are meant to be
-# invoked from the shell prompt, by people installing OpenBSD.
+# invoked from the shell prompt, by people installing NetBSD.
Configure()
{
sync
echo ""
- echo "All that's left to do now is to install the OpenBSD kernel on"
+ echo "All that's left to do now is to install the NetBSD kernel on"
echo "your hard disk. You should now halt your machine using the"
echo "'halt' command. Once the machine is halted, replace the"
echo "installation floppy with the kernel-copy floppy and hit any"
#!/bin/sh
-# $OpenBSD: install.sh,v 1.2 1996/04/25 21:27:46 niklas Exp $
+#
# $NetBSD: install.sh,v 1.2 1995/08/25 19:17:28 leo Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# 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.
+#
-# OpenBSD installation script.
+# NetBSD installation script.
# In a perfect world, this would be a nice C program, with a reasonable
# user interface.
esac
}
-echo "Welcome to the OpenBSD ${VERSION} installation program."
+echo "Welcome to the NetBSD ${VERSION} installation program."
echo ""
-echo "This program is designed to help you put OpenBSD on your hard disk,"
+echo "This program is designed to help you put NetBSD on your hard disk,"
echo "in a simple and rational way. Its main objective is to format,"
echo "mount and create an fstab for your root (/) and user (/usr)"
echo "partitions."
echo "THIS IS YOUR LAST CHANCE!!!"
echo ""
echo "(answering yes will format your root partition on $rdev)"
-echo -n "Are you SURE you want OpenBSD installed on your hard drive? (yes/no) "
+echo -n "Are you SURE you want NetBSD installed on your hard drive? (yes/no) "
answer=""
while [ "$answer" = "" ]; do
getresp
echo ""
echo ""
echo "OK! The preliminary work of setting up your disk is now complete,"
-echo "and you can install the actual OpenBSD software."
+echo "and you can install the actual NetBSD software."
echo ""
echo "Right now, your root is mounted on /mnt and your usr on /mnt/usr."
echo "You should consult the installation notes to determine how to load"
-echo "and install the OpenBSD distribution sets, and how to configure your"
+echo "and install the NetBSD distribution sets, and how to configure your"
echo "system when you are done."
echo ""
echo "GOOD LUCK!"
--- /dev/null
+# $NetBSD: Makefile.inc,v 1.1 1996/05/27 12:49:53 leo Exp $
+
+VND= vnd0c
+IMAGESIZE?= 2160 # 512 byte blocks
+NEWFSOPTS?= -i 3052 -c 60
--- /dev/null
+#
+# $NetBSD: disktab.shadow,v 1.1.1.1 1996/05/19 19:43:39 leo 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)
+#
--- /dev/null
+# $NetBSD: dot.profile,v 1.1.1.1.4.2 1996/07/15 06:33:30 leo Exp $
+#
+# Copyright (c) 1995 Jason R. Thorpe
+# 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 by Christopher G. Demetriou.
+# 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.
+#
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+TERM=vt220
+export TERM
+
+umask 022
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+ DONEPROFILE=YES
+
+ # set up some sane defaults
+ echo 'erase ^H, werase ^W, kill ^U, intr ^C'
+ stty newcrt werase ^W intr ^C kill ^U erase ^H 9600
+
+ # run update, so that installed software is written as it goes.
+ update
+
+ # Select a keyboard map
+ _maps=`ls /usr/share/keymaps/atari | sed 's/\.map//g'`
+ while [ ! -z "$_maps" ]; do
+ echo "The available keyboard maps are:"
+ _num=0
+ for i in $_maps; do
+ echo " $_num $i"
+ _num=`expr $_num + 1`
+ done
+ echo
+ echo -n "Select the number of the map you want to activate: "
+ read _ans
+
+ # Delete all non-nummeric characters from the users answer
+ if [ ! -z "$_ans" ]; then
+ _ans=`echo $_ans | sed 's/[^0-9]//g`
+ fi
+
+ # Check if the answer is valid (in range). Note that an answer
+ # < 0 cannot happen because the sed(1) above also removes the
+ # sign.
+ if [ -z "$_ans" -o "$_ans" -ge $_num ]; then
+ echo "You entered an invalid response, please try again."
+ continue
+ fi
+
+ # Got a valid answer, activate the map...
+ set -- $_maps
+ shift $_ans
+ /usr/sbin/loadkmap -f /usr/share/keymaps/atari/$1.map
+ break
+ done
+
+ # Installing or upgrading?
+ _forceloop=""
+ while [ "X${_forceloop}" = X"" ]; do
+ echo -n '(I)nstall or (U)pgrade? '
+ read _forceloop
+ case "$_forceloop" in
+ i*|I*)
+ /install
+ ;;
+
+ u*|U*)
+ /upgrade
+ ;;
+
+ *)
+ _forceloop=""
+ ;;
+ esac
+ done
+fi
--- /dev/null
+# $NetBSD: install.md,v 1.1.1.1.4.6 1996/08/26 15:45:09 gwr Exp $
+#
+#
+# Copyright (c) 1996 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Jason R. Thorpe.
+#
+# 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 NetBSD
+# Foundation, Inc. and its contributors.
+# 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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.
+#
+
+#
+# machine dependent section of installation/upgrade script.
+#
+
+# Machine-dependent install sets
+MDSETS=""
+
+md_set_term() {
+ if [ ! -z "$TERM" ]; then
+ return
+ fi
+ echo -n "Specify terminal type [vt220]: "
+ getresp "vt220"
+ TERM="$resp"
+ export TERM
+}
+
+__mount_kernfs() {
+ #
+ # Force kern_fs to be mounted
+ #
+ if [ ! -d /kern -o ! -e /kern/msgbuf ]; then
+ mkdir /kern > /dev/null 2>&1
+ /sbin/mount_kernfs /kern /kern >/dev/null 2>&1
+ fi
+}
+
+md_makerootwritable() {
+ # Mount root rw for convenience of the tester ;-)
+ if [ ! -e /tmp/.root_writable ]; then
+ __mount_kernfs
+ # XXX: Use /kern/rootdev instead?
+ mount /dev/rd0 / > /dev/null 2>&1
+ cp /dev/null /tmp/.root_writable
+ fi
+}
+
+md_get_diskdevs() {
+ # return available disk devices
+ __mount_kernfs
+ sed -n -e '/^sd[0-9] /s/ .*//p' \
+ < /kern/msgbuf | sort -u
+}
+
+md_get_cddevs() {
+ # return available CDROM devices
+ __mount_kernfs
+ sed -n -e '/^cd[0-9] /s/ .*//p' \
+ < /kern/msgbuf | sort -u
+}
+
+md_get_ifdevs() {
+ # return available network devices
+ __mount_kernfs
+ sed -n -e '/^ie[0-9] /s/ .*//p' \
+ -e '/^le[0-9] /s/ .*//p' \
+ < /kern/msgbuf | sort -u
+}
+
+md_get_partition_range() {
+ # return an expression describing the valid partition id's
+ echo '[a-p]'
+}
+
+md_installboot() {
+ if [ -x /mnt/usr/mdec/installboot ]; then
+ echo -n "Should a boot block be installed? [y] "
+ getresp "y"
+ case "$resp" in
+ y*|Y*)
+ echo "Installing boot block..."
+ chroot /mnt /usr/mdec/installboot -v $1
+ ;;
+ *)
+ echo "No bootblock installed..."
+ ;;
+ esac
+ elif [ "$MODE" = "install" ]; then
+ cat << \__md_installboot_1
+There is no installboot program found on the installed filesystems. No boot
+programs are installed.
+__md_installboot_1
+ else
+ cat << \__md_installboot_2
+There is no installboot program found on the upgraded filesystems. No boot
+programs are installed.
+__md_installboot_2
+ fi
+}
+
+md_native_fstype() {
+ echo "msdos"
+}
+
+md_native_fsopts() {
+ echo "-G,ro"
+}
+
+md_prep_disklabel()
+{
+ # $1 is the root disk
+ # Note that the first part of this function is just a *very* verbose
+ # version of md_label_disk().
+
+ cat << \__md_prep_disklabel_1
+You now have to prepare your root disk for the installation of NetBSD. This
+is further referred to as 'labeling' a disk.
+
+Hit the <return> key when you have read this...
+__md_prep_disklabel_1
+ getresp ""
+
+ edahdi /dev/r${1}c < /dev/null > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ cat << \__md_prep_disklabel_2
+The disk you wish to install on is partitioned with AHDI or an AHDI compatible
+program. You have to assign some partitions to NetBSD before NetBSD is able
+to use the disk. Change the 'id' of all partitions you want to use for NetBSD
+filesystems to 'NBD'. Change the 'id' of the partition you wish to use for swap
+to 'NBS' or 'SWP'.
+
+Hit the <return> key when you have read this...
+__md_prep_disklabel_2
+ getresp ""
+ edahdi /dev/r${1}c
+ fi
+
+ # display example
+ cat << \__md_prep_disklabel_3
+Here is an example of what the partition information will look like once
+you have entered the disklabel editor. Disk partition sizes and offsets
+are in sector (most likely 512 bytes) units.
+
+[Example]
+partition start (c/t/s) nblks (c/t/s) type
+
+ a (root) 0 (0/00/00) 31392 (109/00/00) 4.2BSD
+ b (swap) 31392 (109/00/00) 73440 (255/00/00) swap
+ c (disk) 0 (0/00/00) 1070496 (3717/00/00) unused
+ d (user) 104832 (364/00/00) 30528 (106/00/00) 4.2BSD
+ e (user) 135360 (470/00/00) 40896 (142/00/00) 4.2BSD
+ f (user) 176256 (612/00/00) 92160 (320/00/00) 4.2BSD
+ g (user) 268416 (932/00/00) 802080 (2785/00/00) 4.2BSD
+
+[End of example]
+
+Hit the <return> key when you have read this...
+
+__md_prep_disklabel_3
+ getresp ""
+ edlabel /dev/r${1}c
+
+ cat << \__md_prep_disklabel_4
+
+You will now be given the opportunity to place disklabels on any additional
+disks on your system.
+__md_prep_disklabel_4
+
+ _DKDEVS=`rmel ${1} ${_DKDEVS}`
+ resp="X" # force at least one iteration
+ while [ "X$resp" != X"done" ]; do
+ labelmoredisks
+ done
+}
+
+md_labeldisk() {
+ edahdi /dev/r${1}c < /dev/null > /dev/null 2>&1
+ [ $? -eq 0 ] && edahdi /dev/r${1}c
+ edlabel /dev/r${1}c
+}
+
+md_welcome_banner() {
+ if [ "$MODE" = "install" ]; then
+ echo ""
+ echo "Welcome to the NetBSD/atari ${VERSION} installation program."
+ cat << \__welcome_banner_1
+
+This program is designed to help you put NetBSD on your disk,
+in a simple and rational way. You'll be asked several questions,
+and it would probably be useful to have your disk's hardware
+manual, the installation notes, and a calculator handy.
+__welcome_banner_1
+
+ else
+ echo ""
+ echo "Welcome to the NetBSD/atari ${VERSION} upgrade program."
+ cat << \__welcome_banner_2
+
+This program is designed to help you upgrade your NetBSD system in a
+simple and rational way.
+
+As a reminder, installing the `etc' binary set is NOT recommended.
+Once the rest of your system has been upgraded, you should manually
+merge any changes to files in the `etc' set into those files which
+already exist on your system.
+__welcome_banner_2
+ fi
+
+cat << \__welcome_banner_3
+
+As with anything which modifies your disk's contents, this
+program can cause SIGNIFICANT data loss, and you are advised
+to make sure your data is backed up before beginning the
+installation process.
+
+Default answers are displayed in brackets after the questions.
+You can hit Control-C at any time to quit, but if you do so at a
+prompt, you may have to hit return. Also, quitting in the middle of
+installation may leave your system in an inconsistent state.
+
+__welcome_banner_3
+}
+
+md_not_going_to_install() {
+ cat << \__not_going_to_install_1
+
+OK, then. Enter `halt' at the prompt to halt the machine. Once the
+machine has halted, power-cycle the system to load new boot code.
+
+Note: If you wish to have another try. Just type '^D' at the prompt. After
+ a moment, the installer will restart itself.
+
+__not_going_to_install_1
+}
+
+md_congrats() {
+ local what;
+ if [ "$MODE" = "install" ]; then
+ what="installed";
+ else
+ what="upgraded";
+ fi
+ cat << __congratulations_1
+
+CONGRATULATIONS! You have successfully $what NetBSD!
+To boot the installed system, enter halt at the command prompt. Once the
+system has halted, reset the machine and boot from the disk.
+
+Note: If you wish to have another try. Just type '^D' at the prompt. After
+ a moment, the installer will restart itself.
+
+__congratulations_1
+}
+
+md_copy_kernel() {
+ # This is largely a copy of install_disk and install_from_mounted_fs()
+ # with some special frobbing.
+
+ local _directory
+ local _sets
+ local _filename
+ local _f
+
+ if [ -e /netbsd ]; then
+ echo -n "Copying kernel..."
+ cp -p /netbsd /mnt/netbsd
+ echo "done."
+ return
+ fi
+
+cat << \__md_copy_kernel_1
+Your installation set did not include a netbsd kernel on the installation
+filesystem. You are now given the opportunity install it from either the
+kernel-floppy from the distribution or another location on one of your disks.
+
+The following disk devices are installed on your system; please select
+the disk device containing the partition with the netbsd kernel:
+__md_copy_kernel_1
+
+ _DKDEVS=`md_get_diskdevs`
+ echo "$_DKDEVS"
+ echo "fd0"
+ echo ""
+ _DKDEVS="$_DKDEVS fd0" # Might be on the kernel floppy!
+ echo -n "Which is the disk with the kernel? [abort] "
+
+ if mount_a_disk ; then
+ return # couldn't mount the disk
+ fi
+
+ # Get the directory where the file lives
+ resp="" # force one iteration
+ while [ "X${resp}" = X"" ]; do
+ echo "Enter the directory relative to the mount point that"
+ echo -n "contains the file. [${_directory}] "
+ getresp "${_directory}"
+ done
+ _directory=$resp
+
+ _sets=`(cd /mnt2/$_directory; ls netbsd* 2> /dev/null)`
+ if [ -z "$_sets" ]; then
+ echo "There are no NetBSD kernels available in \"$1\""
+ umount -f /mnt2 > /dev/null 2>&1
+ return
+ fi
+ while : ; do
+ echo "The following kernels are available:"
+ echo ""
+
+ for _f in $_sets ; do
+ echo " $_f"
+ done
+ echo ""
+ set -- $_sets
+ echo -n "File name [$1]? "
+ getresp "$1"
+ _f=$resp
+ _filename="/mnt2/$_directory/$_f"
+
+ # Ensure file exists
+ if [ ! -f $_filename ]; then
+ echo "File $_filename does not exist. Check to make"
+ echo "sure you entered the information properly."
+ echo -n "Do you want to retry [y]? "
+ getresp "y"
+ if [ "$resp" = "n" ]; then
+ break
+ fi
+ continue
+ fi
+
+ # Copy the kernel
+ cp $_filename /mnt
+ break
+ done
+ umount -f /mnt2 > /dev/null 2>&1
+}
--- /dev/null
+# $NetBSD: list,v 1.1.1.1.4.2 1996/07/15 06:33:32 leo Exp $
+
+# Atari extra's
+LINK instbin sbin/edahdi
+LINK instbin sbin/edlabel
+LINK instbin sbin/mount_msdos
+LINK instbin sbin/mount_kernfs
+LINK instbin usr/bin/printf
+LINK instbin usr/sbin/loadkmap
+
+# `internal' crunchgen links
+ARGVLINK mount_msdos msdos
+
+# crunchgen source directory specials
+CRUNCHSPECIAL edahdi srcdir /usr/src/sys/arch/atari/stand/edahdi/
+CRUNCHSPECIAL loadkmap srcdir /usr/src/sys/arch/atari/stand/loadkmap/
+
+# copy the MAKEDEV script and make some devices
+COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
+COPY ${DESTDIR}/dev/MAKEDEV.local dev/MAKEDEV.local
+SPECIAL cd dev; sh MAKEDEV floppy
+SPECIAL /bin/rm dev/MAKEDEV
+
+# various files that we need in /etc for the install
+COPY ${ARCHDIR}/disktab.shadow etc/disktab.shadow
+#SYMLINK /tmp/disktab.shadow etc/disktab
+#SYMLINK /tmp/fstab.shadow etc/fstab
+#SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf
+#SYMLINK /tmp/hosts etc/hosts
+
+# and the termcap file
+COPY ${ARCHDIR}/termcap.vt usr/share/misc/termcap
+
+# and the installation scripts
+COPY ${ARCHDIR}/install.md install.md
+COPY ${ARCHDIR}/dot.profile .profile
+
+# and the keyboard maps
+COPYDIR ${DESTDIR}/usr/share/keymaps/atari usr/share/keymaps/atari
+
+# remove the /usr/share/zoneinfo directory, so the installation script
+# can determine that the atari install does not support it.
+SPECIAL rmdir usr/share/zoneinfo
--- /dev/null
+#
+# $NetBSD: termcap.vt,v 1.1.1.1 1996/05/19 19:43:36 leo 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
+#
+vt200|vt220|dec-vt220|vt200-js|vt220-js|dec vt200 series with jump scroll:\
+ :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:LE=\E[%dD:\
+ :RI=\E[%dC:UP=\E[%dA:ae=^O:al=\E[L:as=^N:ct=\E[3g:dc=\E[P:dl=\E[M:\
+ :ei=\E[4l:im=\E[4h:k1=\E[17~:k2=\E[18~:k3=\E[19~:k4=\E[20~:\
+ :k5=\E[21~:k6=\E[23~:k7=\E[24~:k8=\E[25~:kD=\E[3~:kH=\E[4~:\
+ :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kh=\E[1~:km:mi:ms:\
+ :if=/usr/share/tabset/vt100:se=\E[27m:st=\EH:ue=\E[24m:\
+ :tc=vt100:
+vt100|dec-vt100|vt100-am|vt100am|dec vt100:\
+ :bl=^G:cr=^M:it#8:\
+ :do=^J:co#80:li#24:cl=50\E[;H\E[2J:sf=2*\ED:\
+ :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:cb=3\E[1K:\
+ :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\
+ :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:\
+ :if=/usr/share/tabset/vt100:\
+ :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\
+ :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
+ :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=2*\EM:vt#3:xn:\
+ :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:
+vt300|vt320|vt300-80|VT 300 with 80 columns, on VMS:\
+ :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
+ :LE=\E[%dD:RI=\E[%dC:SR=1*\E[%dM:UP=\E[%dA:al=\E[L:\
+ :am:bl=^G:bs:cd=2*\E[J:ce=2*\E[K:cl=45\E[H\E[2J:\
+ :cm=%i\E[%d;%dH:co#80:cr=\r:cs=\E[%i%d;%dr:ct=\E[3g:\
+ :dc=\E[P:dl=\E[M:dm=:do=\ED:ec=\E[%dX:ed=:ei=\E[4l:\
+ :ho=\E[H:ic:im=\E[4h:it#8:k1=\EOP:k2=\EOQ:k3=\EOR:\
+ :k4=\EOS:kd=\E[B:ke=\E[?1l\E>:kl=\E[D:kn#4:kr=\E[C:ks=\E[?1h\E=:\
+ :ku=\E[A:le=^H:li#24:mb=\E[5m:md=\E[1m:me=\E[0m:mi:\
+ :mr=\E[7m:ms:nd=\E[C:nl=\ED:nw=\EE:pf=\E[?4i:po=\E[?5i:\
+ :ps=\E[i:rc=\E8:sc=\E7:se=\E[27m:sf=1*\ED:so=\E[7m:\
+ :sr=1*\EM:st=\EH:ue=\E[24m:up=\EM:us=\E[4m:xn:
--- /dev/null
+# $NetBSD: dot.profile,v 1.1 1996/06/11 08:30:13 thorpej Exp $
+#
+# Copyright (c) 1995 Jason R. Thorpe
+# 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 by Christopher G. Demetriou.
+# 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.
+#
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+TERM=hp300h
+export TERM
+
+umask 022
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+ DONEPROFILE=YES
+
+ # set up some sane defaults
+ echo 'erase ^H, werase ^W, kill ^U, intr ^C'
+ stty newcrt werase ^W intr ^C kill ^U erase ^H 9600
+
+ # run update, so that installed software is written as it goes.
+ update
+
+ # get the terminal type
+ _forceloop=""
+ while [ "X${_forceloop}" = X"" ]; do
+ eval `tset -s -m ":?$TERM"`
+ if [ "X${TERM}" != X"unknown" ]; then
+ _forceloop="done"
+ fi
+ done
+
+ # Installing or upgrading?
+ _forceloop=""
+ while [ "X${_forceloop}" = X"" ]; do
+ echo -n '(I)nstall or (U)pgrade? '
+ read _forceloop
+ case "$_forceloop" in
+ i*|I*)
+ /install
+ ;;
+
+ u*|U*)
+ /upgrade
+ ;;
+
+ *)
+ _forceloop=""
+ ;;
+ esac
+ done
+fi
--- /dev/null
+#!/bin/sh
+#
+# $NetBSD: install.md,v 1.1.2.4 1996/08/26 15:45:14 gwr Exp $
+#
+# Copyright (c) 1996 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Jason R. Thorpe.
+#
+# 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 NetBSD
+# Foundation, Inc. and its contributors.
+# 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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.
+#
+
+#
+# machine dependent section of installation/upgrade script
+#
+
+# Machine-dependent install sets
+MDSETS=""
+
+md_set_term() {
+ if [ ! -z "$TERM" ]; then
+ return
+ fi
+ echo -n "Specify terminal type [hp300h]: "
+ getresp "hp300h"
+ TERM="$resp"
+ export TERM
+ # XXX call tset?
+}
+
+md_makerootwritable() {
+ # Was: do_mfs_mount "/tmp" "2048"
+ # /tmp is the mount point
+ # 2048 is the size in DEV_BIZE blocks
+
+ umount /tmp > /dev/null 2>&1
+ if ! mount_mfs -s 2048 swap /tmp ; then
+ cat << \__mfs_failed_1
+
+FATAL ERROR: Can't mount the memory filesystem.
+
+__mfs_failed_1
+ exit
+ fi
+
+ # Bleh. Give mount_mfs a chance to DTRT.
+ sleep 2
+}
+
+md_get_diskdevs() {
+ # return available disk devices
+ dmesg | grep "^rd[0-9]*:." | cut -d":" -f1 | sort -u
+ dmesg | grep "^sd[0-9]*:.*cylinders" | cut -d":" -f1 | sort -u
+}
+
+md_get_cddevs() {
+ # return available CD-ROM devices
+ dmesg | grep "sd[0-9]*:.*CD-ROM" | cut -d":" -f1 | sort -u
+}
+
+md_get_ifdevs() {
+ # return available network interfaces
+ dmesg | grep "^le[0-9]*:" | cut -d":" -f1 | sort -u
+}
+
+md_installboot() {
+ # $1 is the root disk
+
+ echo -n "Installing boot block..."
+ disklabel -W ${1}
+ disklabel -B ${1}
+ echo "done."
+}
+
+md_checkfordisklabel() {
+ # $1 is the disk to check
+
+ disklabel -r $1 > /dev/null 2> /tmp/checkfordisklabel
+ if grep "no disk label" /tmp/checkfordisklabel; then
+ rval="1"
+ elif grep "disk label corrupted" /tmp/checkfordisklabel; then
+ rval="2"
+ else
+ rval="0"
+ fi
+
+ rm -f /tmp/checkfordisklabel
+}
+
+hp300_init_label_scsi_disk() {
+ # $1 is the disk to label
+
+ # Name the disks we install in the temporary fstab.
+ if [ "X${_disk_instance}" = "X" ]; then
+ _disk_instance="0"
+ else
+ _disk_instance=`expr $_disk_instance + 1`
+ fi
+ _cur_disk_name="install-disk-${_disk_instance}"
+
+ # Get geometry information from the user.
+ more << \__scsi_label_1
+
+You will need to provide some information about your disk's geometry.
+Geometry info for SCSI disks was printed at boot time. If that information
+is not available, use the information provided in your disk's manual.
+Please note that the geometry printed at boot time is preferred.
+
+IMPORTANT NOTE: due to a limitation in the disklabel(8) program, the
+number of cylinders on the disk will be increased by 1 so that the initial
+label can be placed on disk for editing. When the disklabel editor appears,
+make absolutely certain you subtract 1 from the total number of cylinders,
+and adjust the size of partition 'c' such that:
+
+ size = (sectors per track) * (tracks per cyl) * (total cylinders)
+
+Note that the disklabel editor will be run twice; once to set the size of
+partition 'c' and correct the geometry, and again so that you may correctly
+edit the partition map. This is to work around the afore mentioned
+limitation in disklabel(8). Apologies offered in advance.
+
+__scsi_label_1
+
+ # Give the opportunity to review the boot messages.
+ echo -n "Review boot messages now? [y] "
+ getresp "y"
+ case "$resp" in
+ y*|Y*)
+ (echo ""; dmesg; echo "") | more
+ ;;
+
+ *)
+ ;;
+ esac
+
+ echo ""
+ echo -n "Number of bytes per disk sector? [512] "
+ getresp "512"
+ _secsize="$resp"
+
+ resp="" # force one iteration
+ while [ "X${resp}" = "X" ]; do
+ echo -n "Number of cylinders? "
+ getresp ""
+ done
+ _cylinders="$resp"
+ _fudge_cyl=`expr $_cylinders + 1`
+
+ resp="" # force one iteration
+ while [ "X${resp}" = "X" ]; do
+ echo -n "Number of tracks (heads)? "
+ getresp ""
+ done
+ _tracks_per_cyl="$resp"
+
+ resp="" # force one iteration
+ while [ "X${resp}" = "X" ]; do
+ echo -n "Number of disk sectors (blocks)? "
+ getresp ""
+ done
+ _nsectors="$resp"
+
+ # Calculate some values we need.
+ _sec_per_cyl=`expr $_nsectors / $_cylinders`
+ _sec_per_track=`expr $_sec_per_cyl / $_tracks_per_cyl`
+ _new_c_size=`expr $_sec_per_track \* $_tracks_per_cyl \* $_cylinders`
+
+ # Emit a disktab entry, suitable for getting started.
+ # What we have is a `c' partition with the total number of
+ # blocks, and an `a' partition with 1 sector; just large enough
+ # to open. Don't ask.
+ echo "" >> /etc/disktab
+ echo "# Created by install" >> /etc/disktab
+ echo "${_cur_disk_name}:\\" >> /etc/disktab
+ echo -n " :ty=winchester:ns#${_sec_per_track}:" >> /etc/disktab
+ echo "nt#${_tracks_per_cyl}:nc#${_fudge_cyl}:\\" >> /etc/disktab
+ echo " :pa#1:\\" >> /etc/disktab
+ echo " :pc#${_nsectors}:" >> /etc/disktab
+
+ # Ok, here's what we need to do. First of all, we install
+ # this initial label by opening the `c' partition of the disk
+ # and using the `-r' flag for disklabel(8). However, because
+ # of limitations in disklabel(8), we've had to fudge the number
+ # of cylinders up 1 so that disklabel(8) doesn't complain about
+ # `c' running past the end of the disk, which can be quite
+ # common even with OEM HP drives! So, we've given ourselves
+ # an `a' partition, which is the minimum needed to open the disk
+ # so that we can perform the DIOCWDLABEL ioctl. So, once the
+ # initial label is installed, we open the `a' partition so that
+ # we can fix up the number of cylinders and make the size of
+ # `c' come out to (ncyl * ntracks_per_cyl * nsec_per_track).
+ # After that's done, we re-open `c' and let the user actually
+ # edit the partition table. It's horrible, I know. Bleh.
+
+ disklabel -W ${1}
+ if ! disklabel -w -r ${1} ${_cur_disk_name}; then
+ echo ""
+ echo "ERROR: can't bootstrap disklabel!"
+ rval="1"
+ return
+ fi
+
+ echo ""
+ echo "The disklabel editor will now start. During this phase, you"
+ echo "must reset the 'cylinders' value to ${_cylinders}, and adjust"
+ echo "the size of partition 'c' to ${_new_c_size}. Do not modify"
+ echo "the partition map at this time. You will have the opportunity"
+ echo "to do so in a moment."
+ echo ""
+ echo -n "Press <return> to continue. "
+ getresp ""
+
+ disklabel -W ${1}
+ if ! disklabel -e /dev/r${1}a; then
+ echo ""
+ echo "ERROR: can't fixup geometry!"
+ rval="1"
+ return
+ fi
+
+ cat << \__explain_motives_2
+
+Now that you have corrected the geometry of your disk, you may edit the
+partition map. Don't forget to fill in the fsize (frag size), bsize
+(filesystem block size), and cpg (cylinders per group) values. If you
+are unsure what these should be, use:
+
+ fsize: 1024
+ bsize: 4096
+ cpg: 16
+
+__explain_motives_2
+ echo -n "Press <return> to continue. "
+ getresp ""
+
+ rval="0"
+ return
+}
+
+hp300_init_label_hpib_disk() {
+ # $1 is the disk to label
+
+ # We look though the boot messages attempting to find
+ # the model number for the provided disk.
+ _hpib_disktype=""
+ if dmesg | grep "${1}: " > /dev/null 2>&1; then
+ _hpib_disktype=HP`dmesg | grep "${1}: " | sort -u | \
+ awk '{print $2}'`
+ fi
+ if [ "X${_hpib_disktype}" = "X" ]; then
+ echo ""
+ echo "ERROR: $1 doesn't appear to exist?!"
+ rval="1"
+ return
+ fi
+
+ # Peer through /etc/disktab to see if the disk has a "default"
+ # layout. If it doesn't, we have to treat it like a SCSI disk;
+ # i.e. prompt for geometry, and create a default to place
+ # on the disk.
+ if ! grep "${_hpib_disktype}[:|]" /etc/disktab > /dev/null \
+ 2>&1; then
+ echo ""
+ echo "WARNING: can't find defaults for $1 ($_hpib_disktype)"
+ echo ""
+ hp300_init_label_scsi_disk $1
+ return
+ fi
+
+ # We've found the defaults. Now use them to place an initial
+ # disklabel on the disk.
+ # XXX What kind of ugliness to we have to deal with to get around
+ # XXX stupidity on the part of disklabel semantics?
+ disklabel -W ${1}
+ if ! disklabel -r -w ${1} $_hpib_disktype; then
+ # Error message displayed by disklabel(8)
+ echo ""
+ echo "ERROR: can't install default label!"
+ echo ""
+ echo -n "Try a different method? [y] "
+ getresp "y"
+ case "$resp" in
+ y*|Y*)
+ hp300_init_label_scsi_disk $1
+ return
+ ;;
+
+ *)
+ rval="1"
+ return
+ ;;
+ esac
+ fi
+
+ rval="0"
+ return
+}
+
+md_labeldisk() {
+ # $1 is the disk to label
+
+ # Check to see if there is a disklabel present on the device.
+ # If so, we can just edit it. If not, we must first install
+ # a default label.
+ md_checkfordisklabel $1
+ case "$rval" in
+ 0)
+ # Go ahead and just edit the disklabel.
+ disklabel -W $1
+ disklabel -e $1
+ ;;
+
+ *)
+ echo -n "No disklabel present, installing a default for type: "
+ case "$1" in
+ rd*)
+ echo "HP-IB"
+ hp300_init_label_hpib_disk $1
+ ;;
+
+ sd*)
+ echo "SCSI"
+ hp300_init_label_scsi_disk $1
+ ;;
+
+ *)
+ # Shouldn't happen, but...
+ echo "unknown?! Giving up."
+ return;
+ ;;
+ esac
+
+ # Check to see if installing the default was
+ # successful. If so, go ahead and pop into the
+ # disklabel editor.
+ if [ "X${rval}" != X"0" ]; then
+ echo "Sorry, can't label this disk."
+ echo ""
+ return;
+ fi
+
+ # We have some defaults installed. Pop into
+ # the disklabel editor.
+ disklabel -W $1
+ if ! disklabel -e $1; then
+ echo ""
+ echo "ERROR: couldn't set partition map for $1"
+ echo ""
+ fi
+ esac
+}
+
+md_prep_disklabel() {
+ # $1 is the root disk
+
+ # Make sure there's a disklabel there. If there isn't, puke after
+ # disklabel prints the error message.
+ md_checkfordisklabel $1
+ case "$resp" in
+ 1)
+ cat << \__md_prep_disklabel_1
+
+FATAL ERROR: There is no disklabel present on the root disk! You must
+label the disk with SYS_INST before continuing.
+
+__md_prep_disklabel_1
+ exit
+ ;;
+
+ 2)
+ cat << \__md_prep_disklabel_2
+
+FATAL ERROR: The disklabel on the root disk is corrupted! You must
+re-label the disk with SYS_INST before continuing.
+
+__md_prep_disklabel_2
+ exit
+ ;;
+
+ *)
+ ;;
+ esac
+
+ # Give the user the opportinuty to edit the root disklabel.
+ cat << \__md_prep_disklabel_3
+
+You have already placed a disklabel onto the target root disk.
+However, due to the limitations of the standalone program used
+you may want to edit that label to change partition type information.
+You will be given the opporunity to do that now. Note that you may
+not change the size or location of any presently open partition.
+
+__md_prep_disklabel_3
+ echo -n "Do you wish to edit the root disklabel? [y] "
+ getresp "y"
+ case "$resp" in
+ y*|Y*)
+ disklabel -W $1
+ disklabel -e $1
+ ;;
+
+ *)
+ ;;
+ esac
+
+ cat << \__md_prep_disklabel_4
+
+You will now be given the opportunity to place disklabels on any additional
+disks on your system.
+__md_prep_disklabel_4
+
+ _DKDEVS=`rmel ${ROOTDISK} ${_DKDEVS}`
+ resp="X" # force at least one iteration
+ while [ "X$resp" != X"done" ]; do
+ labelmoredisks
+ done
+}
+
+md_copy_kernel() {
+ echo -n "Copying kernel..."
+ cp -p /netbsd /mnt/netbsd
+ echo "done."
+}
+
+ # Note, while they might not seem machine-dependent, the
+ # welcome banner and the punt message may contain information
+ # and/or instructions specific to the type of machine.
+
+md_welcome_banner() {
+(
+ echo ""
+ echo "Welcome to the NetBSD/hp300 ${VERSION} installation program."
+ cat << \__welcome_banner_1
+
+This program is designed to help you install NetBSD on your system in a
+simple and rational way. You'll be asked several questions, and it would
+probably be useful to have your disk's hardware manual, the installation
+notes, and a calculator handy.
+
+In particular, you will need to know some reasonably detailed
+information about your disk's geometry. This program can determine
+some limited information about certain specific types of HP-IB disks.
+If you have SCSI disks, however, prior knowledge of disk geometry
+is absolutely essential. The kernel will attempt to display geometry
+information for SCSI disks during boot, if possible. If you did not
+make it note of it before, you may wish to reboot and jot down your
+disk's geometry before proceeding.
+
+As with anything which modifies your hard disk's contents, this
+program can cause SIGNIFICANT data loss, and you are advised
+to make sure your hard drive is backed up before beginning the
+installation process.
+
+Default answers are displyed in brackets after the questions.
+You can hit Control-C at any time to quit, but if you do so at a
+prompt, you may have to hit return. Also, quitting in the middle of
+installation may leave your system in an inconsistent state.
+
+__welcome_banner_1
+) | more
+}
+
+md_not_going_to_install() {
+ cat << \__not_going_to_install_1
+
+OK, then. Enter 'halt' at the prompt to halt the machine. Once the
+machine has halted, power-cycle the system to load new boot code.
+
+__not_going_to_install_1
+}
+
+md_congrats() {
+ cat << \__congratulations_1
+
+CONGRATULATIONS! You have successfully installed NetBSD! To boot the
+installed system, enter halt at the command prompt. Once the system has
+halted, power-cycle the machine in order to load new boot code. Make sure
+you boot from the root disk.
+
+__congratulations_1
+}
+
+md_native_fstype() {
+ # Nothing to do.
+}
+
+md_native_fsopts() {
+ # Nothing to do.
+}
--- /dev/null
+# $NetBSD: list,v 1.1.2.1 1996/06/26 19:41:40 thorpej Exp $
+
+# hp300 extra's
+LINK instbin sbin/disklabel
+LINK instbin sbin/dmesg
+
+SYMLINK ../../instbin usr/bin/basename
+SYMLINK ../../instbin usr/bin/cksum usr/bin/sum
+SYMLINK ../../instbin usr/bin/cut
+SYMLINK ../../instbin usr/bin/gawk usr/bin/awk
+SYMLINK ../../instbin usr/bin/grep usr/bin/egrep usr/bin/fgrep
+SYMLINK ../../instbin usr/bin/netstat
+SYMLINK ../../instbin usr/bin/rsh
+SYMLINK ../../instbin usr/bin/strings
+SYMLINK ../../instbin usr/bin/tset usr/bin/reset
+SYMLINK ../../instbin usr/bin/vi
+SYMLINK ../../instbin usr/bin/less usr/bin/more
+
+# crunchgen source directory specials
+CRUNCHSPECIAL vi srcdir usr.bin/vi/build
+CRUNCHSPECIAL less srcdir /usr/src/usr.bin/less/less
+
+# Minimize use of MFS
+SYMLINK /tmp var/tmp
+
+# copy the MAKEDEV script and make some devices
+COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
+COPY ${DESTDIR}/dev/MAKEDEV.local dev/MAKEDEV.local
+SPECIAL cd dev; sh MAKEDEV all
+SPECIAL /bin/rm dev/MAKEDEV
+
+# we need the contents of /usr/mdec
+COPYDIR ${DESTDIR}/usr/mdec usr/mdec
+
+# the zoneinfo
+COPYDIR ${DESTDIR}/usr/share/zoneinfo usr/share/zoneinfo
+
+# and the termcap file
+COPY ${CURDIR}/../../share/termcap/termcap.src usr/share/misc/termcap
+
+# copy the kernel
+COPY ${CURDIR}/../../sys/arch/hp300/compile/GENERIC/netbsd netbsd
+
+# various files that we need in /etc for the install
+COPY ${DESTDIR}/etc/disktab etc/disktab.shadow
+SYMLINK /tmp/disktab.shadow etc/disktab
+SYMLINK /tmp/fstab.shadow etc/fstab
+SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf
+SYMLINK /tmp/hosts etc/hosts
+
+# and the installation tools
+COPY ${ARCHDIR}/dot.profile .profile
+COPY ${ARCHDIR}/install.md install.md
-# $OpenBSD: dot.commonutils,v 1.2 1996/04/25 21:28:42 niklas Exp $
+#
# $NetBSD: dot.commonutils,v 1.1 1995/07/18 04:13:18 briggs Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# 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.
+#
-# Installation utilites (functions), to get OpenBSD installed on
+# Installation utilites (functions), to get NetBSD installed on
# the hard disk. These are meant to be invoked from the shell prompt,
-# by people installing OpenBSD.
+# by people installing NetBSD.
Set_tmp_dir()
{
LINK raminst bin/-sh
LINK raminst bin/stty
LINK raminst bin/sync
-LINK raminst bin/tar
LINK raminst bin/test
LINK raminst bin/[
LINK raminst sbin/disklabel
LINK raminst usr/bin/printf
LINK raminst usr/bin/sed
LINK raminst usr/bin/strings
+LINK raminst usr/bin/tar
LINK raminst usr/bin/tip
LINK raminst usr/sbin/chown
LINK raminst usr/sbin/chroot
progs cat chmod chown chroot cp dd df disklabel ed expr fsck ftp
progs gzip ifconfig init halt ln ls mkdir mknod more mount mount_cd9660
-progs mount_ffs mount_msdos mount_nfs mv newfs pax printf pwd reboot rm route
-progs sed sh shutdown slattach strings stty sync test tip umount update
+progs mount_ffs mount_msdos mount_nfs mv newfs printf pwd reboot rm route
+progs sed sh shutdown slattach strings stty sync tar test tip umount update
ln chown chgrp
ln gzip gzcat gunzip
ln sh -sh # init invokes the shell this way
-ln pax tar
ln test [
ln mount_ffs ffs
-# $OpenBSD: dot.instutils,v 1.2 1996/04/25 21:28:35 niklas Exp $
+#
# $NetBSD: dot.instutils,v 1.1 1995/07/18 04:13:08 briggs Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# Installation configuration utilites (functions), to get OpenBSD configured
+# Installation configuration utilites (functions), to get NetBSD configured
# reasonably once it is installed on the hard disk. These are meant to be
-# invoked from the shell prompt, by people installing OpenBSD.
+# invoked from the shell prompt, by people installing NetBSD.
Configure()
{
#!/bin/sh
-# $OpenBSD: install.sh,v 1.2 1996/04/25 21:28:38 niklas Exp $
+#
# $NetBSD: install.sh,v 1.1 1995/07/18 04:13:10 briggs Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# 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.
+#
-# OpenBSD installation script.
+# NetBSD installation script.
# In a perfect world, this would be a nice C program, with a reasonable
# user interface.
esac
}
-echo "Welcome to the OpenBSD ${VERSION} installation program."
+echo "Welcome to the NetBSD ${VERSION} installation program."
echo ""
-echo "This program is designed to help you put OpenBSD on your hard disk,"
+echo "This program is designed to help you put NetBSD on your hard disk,"
echo "in a simple and rational way. Its main objective is to format,"
echo "mount and create an fstab for your root (/) and user (/usr)"
echo "partitions."
echo "THIS IS YOUR LAST CHANCE!!!"
echo ""
echo "(answering yes will format your root partition on $rdev)"
-echo -n "Are you SURE you want OpenBSD installed on your hard drive? (yes/no) "
+echo -n "Are you SURE you want NetBSD installed on your hard drive? (yes/no) "
answer=""
while [ "$answer" = "" ]; do
getresp
echo ""
echo ""
echo "OK! The preliminary work of setting up your disk is now complete,"
-echo "and you can install the actual OpenBSD software."
+echo "and you can install the actual NetBSD software."
echo ""
echo "Right now, your root is mounted on /mnt and your usr on /mnt/usr."
echo "You should consult the installation notes to determine how to load"
-echo "and install the OpenBSD distribution sets, and how to configure your"
+echo "and install the NetBSD distribution sets, and how to configure your"
echo "system when you are done."
echo ""
echo "GOOD LUCK!"
-# $NetBSD: Makefile,v 1.2 1996/01/06 22:40:58 pk Exp $
+# $NetBSD: Makefile,v 1.2.4.3 1996/07/04 07:05:32 leo Exp $
-# Revision is 1.1A
-REV= 11A
+# Revision is 1.2
+REV= 12
CBIN= instbin
ARCHDIR= ${.CURDIR}/../${MACHINE}/miniroot
+.if exists(${ARCHDIR}/Makefile.inc)
+.include "${ARCHDIR}/Makefile.inc"
+.endif
+
MOUNT_POINT?= /mnt
-VND?= vnd0
-VND_DEV= /dev/${VND}a
-VND_RDEV= /dev/r${VND}a
-IMAGE?= xxx-${REV}.fs
-MDEC= ${DESTDIR}/usr/mdec
+VND?= vnd0a
+VND_DEV= /dev/${VND}
+VND_RDEV= /dev/r${VND}
+IMAGE?= miniroot-${REV}.fs
+IMAGESIZE?= 10240 # 5Mb in 512 byte blocks
+NEWFSOPTS?=
-LISTS= ${ARCHDIR}/list ${.CURDIR}/list
+LISTS= ${.CURDIR}/list ${ARCHDIR}/list
CRUNCHCONF= ${CBIN}.conf
MTREE= ${.CURDIR}/mtree.conf
+.ifndef DESTDIR
+all:
+ @echo setenv DESTDIR before makeing a miniroot!
+ @false
+.else
+
all: ${CBIN}
- dd if=/dev/zero of=${IMAGE} bs=512k count=10
+ dd if=/dev/zero of=${IMAGE} count=${IMAGESIZE}
vnconfig -v -c ${VND_DEV} ${IMAGE}
- newfs -m 0 -o space ${VND_RDEV} miniroot
+ newfs -m 0 -o space ${NEWFSOPTS} ${VND_RDEV} miniroot
mount ${VND_DEV} ${MOUNT_POINT}
mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
- CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} ARCHDIR=${ARCHDIR} \
+ REV=${REV} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} ARCHDIR=${ARCHDIR} \
TARGDIR=${MOUNT_POINT} sh ${.CURDIR}/runlist.sh ${LISTS}
@echo ""
@df -i ${MOUNT_POINT}
/bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \
${CBIN}.conf *.o *.lo *.c
+.endif # DESTDIR check
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
#!/bin/sh
-# $OpenBSD: install.sh,v 1.2 1996/03/28 21:48:18 niklas Exp $
-# $NetBSD: install.sh,v 1.2 1996/02/28 00:47:42 thorpej Exp $
+# $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
# POSSIBILITY OF SUCH DAMAGE.
#
-# OpenBSD installation script.
+# NetBSD installation script.
# In a perfect world, this would be a nice C program, with a reasonable
# user interface.
# include machine-dependent functions
# The following functions must be provided:
+# md_copy_kernel() - copy a kernel to the installed disk
# md_get_diskdevs() - return available disk devices
# md_get_cddevs() - return available CD-ROM devices
# md_get_ifdevs() - return available network interfaces
+# md_get_partition_range() - return range of valid partition letters
# md_installboot() - install boot-blocks on disk
-# md_checkfordisklabel() - check for valid disklabel
# md_labeldisk() - put label on a disk
+# md_prep_disklabel() - label the root disk
# md_welcome_banner() - display friendly message
# md_not_going_to_install() - display friendly message
# md_congrats() - display friendly message
+# md_native_fstype() - native filesystem type for disk installs
+# md_native_fsopts() - native filesystem options for disk installs
+# md_makerootwritable() - make root writable (at least /tmp)
+
+# include machine dependent subroutines
. install.md
# include common subroutines
. install.sub
+# which sets?
+THESETS="$ALLSETS"
# Good {morning,afternoon,evening,night}.
md_welcome_banner
# Get timezone info
get_timezone
-# We don't like it, but it sure makes a few things a lot easier.
-do_mfs_mount "/tmp" "2048"
+# Make sure we can write files (at least in /tmp)
+# This might make an MFS mount on /tmp, or it may
+# just re-mount the root with read-write enabled.
+md_makerootwritable
# Install the shadowed disktab file; lets us write to it for temporary
# purposes without mounting the miniroot read-write.
getrootdisk
done
-# Make sure there's a disklabel there. If there isn't, puke after
-# disklabel prints the error message.
-md_checkfordisklabel ${ROOTDISK}
-case "$resp" in
- 1)
- cat << \__disklabel_not_present_1
-
-FATAL ERROR: There is no disklabel present on the root disk! You must
-label the disk with SYS_INST before continuing.
-
-__disklabel_not_present_1
- exit
- ;;
-
- 2)
- cat << \__disklabel_corrupted_1
-
-FATAL ERROR: The disklabel on the root disk is corrupted! You must
-re-label the disk with SYS_INST before continuing.
-
-__disklabel_corrupted_1
- exit
- ;;
-
- *)
- ;;
-esac
-
-# Give the user the opportinuty to edit the root disklabel.
-cat << \__disklabel_notice_1
-
-You have already placed a disklabel onto the target root disk.
-However, due to the limitations of the standalone program used
-you may want to edit that label to change partition type information.
-You will be given the opporunity to do that now. Note that you may
-not change the size or location of any presently open partition.
-
-__disklabel_notice_1
-echo -n "Do you wish to edit the root disklabel? [y] "
-getresp "y"
-case "$resp" in
- y*|Y*)
- md_prep_disklabel
- disklabel -W ${ROOTDISK}
- disklabel -e ${ROOTDISK}
- ;;
-
- *)
- ;;
-esac
-
-cat << \__disklabel_notice_2
-
-You will now be given the opportunity to place disklabels on any additional
-disks on your system.
-__disklabel_notice_2
-
-_DKDEVS=`rmel ${ROOTDISK} ${_DKDEVS}`
-resp="X" # force at least one iteration
-while [ "X$resp" != X"done" ]; do
- labelmoredisks
-done
+# Deal with disklabels, including editing the root disklabel
+# and labeling additional disks. This is machine-dependent since
+# some platforms may not be able to provide this functionality.
+md_prep_disklabel ${ROOTDISK}
# Assume partition 'a' of $ROOTDISK is for the root filesystem. Loop and
# get the rest.
# Invalid response; no multiple roots
_first_char="X"
else
- _first_char=`echo ${_mount_point} | \
- cut -c 1`
+ _first_char=`firstchar ${_mount_point}`
fi
done
- echo "${_device_name} ${_mount_point}" >> \
- ${FILESYSTEMS}
+ echo "${_device_name} ${_mount_point}" >> ${FILESYSTEMS}
resp="X" # force loop to repeat
;;
esac
getresp "n"
case "$resp" in
y*|Y*)
- vi ${FILESYSTEMS}
+ ${EDITOR} ${FILESYSTEMS}
;;
*)
;;
# Loop though the file, place filesystems on each device.
echo "Creating filesystems..."
(
- while read line; do
- _device_name=`echo $line | awk '{print $1}'`
+ while read _device_name _junk; do
newfs /dev/r${_device_name}
echo ""
done
getresp "y"
case "$resp" in
y*|Y*)
- echo -n "Enter system hostname: "
resp="" # force at least one iteration
+ if [ -f /etc/myname ]; then
+ resp=`cat /etc/myname`
+ fi
+ echo -n "Enter system hostname: [$resp] "
while [ "X${resp}" = X"" ]; do
- getresp ""
+ getresp "$resp"
done
hostname $resp
echo $resp > /tmp/myname
getresp "n"
case "$resp" in
y*|Y*)
- vi /tmp/hosts
+ ${EDITOR} /tmp/hosts
;;
*)
# Now that the network has been configured, it is safe to configure the
# fstab.
-awk '{
- if ($2 == "/")
- printf("/dev/%s %s ffs rw 1 1\n", $1, $2)
- else
- printf("/dev/%s %s ffs rw 1 2\n", $1, $2)
-}' < ${FILESYSTEMS} > /tmp/fstab
+(
+ while read _dev _mp; do
+ if [ "$mp" = "/" ]; then
+ echo /dev/$_dev $_mp ffs rw 1 1
+ else
+ echo /dev/$_dev $_mp ffs rw 1 2
+ fi
+ done
+) < ${FILESYSTEMS} > /tmp/fstab
echo "The fstab is configured as follows:"
echo ""
getresp "n"
case "$resp" in
y*|Y*)
- vi /tmp/fstab
+ ${EDITOR} /tmp/fstab
;;
*)
munge_fstab /tmp/fstab /tmp/fstab.shadow
mount_fs /tmp/fstab.shadow
-install_sets $ALLSETS
+mount | while read line; do
+ set -- $line
+ if [ "$2" = "/" -a "$3" = "nfs" ]; then
+ echo "You appear to be running diskless."
+ echo -n "Are the install sets on one of your currently mounted filesystems? [n] "
+ getresp "n"
+ case "$resp" in
+ y*|Y*)
+ get_localdir
+ ;;
+ *)
+ ;;
+ esac
+ fi
+done
+
+install_sets $ALLSETS $MDSETS
# Copy in configuration information and make devices in target root.
(
fi
done
- echo -n "Installing timezone link..."
- rm -f /mnt/etc/localtime
- ln -s /usr/share/zoneinfo/$TZ /mnt/etc/localtime
- echo "done."
-
- echo -n "Making devices..."
- pid=`twiddle`
- cd /mnt/dev
- sh MAKEDEV all
- kill $pid
- echo "done."
-
- echo -n "Copying kernel..."
- cp -p /bsd /mnt/bsd
- echo "done."
+ # If no zoneinfo on the installfs, give them a second chance
+ if [ ! -e /usr/share/zoneinfo ]; then
+ get_timezone
+ fi
+ if [ ! -e /mnt/usr/share/zoneinfo ]; then
+ echo "Cannot install timezone link..."
+ else
+ echo -n "Installing timezone link..."
+ rm -f /mnt/etc/localtime
+ ln -s /usr/share/zoneinfo/$TZ /mnt/etc/localtime
+ echo "done."
+ fi
+ if [ ! -x /mnt/dev/MAKEDEV ]; then
+ echo "No /dev/MAKEDEV installed, something is wrong here..."
+ else
+ echo -n "Making devices..."
+ pid=`twiddle`
+ cd /mnt/dev
+ sh MAKEDEV all
+ kill $pid
+ echo "done."
+ fi
+ md_copy_kernel
md_installboot ${ROOTDISK}
)
#!/bin/sh
-# $OpenBSD: install.sub,v 1.3 1996/06/29 05:54:16 tholo Exp $
-# $NetBSD: install.sub,v 1.2 1996/02/28 00:47:43 thorpej Exp $
+# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
# POSSIBILITY OF SUCH DAMAGE.
#
-# OpenBSD installation/upgrade script - common subroutines.
+# NetBSD installation/upgrade script - common subroutines.
-VERSION=1.1A
-export VERSION # XXX needed in subshell
ROOTDISK="" # filled in below
+VERSION= # filled in automatically (see list)
+export VERSION
ALLSETS="base comp etc games man misc text" # default install sets
UPGRSETS="base comp games man misc text" # default upgrade sets
+THESETS= # one of the above
+
+local_sets_dir="" # Path searched for sets by install_sets
+ # on the local filesystems
+
+# decide upon an editor
+if [ X$EDITOR = X ]; then
+ if [ -x /usr/bin/vi ]; then
+ EDITOR=vi
+ else
+ EDITOR=ed
+ fi
+fi
getresp() {
read resp
rmel() {
# remove first argument from list formed by the remaining arguments
+ local _a
+
_a=$1; shift
while [ $# != 0 ]; do
if [ "$_a" != "$1" ]; then
done
}
+cutword () {
+# read a line of data, return Nth element.
+ local _a
+ local _n
+ local _oifs
+
+ # optional field separator
+ _oifs="$IFS"
+ case "$1" in
+ -t?*) IFS=${1#-t}; shift;;
+ esac
+
+ _n=$1
+ read _a; set -- $_a
+ IFS="$_oifs"
+ if [ "$1" = "" ]; then return; fi
+ eval echo \$$_n
+}
+
+cutlast () {
+# read a line of data, return last element. Equiv. of awk '{print $NF}'.
+ local _a
+ local _oifs
+
+ # optional field separator
+ _oifs="$IFS"
+ case "$1" in
+ -t?*) IFS=${1#-t}; shift;;
+ esac
+
+ read _a; set -- $_a
+ IFS="$_oifs"
+ if [ "$1" = "" ]; then return; fi
+ while [ "$#" -gt 10 ]; do shift 10; done
+ eval echo \$$#
+}
+
+firstchar () {
+# return first character of argument
+ local _a
+ _a=$1
+ while [ ${#_a} != 1 ]; do
+ _a=${_a%?}
+ done
+ echo $_a
+}
+
+basename () {
+ local _oifs
+ if [ "$1" = "" ]; then return; fi
+ _oifs="$IFS"
+ IFS="/"
+ set -- $1
+ IFS="$_oifs"
+ while [ "$#" -gt 10 ]; do shift 10; done
+ eval echo \$$#
+}
+
+dir_has_sets() {
+ # return true when the directory $1 contains a set for $2...$n
+ local _dir
+ local _file
+
+ _dir=$1; shift
+ for _file in $*
+ do
+ if [ -f $_dir/${_file}.tar.gz ]; then
+ return 0
+ fi
+ # Try for stupid msdos convention
+ if [ -f $_dir/${_file}.tgz ]; then
+ return 0
+ fi
+ done
+ return 1
+}
+
twiddle() {
# spin the propeller so we don't get bored
while : ; do
done > /dev/tty & echo $!
}
-. install.md
-
-do_mfs_mount() {
- # $1 is the mount point
- # $2 is the size in DEV_BIZE blocks
-
- umount $1 > /dev/null 2>&1
- if ! mount_mfs -s $2 swap $1 ; then
- cat << \__mfs_failed_1
+get_localdir() {
+ # $1 is relative mountpoint
+ local _mp
+ local _dir
-FATAL ERROR: Can't mount the memory filesystem.
-
-__mfs_failed_1
- exit
- fi
-
- # Bleh. Give mount_mfs a chance to DTRT.
- sleep 2
+ _mp=$1
+ _dir=
+ while : ; do
+ echo -n "Enter the pathname where the sets are stored [$_dir] "
+ getresp "$_dir"
+ _dir=$resp
+
+ # Allow break-out with empty response
+ if [ -z "$_dir" ]; then
+ echo -n "Are you sure you don't want to set the pathname? [n] "
+ getresp "n"
+ case "$resp" in
+ y*|Y*)
+ break
+ ;;
+ *)
+ continue
+ ;;
+ esac
+ fi
+
+ if dir_has_sets "$_mp/$_dir" $THESETS
+ then
+ local_sets_dir="$_mp/$_dir"
+ break
+ else
+ cat << __get_reldir_1
+The directory \"$local_sets_dir\" does not exist, or does not hold any of the
+upgrade sets.
+__get_reldir_1
+ echo -n "Re-enter pathname? [y] "
+ getresp "y"
+ case "$resp" in
+ y*|Y*)
+ ;;
+ *)
+ local_sets_dir=""
+ break
+ ;;
+ esac
+ fi
+ done
}
getrootdisk() {
;;
*)
- if echo "$_DKDEVS" | grep "^$resp" > /dev/null ; then
+ if isin $resp $_DKDEVS ; then
md_labeldisk $resp
else
echo ""
echo "127.0.0.1 localhost" > /tmp/hosts
fi
- if grep "^$1 " /tmp/hosts > /dev/null; then
- grep -v "^$1 " /tmp/hosts > /tmp/hosts.new
- mv /tmp/hosts.new /tmp/hosts
- fi
+ sed "/^$1 /d" < /tmp/hosts > /tmp/hosts.new
+ mv /tmp/hosts.new /tmp/hosts
echo "$1 $2 $2.$FQDN" >> /tmp/hosts
}
# $2 - interface symbolic name
# $3 - interface IP address
# $4 - interface netmask
+ # $5 - (optional) interface link-layer directives
# Create a hostname.* file for the interface.
- echo "inet $2 $4" > /tmp/hostname.$1
+ echo "inet $2 $4 NONE $5" > /tmp/hostname.$1
addhostent $3 $2
}
configure_ifs() {
+ local _up
+ local _interface_name
+ local _interface_ip
+ local _interface_mask
+ local _interface_symname
+ local _interface_extra
+
_interface_name=$1
+ set -- `ifconfig $_interface_name | sed -n '
+ 1s/.*<UP,.*$/UP/p
+ 1s/.*<.*>*$/DOWN/p
+ 2s/inet//
+ 2s/--> [0-9.][0-9.]*//
+ 2s/netmask//
+ 2s/broadcast//
+ 2p'`
+
+ _up=$1
+ _interface_ip=$2
+ _interface_mask=$3
+
# Get IP address
resp="" # force one iteration
while [ "X${resp}" = X"" ]; do
- echo -n "IP address? "
- getresp ""
+ echo -n "IP address? [$_interface_ip] "
+ getresp "$_interface_ip"
_interface_ip=$resp
done
# Get netmask
resp="" # force one iteration
while [ "X${resp}" = X"" ]; do
- echo -n "Netmask? "
- getresp ""
+ echo -n "Netmask? [$_interface_mask] "
+ getresp "$_interface_mask"
_interface_mask=$resp
done
+ echo "Your network interface might require additional link-layer"
+ echo "directives (like \`link0'). If this is the case you can enter"
+ echo "these at the next prompt."
+ echo ""
+ echo -n "Additional link-layer arguments? [$_interface_extra] "
+ getresp "$_interface_extra"
+ if [ "X${resp}" != X"" ]; then
+ _interface_extra=$resp
+ fi
+
# Configure the interface. If it
# succeeds, add it to the permanent
# network configuration info.
- ifconfig ${_interface_name} down
- if ifconfig ${_interface_name} inet \
- ${_interface_ip} \
- netmask ${_interface_mask} up ; then
+ if [ $_up != "UP" ]; then
+ ifconfig ${_interface_name} down
+ if ifconfig ${_interface_name} inet \
+ ${_interface_ip} \
+ netmask ${_interface_mask} ${_interface_extra} up ; then
+ addifconfig \
+ ${_interface_name} \
+ ${_interface_symname} \
+ ${_interface_ip} \
+ ${_interface_mask} ${_interface_extra}
+ return 0
+ fi
+ else
+ echo "Interface ${_interface_name} is already active."
+ echo "Just saving configuration on new root filesystem."
addifconfig \
${_interface_name} \
${_interface_symname} \
${_interface_ip} \
- ${_interface_mask}
- return 0
+ ${_interface_mask} ${_interface_extra}
fi
return 1
}
break
fi
- _ftp_file=`echo ${resp} | awk '{print $1}'`
- echo "get ${_ftp_file} |\"tar -xzvpf -\"" >> \
+ _ftp_file=`echo ${resp} | cutword 1'`
+ echo "get ${_ftp_file} |\"tar --unlink -zxvpf -\"" >> \
/tmp/ftp-script.sh
done
echo "Extraction complete."
}
-install_common_nfs_cdrom() {
- # $1 - directory containing file
+install_from_mounted_fs() {
+ # $1 - directory containing installation sets
local _filename
- local _setsdone
- local _prev
+ local _sets
+ local _next
local _f
- _sets=`(cd /mnt2/$1; ls *.tar.gz)`
- if [ -z "$_sets" ]; then
- echo "There are no OpenBSD install sets available in \"$1\""
+ _sets=""
+ if dir_has_sets $1 $THESETS; then
+ for _f in $THESETS ; do
+ if [ -f $1/${_f}.tar.gz ]; then
+ _sets="$_sets ${_f}.tar.gz"
+ elif [ -f $1/${_f}.tgz ]; then
+ _sets="$_sets ${_f}.tgz"
+ fi
+ done
+ else
+ echo "There are no NetBSD install sets available in \"$1\""
return
fi
- _setsdone=""
while : ; do
echo "The following sets are available for extraction:"
echo "(marked sets have already been extracted)"
echo ""
- _prev=""
+ _next=""
for _f in $_sets ; do
if isin $_f $_setsdone; then
echo -n "[X] "
+ _next=""
else
echo -n " "
- if [ -z "$_prev" ]; then _prev=$_f; fi
+ if [ -z "$_next" ]; then _next=$_f; fi
fi
echo $_f
done
echo ""
# Get the name of the file.
- if [ "X$_prev" = "X" ]; then resp=n; else resp=y; fi
+ if [ "X$_next" = "X" ]; then resp=n; else resp=y; fi
echo -n "Continue extraction [$resp]?"
getresp "$resp"
if [ "$resp" = "n" ]; then
break
fi
- echo -n "File name [$_prev]? "
- getresp "$_prev"
+ echo -n "File name [$_next]? "
+ getresp "$_next"
_f=$resp
- _filename="/mnt2/$1/$_f"
+ _filename="/$1/$_f"
# Ensure file exists
if [ ! -f $_filename ]; then
fi
# Extract file
- cat $_filename | (cd /mnt; tar -xzvpf -)
+ cat $_filename | (cd /mnt; tar --unlink -zxvpf -)
echo "Extraction complete."
_setsdone="$_f $_setsdone"
}
install_cdrom() {
+ local _drive
+ local _partition_range
+ local _partition
+ local _fstype
+ local _directory
+
# Get the cdrom device info
cat << \__install_cdrom_1
The following CD-ROM devices are installed on your system; please select
-the CD-ROM device containing the installation media:
+the CD-ROM device containing the partition with the installation sets:
__install_cdrom_1
_CDDEVS=`md_get_cddevs`
*)
if isin $resp $_CDDEVS ; then
- _cdrom_drive=$resp
+ _drive=$resp
else
echo ""
echo "The CD-ROM $resp does not exist."
esac
# Get partition
+ _partition_range=`md_get_partition_range`
resp="" # force one iteration
while [ "X${resp}" = X"" ]; do
echo -n "Partition? [c] "
getresp "c"
case "$resp" in
- [a-h])
- _cdrom_partition=$resp
+ $_partition_range)
+ _partition=$resp
;;
*)
getresp "cd9660"
case "$resp" in
cd9660|ffs)
- _cdrom_filesystem=$resp
+ _fstype=$resp
;;
*)
done
# Mount the CD-ROM
- if ! mount -t ${_cdrom_filesystem} -o ro \
- /dev/${_cdrom_drive}${_cdrom_partition} /mnt2 ; then
+ if ! mount -t ${_filesystem} -o ro \
+ /dev/${_drive}${_partition} /mnt2 ; then
echo "Cannot mount CD-ROM drive. Aborting."
return
fi
resp="" # force one iteration
while [ "X${resp}" = X"" ]; do
echo "Enter the directory relative to the mount point that"
- echo -n "contains the file. [${_cdrom_directory}] "
- getresp "${_cdrom_directory}"
+ echo -n "contains the file. [${_directory}] "
+ getresp "${_directory}"
+ done
+ _directory=$resp
+
+ install_from_mounted_fs /mnt2/${_directory}
+ umount -f /mnt2 > /dev/null 2>&1
+}
+
+mount_a_disk() {
+ # Mount a disk on /mnt2. The set of disk devices to choose from
+ # is $_DKDEVS.
+ # returns 0 on failure.
+
+ local _drive
+ local _partition_range
+ local _partition
+ local _fstype
+ local _fsopts
+ local _directory
+ local _md_fstype
+ local _md_fsopts
+
+ getresp "abort"
+ case "$resp" in
+ abort)
+ echo "Aborting."
+ return 0
+ ;;
+
+ *)
+ if isin $resp $_DKDEVS ; then
+ _drive=$resp
+ else
+ echo ""
+ echo "The disk $resp does not exist."
+ echo "Aborting."
+ return 0
+ fi
+ ;;
+ esac
+
+ # Get partition
+ _partition_range=`md_get_partition_range`
+ resp="" # force one iteration
+ while [ "X${resp}" = X"" ]; do
+ echo -n "Partition? [d] "
+ getresp "d"
+ case "$resp" in
+ $_partition_range)
+ _partition=$resp
+ ;;
+
+ *)
+ echo "Invalid response: $resp"
+ resp="" # force loop to repeat
+ ;;
+ esac
+ done
+
+ # Ask for filesystem type
+ cat << \__mount_a_disk_2
+
+The following filesystem types are supported:
+ 1) ffs
+__mount_a_disk_2
+ _md_fstype=`md_native_fstype`
+ _md_fsopts=`md_native_fsopts`
+ if [ ! -z "$_md_fstype" ]; then
+ echo " 2) $_md_fstype"
+ else
+ _md_fstype="_undefined_"
+ fi
+ resp="" # force one iteration
+ while [ "X${resp}" = X"" ]; do
+ echo -n "Which filesystem type? [ffs] "
+ getresp "ffs"
+ case "$resp" in
+ ffs)
+ _fstype=$resp
+ _fsopts="ro"
+ ;;
+ $_md_fstype)
+ _fstype=$resp
+ _fsopts=$_md_fsopts
+ ;;
+ *)
+ echo "Invalid response: $resp"
+ resp="" # force loop to repeat
+ ;;
+ esac
+ done
+
+ # Mount the disk
+ if ! mount -t ${_fstype} -o $_fsopts \
+ /dev/${_drive}${_partition} /mnt2 ; then
+ echo "Cannot mount disk. Aborting."
+ return 0
+ fi
+ return 1
+}
+
+install_disk() {
+ local _directory
+
+ cat << \__install_disk_1
+
+The following disk devices are installed on your system; please select
+the disk device containing the partition with the installation sets:
+
+__install_disk_1
+ _DKDEVS=`md_get_diskdevs`
+ echo "$_DKDEVS"
+ echo ""
+ echo -n "Which is the disk with the installation sets? [abort] "
+
+ if mount_a_disk ; then
+ return
+ fi
+
+ # Get the directory where the file lives
+ resp="" # force one iteration
+ while [ "X${resp}" = X"" ]; do
+ echo "Enter the directory relative to the mount point that"
+ echo -n "contains the file. [${_directory}] "
+ getresp "${_directory}"
done
- _cdrom_directory=$resp
+ _directory=$resp
- install_common_nfs_cdrom ${_cdrom_directory}
+ install_from_mounted_fs /mnt2/${_directory}
umount -f /mnt2 > /dev/null 2>&1
}
done
_nfs_directory=$resp
- install_common_nfs_cdrom ${_nfs_directory}
+ install_from_mounted_fs /mnt2/${_nfs_directory}
umount -f /mnt2 > /dev/null 2>&1
}
install_tape() {
+ local _xcmd
+
# Get the name of the tape from the user.
cat << \__install_tape_1
echo -n "Which way is it? [1] "
getresp "1"
case "$resp" in
- 1)
- (
- cd /mnt
- dd if=$TAPE | tar -xzvpf -
- )
- ;;
+ 1)
+ _xcmd="tar --unlink -zxvpf -"
+ ;;
- 2)
- (
- cd /mnt
- dd if=$TAPE | tar -xzvpf -
- )
- ;;
+ 2)
+ _xcmd="tar --unlink -xvpf -"
+ ;;
- *)
- echo "Invalid response: $resp."
- resp="" # force loop to repeat
- ;;
+ *)
+ echo "Invalid response: $resp."
+ resp="" # force loop to repeat
+ ;;
esac
+ ( cd /mnt; dd if=$TAPE | $_xcmd )
done
echo "Extraction complete."
}
get_timezone() {
local _a
+ local _zonepath
+
+ #
+ # If the zoneinfo is not on the installation medium or on the
+ # installed filesystem, set TZ to GMT and return immediatly.
+ #
+ if [ ! -e /usr/share/zoneinfo -a ! -e /mnt/usr/share/zoneinfo ]; then
+ TZ=GMT
+ return
+ fi
+ if [ ! -d /usr/share/zoneinfo ]; then
+ _zonepath=/mnt
+ else
+ _zonepath=""
+ fi
+
cat << \__get_timezone_1
Select a time zone for your location. Timezones are represented on the
__get_timezone_1
if [ X$TZ = X ]; then
- TZ=`ls -l /etc/timezone 2>/dev/null | awk '{print $NF}' |
- sed -e 's?/usr/share/zoneinfo/??'`
+ TZ=`ls -l /mnt/etc/localtime 2>/dev/null | cutlast`
+ TZ=${TZ#/usr/share/zoneinfo/}
fi
while :; do
echo -n "What timezone are you in [\`?' for list] [$TZ]? "
break;
;;
"?")
- ls /usr/share/zoneinfo
+ ls ${_zonepath}/usr/share/zoneinfo
;;
*)
_a=$resp
- while [ -d /usr/share/zoneinfo/$_a ]; do
+ while [ -d ${_zonepath}/usr/share/zoneinfo/$_a ]; do
echo -n "There are several timezones available"
echo " within zone '$_a'"
echo -n "Select a sub-timezone [\`?' for list]: "
getresp ""
case "$resp" in
- "?") ls /usr/share/zoneinfo/$_a ;;
+ "?") ls ${_zonepath}/usr/share/zoneinfo/$_a ;;
*) _a=${_a}/${resp}
- if [ -f /usr/share/zoneinfo/$_a ]; then
+ if [ -f ${_zonepath}/usr/share/zoneinfo/$_a ]; then
break;
fi
;;
esac
done
- if [ -f /usr/share/zoneinfo/$_a ]; then
+ if [ -f ${_zonepath}/usr/share/zoneinfo/$_a ]; then
TZ="$_a"
echo "You have selected timezone \"$_a\"".
break 2
install_sets()
{
-# arguments: the base names of the distribution sets to consider
-# Ask the user which media to load the distribution from.
-cat << \__install_sets_1
+ local _yup
+ _yup="FALSE"
+
+ # Ask the user which media to load the distribution from.
+ cat << \__install_sets_1
It is now time to extract the installation sets onto the hard disk.
-Make sure The sets are either on a local device (i.e. tape, CD-ROM) or on a
+Make sure the sets are either on a local device (i.e. tape, CD-ROM) or on a
network server.
__install_sets_1
-if [ -f $RELDIR/$1.tar.gz ]; then
- echo -n "Install from sets in the current root filesystem? [y] "
- getresp "y"
- case "$resp" in
- y*|Y*)
- for _f do
- if [ ! -f $RELDIR/${_f}.tar.gz ]; then
- continue
- fi
- echo -n "Install \"$_f\" ? [y]"
- getresp "y"
+
+ if [ "X$local_sets_dir" != "X" ]; then
+ install_from_mounted_fs ${local_sets_dir}
+ if [ X"$_setsdone" != X ]; then
+ _yup="TRUE"
+ fi
+ fi
+
+ # Go on prodding for alternate locations
+ resp="" # force at least one iteration
+ while [ X"${resp}" = X ]; do
+ # If _yup is not FALSE, it means that we extracted sets above.
+ # If that's the case, bypass the menu the first time.
+ if [ X"$_yup" = X"FALSE" ]; then
+ echo -n "Install from (f)tp, (t)ape, (C)D-ROM, (N)FS"
+ echo -n " or local (d)isk? "
+ getresp ""
case "$resp" in
- y*|Y*)
- cat $RELDIR/${_f}.tar.gz |
- (cd /mnt; tar -xzvpf -)
- _yup="TRUE"
- echo "Extraction complete."
+ d*|D*)
+ install_disk
+ ;;
+ f*|F*)
+ install_ftp
+ ;;
+ t*|T*)
+ install_tape
+ ;;
+ c*|C*)
+ install_cdrom
+ ;;
+ n*|N*)
+ install_nfs
;;
*)
- echo "Skipping \"$_f\"."
+ echo "Invalid response: $resp"
+ resp=""
;;
esac
- done
- ;;
- *)
- _yup="FALSE"
- ;;
- esac
-else
- _yup="FALSE"
-fi
+ else
+ _yup="FALSE" # So we'll ask next time
+ fi
-# Go on prodding for alternate locations
-resp="" # force at least one iteration
-while [ "X${resp}" = X"" ]; do
- # If _yup is not FALSE, it means that we extracted sets above.
- # If that's the case, bypass the menu the first time.
- if [ X"$_yup" = X"FALSE" ]; then
- echo -n "Install from (f)tp, (t)ape, (C)D-ROM, or (N)FS? [f] "
- getresp "f"
+ # Give the user the opportunity to extract more sets. They
+ # don't necessarily have to come from the same media.
+ echo ""
+ echo -n "Extract more sets? [n] "
+ getresp "n"
case "$resp" in
- f*|F*)
- install_ftp
- ;;
-
- t*|T*)
- install_tape
- ;;
-
- c*|C*)
- install_cdrom
- ;;
-
- n*|N*)
- install_nfs
+ y*|Y*)
+ # Force loop to repeat
+ resp=""
;;
*)
- echo "Invalid response: $resp"
- resp=""
;;
esac
- else
- _yup="FALSE" # So we'll ask next time
- fi
-
- # Give the user the opportunity to extract more sets. They don't
- # necessarily have to come from the same media.
- echo ""
- echo -n "Extract more sets? [n] "
- getresp "n"
- case "$resp" in
- y*|Y*)
- # Force loop to repeat
- resp=""
- ;;
-
- *)
- ;;
- esac
-done
+ done
}
munge_fstab()
{
local _fstab
local _fstab_shadow
+ local _dev
+ local _mp
+ local _fstype
+ local _rest
+
# Now that the 'real' fstab is configured, we munge it into a 'shadow'
# fstab which we'll use for mounting and unmounting all of the target
# filesystems relative to /mnt. Mount all filesystems.
_fstab=$1
_fstab_shadow=$2
- awk '{
- if ($2 == "/")
- printf("%s /mnt %s %s %s %s\n", $1, $3, $4, $5, $6)
+ ( while read _dev _mp _fstype _rest; do
+ # Skip comment lines
+ case "$_dev" in
+ \#*) continue;;
+ *) ;;
+ esac
+ # and some filesystem types (like there are swap,kernfs,...)
+ case "$_fstype" in
+ ffs|ufs|nfs) ;;
+ *) continue;;
+ esac
+ if [ "$_mp" = "/" ]; then
+ echo $_dev /mnt $_fstype $_rest
else
- printf("%s /mnt%s %s %s %s %s\n", $1, $2, $3, $4, $5, $6)
- }' < $_fstab > $_fstab_shadow
+ echo $_dev /mnt$_mp $_fstype $_rest
+ fi
+ done ) < $_fstab > $_fstab_shadow
}
mount_fs()
_fstab=$1
( while read line; do
- _dev=`echo $line | awk '{print $1}'`
- _mp=`echo $line | awk '{print $2}'`
- _fstype=`echo $line | awk '{print $3}'`
- _opt=`echo $line | awk '{print $4}'`
+ set -- $line
+ _dev=$1
+ _mp=$2
+ _fstype=$3
+ _opt=$4
# If not the root filesystem, make sure the mount
# point is present.
unmount_fs()
{
# Unmount all filesystems and check their integrity.
- # $1 is a file in fstab format
+ # Usage: [-fast] <fstab file>
+ local _fast
local _fstab
+ local _pid
- _fstab=$1
+ if [ "$1" = "-fast" ]; then
+ _fast=1
+ _fstab=$2
+ else
+ _fast=0
+ _fstab=$1
+ fi
+
+ if [ ! \( -f $_fstab -a -s $_fstab \) ]; then
+ echo "fstab empty" > /dev/tty
+ return
+ fi
- echo -n "Syncing disks..."
- pid=`twiddle`
- sync; sleep 4; sync; sleep 2; sync; sleep 2
- kill $pid
- echo "done."
+ if [ $_fast = 0 ]; then
+ echo -n "Syncing disks..."
+ _pid=`twiddle`
+ sync; sleep 4; sync; sleep 2; sync; sleep 2
+ kill $_pid
+ echo "done."
+ fi
(
_devs=""
_mps=""
# maintain reverse order
while read line; do
- _devs="`echo $line | awk '{print $1}'` ${_devs}"
- _mps="`echo $line | awk '{print $2}'` ${_mps}"
+ set -- $line
+ _devs="$1 ${_devs}"
+ _mps="$2 ${_mps}"
done
echo -n "Umounting filesystems... "
for _mp in ${_mps}; do
done
echo "Done."
+ if [ $_fast = 0 ]; then
+ exit
+ fi
echo "Checking filesystem integrity..."
for _dev in ${_devs}; do
echo "${_dev}"
_devs=""
_mps=""
while read line; do
- _devs="`echo $line | awk '{print $1}'` ${_devs}"
- _mps="`echo $line | awk '{print $2}'` ${_mps}"
+ set -- $line
+ _devs="$1 ${_devs}"
+ _mps="$2 ${_mps}"
done
echo "Checking filesystem integrity..."
-# $NetBSD: list,v 1.3 1996/01/06 22:45:14 pk Exp $
+# $NetBSD: list,v 1.4.4.1 1996/06/20 20:30:26 pk Exp $
+
+SRCDIRS usr.bin bin sbin usr.sbin gnu/usr.bin
# copy the crunched binary, link to it, and kill it
COPY ${OBJDIR}/instbin instbin
LINK instbin bin/stty
LINK instbin bin/sleep
LINK instbin bin/sync
-LINK instbin bin/tar
-LINK instbin bin/test
-LINK instbin bin/[
-LINK instbin sbin/disklabel
-LINK instbin sbin/dmesg
-LINK instbin sbin/fsck
-LINK instbin sbin/halt
+LINK instbin bin/test bin/[
+LINK instbin sbin/fsck_ffs sbin/fsck
+LINK instbin sbin/reboot sbin/halt
LINK instbin sbin/ifconfig
LINK instbin sbin/init
LINK instbin sbin/mknod
LINK instbin sbin/mount_cd9660
LINK instbin sbin/mount_ffs
LINK instbin sbin/mount_nfs
-LINK instbin sbin/newfs
+LINK instbin sbin/newfs sbin/mount_mfs
LINK instbin sbin/ping
-LINK instbin sbin/reboot
LINK instbin sbin/route
LINK instbin sbin/shutdown
LINK instbin sbin/slattach
LINK instbin sbin/umount
-SYMLINK ../../instbin usr/bin/awk
-SYMLINK ../../instbin usr/bin/basename
SYMLINK ../../instbin usr/bin/chflags
-SYMLINK ../../instbin usr/bin/chgrp
-SYMLINK ../../instbin usr/bin/cut
-SYMLINK ../../instbin usr/bin/egrep
-SYMLINK ../../instbin usr/bin/fgrep
+SYMLINK ../../instbin usr/sbin/chown usr/bin/chgrp
+SYMLINK ../../instbin usr/sbin/chroot
SYMLINK ../../instbin usr/bin/ftp
-SYMLINK ../../instbin usr/bin/grep
-SYMLINK ../../instbin usr/bin/gunzip
-SYMLINK ../../instbin usr/bin/gzcat
-SYMLINK ../../instbin usr/bin/gzip
-SYMLINK ../../instbin usr/bin/more
-SYMLINK ../../instbin usr/bin/netstat
-SYMLINK ../../instbin usr/bin/rsh
+SYMLINK ../../instbin usr/bin/gzip usr/bin/gunzip usr/bin/gzcat
SYMLINK ../../instbin usr/bin/sed
-SYMLINK ../../instbin usr/bin/strings
SYMLINK ../../instbin usr/bin/sort
+SYMLINK ../../instbin usr/bin/tar
SYMLINK ../../instbin usr/bin/tip
-SYMLINK ../../instbin usr/bin/tset
-SYMLINK ../../instbin usr/bin/vi
-SYMLINK ../../instbin usr/sbin/chown
-SYMLINK ../../instbin usr/sbin/chroot
SYMLINK ../../instbin usr/sbin/update
-# Minimize use of MFS
-SYMLINK /tmp var/tmp
-
-# copy the MAKEDEV script and make some devices
-COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
-COPY ${DESTDIR}/dev/MAKEDEV.local dev/MAKEDEV.local
-SPECIAL cd dev; sh MAKEDEV all
-SPECIAL /bin/rm dev/MAKEDEV
+# `internal' crunchgen links
+ARGVLINK mount_ffs ffs
+ARGVLINK mount_nfs nfs
+ARGVLINK mount_cd9660 cd9660
+ARGVLINK sh -sh
# various files that we need in /etc for the install
COPY ${DESTDIR}/etc/group etc/group
COPY ${DESTDIR}/etc/services etc/services
COPY ${DESTDIR}/etc/spwd.db etc/spwd.db
-# the zoneinfo
-COPYDIR ${DESTDIR}/usr/share/zoneinfo usr/share/zoneinfo
-
-# and the termcap file
-COPY ${CURDIR}/../../share/termcap/termcap.src usr/share/misc/termcap
-
# and the installation scripts
COPY ${CURDIR}/install.sub install.sub
COPY ${CURDIR}/install.sh install
COPY ${CURDIR}/upgrade.sh upgrade
+SPECIAL sed "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/install.sub > install.sub
SPECIAL chmod 755 install upgrade
-# $NetBSD: list2sh.awk,v 1.1 1995/12/18 22:47:30 pk Exp $
+# $NetBSD: list2sh.awk,v 1.2 1996/05/04 15:45:31 pk Exp $
BEGIN {
printf("cd ${OBJDIR}\n");
}
$1 == "LINK" {
printf("echo '%s'\n", $0);
- printf("rm -f ${TARGDIR}/%s\n", $3);
- printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $3);
+ for (i = 3; i <= NF; i++) {
+ printf("rm -f ${TARGDIR}/%s\n", $i);
+ printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $i);
+ }
next;
}
$1 == "SYMLINK" {
printf("echo '%s'\n", $0);
- printf("rm -f ${TARGDIR}/%s\n", $3);
- printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $3);
+ for (i = 3; i <= NF; i++) {
+ printf("rm -f ${TARGDIR}/%s\n", $i);
+ printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $i);
+ }
+ next;
+}
+$1 == "ARGVLINK" {
+ # crunchgen directive; ignored here
+ next;
+}
+$1 == "SRCDIRS" {
+ # crunchgen directive; ignored here
+ next;
+}
+$1 == "CRUNCHSPECIAL" {
+ # crunchgen directive; ignored here
next;
}
$1 == "COPYDIR" {
-# $NetBSD: makeconf.awk,v 1.2 1995/12/19 00:54:08 pk Exp $
+# $NetBSD: makeconf.awk,v 1.3 1996/05/04 15:45:32 pk Exp $
+
+#
+# generate crunchgen(1) configuration file from `list' spec.
+#
BEGIN {
- # a list of `aliases'
- links["[",0] = "test";
- links["awk",0] = "gawk";
- links["chgrp",0] = "chown";
- links["egrep",0] = "grep";
- links["fgrep",0] = "grep";
- links["gzcat",0] = "gzip";
- links["gunzip",0] = "gzip";
- links["halt",0] = "reboot";
- links["reset",0] = "tset";
- links["rrestore",0] = "restore";
- links["sum",0] = "cksum";
- links["uncompress",0] = "compress";
- links["vi",0] = "common"; # XXX catch vi
- links["zcat",0] = "compress";
-
- argvlinks["mount_ffs"] = "ffs"; # mount invokes mount_* this way
- argvlinks["mount_nfs"] = "nfs";
- argvlinks["mount_cd9660"] = "cd9660";
- argvlinks["sh"] = "-sh"; # init invokes the shell this way
+ printf("#\n# This file is automatically generated by `makeconf'\n#\n\n");
+ printf("\nlibs -ledit -lutil -lcurses -ltermcap -lcrypt -ll -lm -lkvm\n");
+
+}
+
+$1 == "SRCDIRS" {
+ $1 = tolower($1);
+ print;
}
($1 == "LINK" || $1 == "SYMLINK") && index($2,CBIN) {
+ # find basenames for inclusion in crunchgen's `prog' and `ln' directives
n = split($3, x, "/");
p = x[n];
- if ((p,0) in links) {
- links[p,1] = links[p,0];
- p = links[p,0];
+ progs[p] = NF - 3;
+ for (i = 4; i <= NF; i++) {
+ n = split($i, x, "/");
+ l = x[n];
+ links[i - 3, p] = l;
}
- progs[p] = 1;
- if (argvlinks[p])
- links[argvlinks[p],1] = p;
+}
+
+$1 == "ARGVLINK" {
+ # add extra `ln' entries (these don't appear in the filesystem)
+ n = progs[$2];
+ progs[$2] = ++n;
+ links[n, $2] = $3;
+}
+
+$1 == "CRUNCHSPECIAL" {
+ # collect crunchgen `special' directives
+ $1 = "";
+ specials[$0] = 1;
}
END {
# write crunchgen configuration
- printf("#\n# This file is automatically generated by `makeconf'\n#\n");
- printf("srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin usr.bin/vi\n");
-
- i = 0;
+ # `prog' directives; print 8 to a line
+ column = 0;
for (p in progs) {
- if ((i++ % 8) == 0)
+ if ((column++ % 8) == 0)
printf("\nprogs");
printf(" %s", p);
}
printf("\n\n");
- for (I in links) {
- split(I, l, SUBSEP);
- if (l[2])
- printf("ln %s %s\n", links[l[1],1], l[1]);
+ # `ln' directives
+ for (p in progs) {
+ n = progs[p];
+ for (i = 1; i <= n; i++)
+ printf("ln %s %s\n", p, links[i,p]);
}
+ printf("\n\n");
- printf("\nlibs -ledit -lutil -lcurses -ltermcap -lcrypt -ll -lm -lkvm\n");
+ # `special' directives
+ for (s in specials) {
+ printf("special %s\n", s);
+ }
}
-# $NetBSD: mtree.conf,v 1.1 1995/12/18 22:47:33 pk Exp $
+# $NetBSD: mtree.conf,v 1.1.4.2 1996/07/15 06:29:38 leo Exp $
/set type=dir uname=root gname=wheel mode=0755
# .
# ./usr/share/zoneinfo
..
+# ./usr/share/keymaps
+keymaps
+# ./usr/share/keymaps
+
+# ./usr/share/keymaps/atari
+atari
+# ./usr/share/keymaps/atari
+..
+
+# ./usr/share/keymaps
+..
+
# ./usr/share
..
#!/bin/sh
-# $OpenBSD: upgrade.sh,v 1.2 1996/03/28 21:48:20 niklas Exp $
-# $NetBSD: upgrade.sh,v 1.2 1996/02/28 00:47:45 thorpej Exp $
+# $NetBSD: upgrade.sh,v 1.2.4.5 1996/08/27 18:15:08 gwr Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
# POSSIBILITY OF SUCH DAMAGE.
#
-# OpenBSD installation script.
+# NetBSD installation script.
# In a perfect world, this would be a nice C program, with a reasonable
# user interface.
-VERSION=1.1
-export VERSION # XXX needed in subshell
ROOTDISK="" # filled in below
-trap "umount /tmp > /dev/null 2>&1" 0
+trap "unmount_fs -fast /tmp/fstab.shadow > /dev/null 2>&1; rm -f /tmp/fstab.shadow" 0
MODE="upgrade"
# include machine-dependent functions
# The following functions must be provided:
+# md_copy_kernel() - copy a kernel to the installed disk
# md_get_diskdevs() - return available disk devices
# md_get_cddevs() - return available CD-ROM devices
# md_get_ifdevs() - return available network interfaces
+# md_get_partition_range() - return range of valid partition letters
# md_installboot() - install boot-blocks on disk
-# md_checkfordisklabel() - check for valid disklabel
# md_labeldisk() - put label on a disk
# md_welcome_banner() - display friendly message
# md_not_going_to_install() - display friendly message
# md_congrats() - display friendly message
+
+# include machine dependent subroutines
. install.md
# include common subroutines
. install.sub
+# which sets?
+THESETS="$UPGRSETS"
+
# Good {morning,afternoon,evening,night}.
md_welcome_banner
echo -n "Proceed with upgrade? [n] "
# XXX Work around vnode aliasing bug (thanks for the tip, Chris...)
ls -l /dev > /dev/null 2>&1
-# We don't like it, but it sure makes a few things a lot easier.
-do_mfs_mount "/tmp" "2048"
+# Make sure we can write files (at least in /tmp)
+# This might make an MFS mount on /tmp, or it may
+# just re-mount the root with read-write enabled.
+md_makerootwritable
while [ "X${ROOTDISK}" = "X" ]; do
getrootdisk
done
-# Make sure there's a disklabel there. If there isn't, puke after
-# disklabel prints the error message.
-md_checkfordisklabel ${ROOTDISK}
-case $rval in
- 1)
- cat << \__disklabel_not_present_1
-
-FATAL ERROR: There is no disklabel present on the root disk! You must
-label the disk with SYS_INST before continuing.
-
-__disklabel_not_present_1
- exit
- ;;
-
- 2)
- cat << \__disklabel_corrupted_1
-
-FATAL ERROR: The disklabel on the root disk is corrupted! You must
-re-label the disk with SYS_INST before continuing.
-
-__disklabel_corrupted_1
- exit
- ;;
-
- *)
- ;;
-esac
-
# Assume partition 'a' of $ROOTDISK is for the root filesystem. Confirm
# this with the user. Check and mount the root filesystem.
resp="" # force one iteration
echo "ERROR: no /etc/fstab!"
exit 1
fi
-cp /mnt/etc/fstab /tmp/fstab
# Grab the hosts table so we can use it.
if [ ! -f /mnt/etc/hosts ]; then
esac
# Now that the network has been configured, it is safe to configure the
-# fstab. We remove all but ufs/ffs/nfs.
+# fstab. We remove all but ufs/ffs.
(
- rm -f /tmp/fstab.new
- while read line; do
- _fstype=`echo $line | awk '{print $3}'`
+ > /tmp/fstab
+ while read _dev _mp _fstype _rest ; do
if [ "X${_fstype}" = X"ufs" -o \
- "X${_fstype}" = X"ffs" -o \
- "X${_fstype}" = X"nfs" ]; then
- echo $line >> /tmp/fstab.new
+ "X${_fstype}" = X"ffs" ]; then
+ if [ "X${_fstype}" = X"ufs" ]; then
+ # Convert ufs to ffs.
+ _fstype=ffs
+ fi
+ echo "$_dev $_mp $_fstype $_rest" >> /tmp/fstab
fi
done
-) < /tmp/fstab
-
-if [ ! -f /tmp/fstab.new ]; then
- echo "ERROR: strange fstab!"
- exit 1
-fi
-
-# Convert ufs to ffs.
-sed -e 's/ufs/ffs/' < /tmp/fstab.new > /tmp/fstab
-rm -f /tmp/fstab.new
+) < /mnt/etc/fstab
echo "The fstab is configured as follows:"
echo ""
getresp "n"
case "$resp" in
y*|Y*)
- vi /tmp/fstab
+ ${EDITOR} /tmp/fstab
;;
*)
# Mount filesystems.
mount_fs /tmp/fstab.shadow
+echo -n "Are the upgrade sets on one of your normally mounted (local) filesystems? [y] "
+getresp "y"
+case "$resp" in
+ y*|Y*)
+ get_localdir /mnt
+ ;;
+ *)
+ ;;
+esac
+
# Install sets.
-install_sets $UPGRSETS
+install_sets
# Get timezone info
get_timezone
# Fix up the fstab.
echo -n "Converting ufs to ffs in /etc/fstab..."
-sed -e 's/ufs/ffs/' < /mnt/etc/fstab > /tmp/fstab
+(
+ > /tmp/fstab
+ while read _dev _mp _fstype _rest ; do
+ if [ "X${_fstype}" = X"ufs" ]; then
+ # Convert ufs to ffs.
+ _fstype=ffs
+ fi
+ echo "$_dev $_mp $_fstype $_rest" >> /tmp/fstab
+ done
+) < /mnt/etc/fstab
echo "done."
echo -n "Would you like to edit the resulting fstab? [y] "
getresp "y"
case "$resp" in
y*|Y*)
- vi /tmp/fstab
+ ${EDITOR} /tmp/fstab
;;
*)
echo "done."
echo -n "Making devices..."
- pid=`twiddle`
+ _pid=`twiddle`
cd /mnt/dev
sh MAKEDEV all
- kill $pid
+ kill $_pid
echo "done."
- echo -n "Copying kernel..."
- cp -p /bsd /mnt/bsd
- echo "done."
+ md_copy_kernel
md_installboot ${ROOTDISK}
)
-# $Id: Makefile.inc,v 1.3 1995/12/14 07:00:30 deraadt Exp $
+# $Id: Makefile.inc,v 1.4 1996/09/05 21:26:44 deraadt Exp $
-# Revision is 1.1
-REV= 11
+# Revision is 1.2
+REV= 12
-# $OpenBSD: Makefile.inc,v 1.3 1996/04/25 21:30:33 niklas Exp $
-# $NetBSD: Makefile.inc,v 1.5 1995/11/28 23:58:56 jtc Exp $
+# $NetBSD: Makefile.inc,v 1.5.4.2 1996/08/07 07:29:42 phil Exp $
# TOP is assumed to be defined by Makefile including this one.
PWDOBJ= ${PWDSRC}
.endif
-all: bsd
+all: netbsd
dd if=/dev/zero of=${IMAGE} bs=18k count=80
disklabel -r -w ${.OBJDIR}/${IMAGE} boot3 2>/dev/null
-yes|bim -c init -c "add ${MDEC}/boot boot" -c "default 0" \
vnconfig -v -c ${VND_DEV} ${IMAGE}
newfs -b 8192 -f 1024 -O -m 0 -o space -i 204800 -c 80 ${VND_RDEV} boot3
mount ${VND_DEV} ${MOUNT_POINT}
- cp bsd ${MOUNT_POINT}/bsd
+ cp netbsd ${MOUNT_POINT}/netbsd
@df -i ${MOUNT_POINT}
@echo ""
umount ${MOUNT_POINT}
vnconfig -u ${VND_DEV}
-inject.fs: ${CBIN} ${LISTS} bsd.gz
+inject.fs: ${CBIN} ${LISTS} netbsd.gz
(cd ${PWDSRC}; ${MAKE})
- ${CC} -static -o pwd_mkdb ${PWDOBJ}/*.o
+ ${CC} -static -o pwd_mkdb ${PWDOBJ}/*.o -lutil
+.ifndef SD
dd if=/dev/zero of=${.TARGET} bs=128k count=16
vnconfig -v -c ${VND_DEV} ${.TARGET}
newfs -b 8192 -f 1024 -O -m 0 -o space -i 7168 ${VND_RDEV} rd
mount ${VND_DEV} ${MOUNT_POINT}
+.else
+ newfs -b 8192 -f 1024 -O -m 0 -o space -i 7168 -s 4096 \
+ -t 1 -u 256 /dev/r${SD}
+ mount /dev/${SD} ${MOUNT_POINT}
+.endif
mtree -def ${MTREE} -p ${MOUNT_POINT}/ -u
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS}
@df -i ${MOUNT_POINT}
@echo ""
umount ${MOUNT_POINT}
+.ifndef SD
vnconfig -u ${VND_DEV}
+.else
+ dd if=/dev/${SD} of=${.TARGET} bs=128k count=16
+.endif
unconfig:
-umount -f ${MOUNT_POINT}
-/bin/rm -f ${IMAGE}
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
- (cd ${COMMONDIR}; ${MAKE} download.o)
crunchgen -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${CRUNCHCONF}
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
inject: ${COMMONDIR}/inject.c
-bsd.gz:
- gzip -9 <${ADIR}/compile/DEFAULT/bsd >bsd.gz
-# cp ${ADIR}/compile/DEFAULT/bsd /var/tmp/$$$$; \
+netbsd.gz:
+ gzip -9 <${ADIR}/compile/DEFAULT/netbsd >netbsd.gz
+# cp ${ADIR}/compile/DEFAULT/netbsd /var/tmp/$$$$; \
# strip /var/tmp/$$$$; \
-# gzip -9 </var/tmp/$$$$ >bsd.gz; \
+# gzip -9 </var/tmp/$$$$ >netbsd.gz; \
# rm /var/tmp/$$$$
-bsd.o: inject cloak inject.fs
- cp ${ADIR}/compile/INSTALL/bsd /var/tmp/$$$$; \
+netbsd.o: inject cloak inject.fs
+ cp ${ADIR}/compile/INSTALL/netbsd /var/tmp/$$$$; \
strip /var/tmp/$$$$; \
./inject /var/tmp/$$$$ inject.fs; \
- gzip -9 </var/tmp/$$$$ | ./cloak >bsd.o; \
+ gzip -9 </var/tmp/$$$$ | ./cloak >netbsd.o; \
rm /var/tmp/$$$$
go.o: ${COMMONDIR}/go.c
-bsd: bsd.o go.o
- ld -s -z -T 240000 -e _go go.o netbsd.o ${MDEC}/zboot.o -o bsd
+netbsd: netbsd.o go.o
+ ld -s -z -T 240000 -e _go go.o netbsd.o ${MDEC}/zboot.o -o netbsd
clean cleandir:
/bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.c
- /bin/rm -f bsd* inject* cloak pwd_mkdb
+ /bin/rm -f netbsd* inject* cloak pwd_mkdb
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
* (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: cloak.c,v 1.1.1.1 1995/10/18 08:37:42 deraadt Exp $
+ * $Id: cloak.c,v 1.2 1996/09/05 21:26:50 deraadt Exp $
*/
#include <stdio.h>
-# $OpenBSD: dot.commonutils,v 1.5 1996/06/29 05:54:20 tholo Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
# 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: dot.commonutils,v 1.6 1996/09/05 21:26:51 deraadt Exp $
-# Installation utilites (functions), to get OpenBSD installed on
+# Installation utilites (functions), to get NetBSD installed on
# the hard disk. These are meant to be invoked from the shell prompt,
-# by people installing OpenBSD.
+# by people installing NetBSD.
# we know that /etc/fstab is only generated on the hard drive
dest_dir=/
fi
# counter for possible shared library confusion
-TAR=/bin/tar
+TAR=/usr/bin/tar
GUNZIP=/usr/bin/gunzip
Set_tmp_dir()
echo -n "continue..."
read foo
echo "Extracting files from the tape..."
- $TAR -xvpf /dev/$which
+ $TAR --unlink -xvpf /dev/$which
echo "Done."
}
tarverbose=
;;
esac
- cat "$1"* | $GUNZIP | (cd $dest_dir ; $TAR -xp"$tarverbose"f - )
+ cat "$1"* | $GUNZIP | (cd $dest_dir ; $TAR --unlink -xp"$tarverbose"f - )
}
xd()
-/* $OpenBSD: download.c,v 1.2 1996/04/25 21:30:37 niklas Exp $ */
/* $NetBSD: download.c,v 1.1 1995/10/06 21:00:16 phil Exp $ */
/*
- Hacked by Phil Nelson for use with OpenBSD, 10/5/95.
+ Hacked by Phil Nelson for use with NetBSD, 10/5/95.
This source is in the public domain except for the makeraw function.
The upload part of this program is taken from Bruce's ROM debugger
code.
- For OpenBSD, the usages are:
+ For NetBSD, the usages are:
download file
- open "file" and ship it out standard output with the
-/* $OpenBSD: go.c,v 1.2 1996/04/25 21:30:41 niklas Exp $ */
-
/*
* Copyright (c) 1995 Matthias Pfaller.
* All rights reserved.
* 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: go.c,v 1.3 1996/09/05 21:26:53 deraadt Exp $
*/
#include <sys/reboot.h>
register r6 asm("r6");
/*
- * In order to install OpenBSD on 4mb machines, OpenBSD must survive an
- * overflow of the real kernel into the bsd image. So the compressed kernel
- * image has to be linked in front of the uncompressing code. This code
- * fragment sets the default root disk to rd0 and then jumps behind the
- * compressed kernel image.
+ * In order to install netbsd on 4mb machines, netbsd must survive an overflow
+ * of the real kernel into the netbsd image. So the compressed kernel image
+ * has to be linked in front of the uncompressing code. This code fragment
+ * sets the default root disk to rd0 and then jumps behind the compressed
+ * kernel image.
*/
go()
* (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: inject.c,v 1.1.1.1 1995/10/18 08:37:42 deraadt Exp $
+ * $Id: inject.c,v 1.2 1996/09/05 21:26:54 deraadt Exp $
*/
#include <stdio.h>
#
# kcbin.conf - unified binary for the kc floppy
-# $Id: instbin.conf,v 1.4 1996/06/29 05:54:21 tholo Exp $
+# $Id: instbin.conf,v 1.5 1996/09/05 21:26:55 deraadt Exp $
#
-srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin games
+srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin games distrib/pc532/floppies
-progs basename bc bim cat chat chmod chown chroot cp
-progs date dd df dirname disklabel dmesg domainname download dump
-progs expr factor find fsck ftp
-progs gawk gzip hostname hexdump ifconfig init
-progs kill kvm_mkdb ln ls mkdir mknod more
+progs chat download less pppstats vi
+progs basename bc bim cat chmod chown chroot cp
+progs date dd df dirname disklabel dmesg domainname dump
+progs expr factor find fsck_ffs ftp
+progs gzip hostname hexdump ifconfig init
+progs kill kvm_mkdb ln ls mkdir mknod
progs mount mount_cd9660 mount_ffs mount_msdos mount_nfs mt mv netstat newfs
-progs pax ping pppd pppstats ps pwd rcp reboot restore rm rmdir route
+progs ping pppd ps pwd rcp reboot restore rm rmdir route
progs sed sh slattach strings stty swapon sync sysctl
-progs test tip traceroute umount update vi
+progs tar test tip traceroute umount update
-special chat srcdir /usr/src/usr.sbin/pppd/chat
-special pppstats srcdir /usr/src/usr.sbin/pppd/pppstats
-special vi srcdir /usr/src/usr.bin/vi/common
-special download srcdir /usr/src/distrib/pc532/floppies/inst-common
+special chat srcdir usr.sbin/pppd/chat
+special download srcdir distrib/pc532/floppies/inst-common
+special download objs download.o
+special pppstats srcdir usr.sbin/pppd/pppstats
+special less srcdir usr.bin/less/less
+special vi srcdir usr.bin/vi/build
+ln fsck_ffs fsck
+ln less more
ln chown chgrp
ln dump rdump
-ln gawk awk
ln gzip gzcat gunzip
ln sh -sh # init invokes the shell this way
ln test [
ln mount_ffs ffs
ln mount_msdos msdos
ln mount_nfs nfs
-ln pax tar
ln restore rrestore
ln vi ex
ln vi view
-# $OpenBSD: list,v 1.5 1996/06/29 05:54:21 tholo Exp $
+# $Id: list,v 1.6 1996/09/05 21:26:56 deraadt Exp $
# copy the MAKEDEV script and make some devices
COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
SPECIAL /bin/rm pwd_mkdb
# copy the crunched binary, link to it
-COPY ${OBJDIR}/bsd.gz bsd.gz
+COPY ${OBJDIR}/netbsd.gz netbsd.gz
COPY ${OBJDIR}/instbin instbin
LINK instbin bin/cat
LINK instbin bin/chmod
LINK instbin bin/sh
LINK instbin bin/stty
LINK instbin bin/sync
-LINK instbin bin/tar
LINK instbin bin/test
LINK instbin bin/[
LINK instbin sbin/bim
LINK instbin sbin/slattach
LINK instbin sbin/swapon
LINK instbin sbin/umount
-SYMLINK /instbin usr/bin/awk
SYMLINK /instbin usr/bin/basename
SYMLINK /instbin usr/bin/chgrp
SYMLINK /instbin usr/bin/dirname
SYMLINK /instbin usr/bin/gzcat
SYMLINK /instbin usr/bin/gzip
SYMLINK /instbin usr/bin/more
+SYMLINK /instbin usr/bin/less
SYMLINK /instbin usr/bin/netstat
SYMLINK /instbin usr/bin/sed
SYMLINK /instbin usr/bin/strings
+SYMLINK /instbin usr/bin/tar
SYMLINK /instbin usr/bin/tip
SYMLINK /instbin usr/bin/vi
SYMLINK /instbin usr/bin/view
0x400000 Top of physical RAM for 4mb machine
0x3EB800 Start of boot code
0x288000 Start of ramdisk when booting from rd0
-0x240000 Start of bsd image (may overflow into rd0 image)
-0x002000 Start of kernel (may overflow into bsd image)
+0x240000 Start of netbsd image (may overflow into rd0 image)
+0x002000 Start of kernel (may overflow into netbsd image)
-# $Id: mtree.conf,v 1.2 1995/12/14 07:00:37 deraadt Exp $
+# $Id: mtree.conf,v 1.3 1996/09/05 21:26:58 deraadt Exp $
/set type=dir uname=root gname=wheel mode=0755
# .
-# $Id: Makefile,v 1.1.1.1 1995/10/18 08:37:43 deraadt Exp $
+# $Id: Makefile,v 1.2 1996/09/05 21:26:46 deraadt Exp $
TOP= ${.CURDIR}/..
-# $OpenBSD: dot.hdprofile,v 1.2 1996/04/25 21:30:26 niklas Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
# 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: dot.hdprofile,v 1.3 1996/09/05 21:26:46 deraadt Exp $
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/games:/
export PATH
. /.commonutils
. /.instutils
- echo "Follow the installation directions to install the OpenBSD"
+ echo "Follow the installation directions to install the NetBSD"
echo "distribution sets."
fi
-# $OpenBSD: dot.instutils,v 1.2 1996/04/25 21:30:28 niklas Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
# 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: dot.instutils,v 1.3 1996/09/05 21:26:47 deraadt Exp $
-# Installation configuration utilites (functions), to get OpenBSD configured
+# Installation configuration utilites (functions), to get NetBSD configured
# reasonably once it is installed on the hard disk. These are meant to be
-# invoked from the shell prompt, by people installing OpenBSD.
+# invoked from the shell prompt, by people installing NetBSD.
Configure()
{
# (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: dot.profile,v 1.1.1.1 1995/10/18 08:37:43 deraadt Exp $
+# $Id: dot.profile,v 1.2 1996/09/05 21:26:47 deraadt Exp $
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/games:/
export PATH
#!/bin/sh
-# $OpenBSD: install.sh,v 1.5 1996/06/29 05:54:20 tholo Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
# 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: install.sh,v 1.6 1996/09/05 21:26:48 deraadt Exp $
-# OpenBSD installation script.
+# NetBSD installation script.
# In a perfect world, this would be a nice C program, with a reasonable
# user interface.
fi
}
-echo "Welcome to the OpenBSD ${VERSION} installation program."
+echo "Welcome to the NetBSD ${VERSION} installation program."
echo ""
-echo "This program is designed to help you put OpenBSD on your hard disk,"
+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 "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 OpenBSD printed when booting."
+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 -n "Number of bytes per disk sector? [512] "
swap=0
while [ $swap -eq 0 ]; do
- echo "$units_left $sizeunit remaining in OpenBSD portion of disk."
+ echo "$units_left $sizeunit remaining in NetBSD portion of disk."
echo -n "Swap partition size (in $sizeunit)? "
getresp
case $resp in
boot=0
while [ $boot -eq 0 ]; do
- echo "$units_left $sizeunit remaining in OpenBSD portion of disk."
+ echo "$units_left $sizeunit remaining in NetBSD portion of disk."
echo -n "Boot partition size (in $sizeunit)? "
getresp
case $resp in
$DONTDOIT mount -u /dev/rd0 /
cat /etc/disktab.preinstall > $DT
echo "" >> $DT
-echo "$labelname|OpenBSD installation generated:\\" >> $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 " :ph#${_size}:oh#${_offset}:th=boot:\\" >> $DT
echo "You will now have to enter information about any other partitions"
-echo "to be created in the OpenBSD portion of the disk. This process will"
-echo "be complete when you've filled up all remaining space in the OpenBSD"
+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
units_left=`expr $partition - $part_used`
while [ $part_size -eq 0 ]; do
echo ""
- echo -n "$units_left $sizeunit remaining in OpenBSD portion of "
+ echo -n "$units_left $sizeunit remaining in NetBSD portion of "
echo "the disk"
echo -n "Next partition size (in $sizeunit)? "
getresp
echo ""
echo "THIS IS YOUR LAST CHANCE!!!"
echo ""
-echo -n "Are you SURE you want OpenBSD installed on your hard drive? (yes/no) "
+echo -n "Are you SURE you want NetBSD installed on your hard drive? (yes/no) "
answer=""
while [ "$answer" = "" ]; do
getresp
echo ""
echo "Populating filesystems with bootstrapping binaries and config files"
-$DONTDOIT tar -cfX - . | (cd /mnt ; tar -xpf - )
+$DONTDOIT tar --one-file-system -cf - . | (cd /mnt ; tar --unlink -xpf - )
$DONTDOIT cp /tmp/.hdprofile /mnt/.profile
-$DONTDOIT gzip -d /mnt/bsd.gz
+$DONTDOIT gzip -d /mnt/netbsd.gz
echo ""
echo -n "Creating an fstab..."
echo ""
echo "The remaining tasks are:"
echo ""
-echo "To load and install the OpenBSD distribution sets."
+echo "To load and install the NetBSD distribution sets."
echo "Currently the hard drive's root filesystem is mounted on /mnt"
echo ""
echo "Consult the installation notes which will describe how to"
-# $Id: list,v 1.1.1.1 1995/10/18 08:37:43 deraadt Exp $
+# $Id: list,v 1.2 1996/09/05 21:26:48 deraadt Exp $
# the disktab explanation file
COPY disktab.preinstall etc
-# $Id: list2sh.awk,v 1.1.1.1 1995/10/18 08:37:41 deraadt Exp $
+# $Id: list2sh.awk,v 1.2 1996/09/05 21:26:44 deraadt Exp $
BEGIN {
printf("cd ${CURDIR}\n");
-# $Id: runlist.sh,v 1.1.1.1 1995/10/18 08:37:41 deraadt Exp $
+# $Id: runlist.sh,v 1.2 1996/09/05 21:26:45 deraadt Exp $
if [ "X$1" = "X-d" ]; then
SHELLCMD=cat
-# $Id: Makefile,v 1.1.1.1 1995/10/18 08:37:43 deraadt Exp $
+# $Id: Makefile,v 1.2 1996/09/05 21:27:00 deraadt Exp $
TOP= ${.CURDIR}/..
-# $OpenBSD: dot.hdprofile,v 1.2 1996/04/25 21:30:52 niklas Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
# 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: dot.hdprofile,v 1.3 1996/09/05 21:27:01 deraadt Exp $
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
export PATH
. /.commonutils
. /.upgrutils
- echo "Follow the installation directions to install the OpenBSD"
+ echo "Follow the installation directions to install the NetBSD"
echo "distribution sets."
fi
# (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: dot.profile,v 1.1.1.1 1995/10/18 08:37:43 deraadt Exp $
+# $Id: dot.profile,v 1.2 1996/09/05 21:27:02 deraadt Exp $
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
export PATH
-# $OpenBSD: dot.upgrutils,v 1.2 1996/04/25 21:30:56 niklas Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
# 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: dot.upgrutils,v 1.3 1996/09/05 21:27:03 deraadt Exp $
# Upgrade cleanup utilites (functions), to make sure a recently-upgraded
# system is safely runnable. These are meant to be invoked from the shell
-# prompt, by people installing OpenBSD.
+# prompt, by people installing NetBSD.
Cleanup()
{
echo "Done."
echo ""
- echo "All that's left to do now is to install a new OpenBSD kernel"
+ echo "All that's left to do now is to install a new NetBSD kernel"
echo "on your hard disk. You should now halt your machine using"
echo "the 'halt' command. Once the machine is halted, replace the"
echo "installation floppy with the kernel-copy floppy and hit any"
-# $Id: list,v 1.1.1.1 1995/10/18 08:37:43 deraadt Exp $
+# $Id: list,v 1.2 1996/09/05 21:27:04 deraadt Exp $
# and the upgrade tools
COPY dot.profile .profile
#!/bin/sh
-# $OpenBSD: upgrade.sh,v 1.3 1996/06/29 05:54:21 tholo Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
# 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: upgrade.sh,v 1.4 1996/09/05 21:27:06 deraadt Exp $
-# OpenBSD upgrade script.
+# NetBSD upgrade script.
# In a perfect world, this would be a nice C program, with a reasonable
# user interface.
fi
}
-echo "Welcome to the OpenBSD ${VERSION} upgrade program."
+echo "Welcome to the NetBSD ${VERSION} upgrade program."
echo ""
-echo "This program is designed to help you put the new version of OpenBSD"
+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 ""
echo "Copying bootstrapping binaries and config files to the hard drive..."
$DONTDOIT cp /mnt/.profile /mnt/.profile.bak
-$DONTDOIT pax -rw -X -k . /mnt
+$DONTDOIT tar --exclude etc --one-file-system -cf - . | (cd /mnt ; tar --unlink -xpf - )
$DONTDOIT mv /mnt/etc/rc /mnt/etc/rc.bak
$DONTDOIT cp /tmp/.hdprofile /mnt/.profile
echo ""
echo ""
echo "OK! The preliminary work of setting up your disk is now complete,"
-echo "and you can now upgrade the actual OpenBSD software."
+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 "OpenBSD distribution sets, and how to clean up after the upgrade"
+echo "NetBSD distribution sets, and how to clean up after the upgrade"
echo "software, when you are done."
echo ""
echo "GOOD LUCK!"
-# $OpenBSD: install.md,v 1.2 1996/03/28 21:48:22 niklas Exp $
-# $NetBSD: install.md,v 1.2 1996/02/28 00:50:28 thorpej Exp $
+# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# machine dependent section of installation/upgrade script.
#
+# Machine-dependent install sets
+MDSETS="xbin xman xinc xcon"
+
md_set_term() {
if [ ! -z "$TERM" ]; then
return
export TERM
}
+md_makerootwritable() {
+ # Was: do_mfs_mount "/tmp" "2048"
+ # /tmp is the mount point
+ # 2048 is the size in DEV_BIZE blocks
+
+ umount /tmp > /dev/null 2>&1
+ if ! mount_mfs -s 2048 swap /tmp ; then
+ cat << \__mfs_failed_1
+
+FATAL ERROR: Can't mount the memory filesystem.
+
+__mfs_failed_1
+ exit
+ fi
+
+ # Bleh. Give mount_mfs a chance to DTRT.
+ sleep 2
+}
+
md_get_diskdevs() {
# return available disk devices
dmesg | egrep "(^sd[0-9] |^x[dy][0-9] )" | cut -d" " -f1 | sort -u
dmesg | egrep "(^le[0-9] |^ie[0-9] )" | cut -d" " -f1 | sort -u
}
+md_get_partition_range() {
+ # return range of valid partition letters
+ echo "[a-h]"
+}
+
md_installboot() {
echo "Installing boot block..."
- /usr/mdec/binstall -v ffs /mnt
+ /usr/mdec/binstall ffs /mnt
+}
+
+md_native_fstype() {
+}
+
+md_native_fsopts() {
}
md_checkfordisklabel() {
# $1 is the disk to check
+ local rval
disklabel $1 > /dev/null 2> /tmp/checkfordisklabel
if grep "no disk label" /tmp/checkfordisklabel; then
- rval="1"
+ rval=1
elif grep "disk label corrupted" /tmp/checkfordisklabel; then
- rval="2"
+ rval=2
else
- rval="0"
+ rval=0
fi
rm -f /tmp/checkfordisklabel
+ return $rval
}
md_prep_disklabel()
{
+ local _disk
+
+ _disk=$1
+ md_checkfordisklabel $_disk
+ case $? in
+ 0)
+ echo -n "Do you wish to edit the disklabel on $_disk? [y]"
+ ;;
+ 1)
+ echo "WARNING: Disk $_disk has no label"
+ echo -n "Do you want to create one with the disklabel editor? [y]"
+ ;;
+ 2)
+ echo "WARNING: Label on disk $_disk is corrupted"
+ echo -n "Do you want to try and repair the damage using the disklabel editor? [y]"
+ ;;
+ esac
+
+ getresp "y"
+ case "$resp" in
+ y*|Y*) ;;
+ *) return ;;
+ esac
+
# display example
cat << \__md_prep_disklabel_1
+
Here is an example of what the partition information will look like once
you have entered the disklabel editor. Disk partition sizes and offsets
are in sector (most likely 512 bytes) units. Make sure these size/offset
[End of example]
__md_prep_disklabel_1
+ echo -n "Press [Enter] to continue "
+ getresp ""
+ disklabel -W ${_disk}
+ disklabel -e ${_disk}
+}
+
+md_copy_kernel() {
+ echo -n "Copying kernel..."
+ cp -p /netbsd /mnt/netbsd
+ echo "done."
}
md_welcome_banner() {
{
if [ "$MODE" = "install" ]; then
echo ""
- echo "Welcome to the OpenBSD/sparc ${VERSION} installation program."
+ echo "Welcome to the NetBSD/sparc ${VERSION} installation program."
cat << \__welcome_banner_1
-This program is designed to help you put OpenBSD on your disk,
+This program is designed to help you put NetBSD on your disk,
in a simple and rational way. You'll be asked several questions,
and it would probably be useful to have your disk's hardware
manual, the installation notes, and a calculator handy.
else
echo ""
- echo "Welcome to the OpenBSD/sparc ${VERSION} upgrade program."
+ echo "Welcome to the NetBSD/sparc ${VERSION} upgrade program."
cat << \__welcome_banner_2
-This program is designed to help you upgrade your OpenBSD system in a
+This program is designed to help you upgrade your NetBSD system in a
simple and rational way.
As a reminder, installing the `etc' binary set is NOT recommended.
to make sure your data is backed up before beginning the
installation process.
-Default answers are displyed in brackets after the questions.
+Default answers are displayed in brackets after the questions.
You can hit Control-C at any time to quit, but if you do so at a
prompt, you may have to hit return. Also, quitting in the middle of
installation may leave your system in an inconsistent state.
fi
cat << __congratulations_1
-CONGRATULATIONS! You have successfully $what OpenBSD!
+CONGRATULATIONS! You have successfully $what NetBSD!
To boot the installed system, enter halt at the command prompt. Once the
system has halted, reset the machine and boot from the disk.
-# $OpenBSD: list,v 1.3 1996/04/25 21:31:40 niklas Exp $
-# $NetBSD: list,v 1.2 1996/01/06 22:42:17 pk Exp $
+# $NetBSD: list,v 1.2.4.2 1996/06/26 19:25:00 pk Exp $
-# We can only get this program this way.
-COPY ${DESTDIR}/sbin/mount_mfs sbin/mount_mfs
-SPECIAL chmod 555 sbin/mount_mfs
+# Sparc extra's
+LINK instbin sbin/disklabel
+LINK instbin sbin/dmesg
+
+SYMLINK ../../instbin usr/bin/basename
+SYMLINK ../../instbin usr/bin/cksum usr/bin/sum
+SYMLINK ../../instbin usr/bin/cut
+SYMLINK ../../instbin usr/bin/gawk usr/bin/awk
+SYMLINK ../../instbin usr/bin/getopt
+SYMLINK ../../instbin usr/bin/grep usr/bin/egrep usr/bin/fgrep
+SYMLINK ../../instbin usr/bin/netstat
+SYMLINK ../../instbin usr/bin/rsh
+SYMLINK ../../instbin usr/bin/strings
+SYMLINK ../../instbin usr/bin/tset usr/bin/reset
+SYMLINK ../../instbin usr/bin/vi
+SYMLINK ../../instbin usr/bin/less usr/bin/more
+SYMLINK ../../instbin usr/sbin/installboot
+SYMLINK ../../instbin usr/sbin/sysctl
+
+# crunchgen source directory specials
+CRUNCHSPECIAL vi srcdir usr.bin/vi/build
+CRUNCHSPECIAL less srcdir usr.bin/less/less
+CRUNCHSPECIAL installboot srcdir sys/arch/sparc/stand/installboot
+
+
+# Minimize use of MFS
+SYMLINK /tmp var/tmp
+
+# copy the MAKEDEV script and make some devices
+COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
+COPY ${DESTDIR}/dev/MAKEDEV.local dev/MAKEDEV.local
+SPECIAL cd dev; sh MAKEDEV all
+SPECIAL /bin/rm dev/MAKEDEV
# we need the contents of /usr/mdec
COPYDIR ${DESTDIR}/usr/mdec usr/mdec
+# the zoneinfo
+COPYDIR ${DESTDIR}/usr/share/zoneinfo usr/share/zoneinfo
+
+# and the termcap file
+COPY ${CURDIR}/../../share/termcap/termcap.src usr/share/misc/termcap
+
# copy the kernel
-COPY ${CURDIR}/../../sys/arch/sparc/compile/GENERIC/bsd bsd
+COPY ${CURDIR}/../../sys/arch/sparc/compile/GENERIC/netbsd netbsd
# various files that we need in /etc for the install
COPY ${DESTDIR}/etc/disktab etc/disktab.shadow
-# $NetBSD: Makefile.inc,v 1.2 1995/10/13 16:01:02 gwr Exp $
+# $NetBSD: Makefile.inc,v 1.2.6.1 1996/08/29 03:10:06 gwr Exp $
-# Revision is 1.1
-REV= 11
+# Revision is 1.2
+REV= 12
LDSTATIC= -static
-# $NetBSD: RunList.awk,v 1.1.1.1 1995/10/08 23:07:46 gwr Exp $
+# $NetBSD: RunList.awk,v 1.1.1.1.6.1 1996/08/29 03:10:58 gwr Exp $
BEGIN {
printf("cd ${CURDIR}\n");
printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $3);
next;
}
+$1 == "SYMLINK" {
+ printf("echo '%s'\n", $0);
+ printf("(cd ${TARGDIR}; rm -f %s; ln -s %s %s)\n", $3, $2, $3);
+ next;
+}
$1 == "SPECIAL" {
printf("echo '%s'\n", $0);
printf("(cd ${TARGDIR};");
--- /dev/null
+# $NetBSD: install.md,v 1.2.2.1 1996/08/29 03:33:48 gwr Exp $
+#
+#
+# Copyright (c) 1996 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Jason R. Thorpe.
+#
+# 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 NetBSD
+# Foundation, Inc. and its contributors.
+# 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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.
+#
+
+#
+# machine dependent section of installation/upgrade script.
+#
+
+# Machine-dependent install sets
+# MDSETS="xbin xman xinc xcon" XXX
+MDSETS=""
+
+md_set_term() {
+ if [ ! -z "$TERM" ]; then
+ return
+ fi
+ echo -n "Specify terminal type [sun]: "
+ getresp "sun"
+ TERM="$resp"
+ export TERM
+}
+
+__mount_kernfs() {
+ # Make sure kernfs is mounted.
+ if [ ! -d /kern -o ! -e /kern/msgbuf ]; then
+ mkdir /kern > /dev/null 2>&1
+ /sbin/mount_kernfs /kern /kern >/dev/null 2>&1
+ fi
+}
+
+md_makerootwritable() {
+ # Just remount the root device read-write.
+ if [ ! -e /tmp/.root_writable ]; then
+ __mount_kernfs
+ echo "Remounting root read-write..."
+ mount -u /kern/rootdev /
+ cp /dev/null /tmp/.root_writable
+ fi
+}
+
+md_get_diskdevs() {
+ # return available disk devices
+ __mount_kernfs
+ sed -n -e '/^sd[0-9] /s/ .*//p' \
+ -e '/^xd[0-9] /s/ .*//p' \
+ -e '/^xy[0-9] /s/ .*//p' \
+ < /kern/msgbuf | sort -u
+}
+
+md_get_cddevs() {
+ # return available CDROM devices
+ __mount_kernfs
+ sed -n -e '/^cd[0-9] /s/ .*//p' \
+ < /kern/msgbuf | sort -u
+}
+
+md_get_ifdevs() {
+ # return available network devices
+ __mount_kernfs
+ sed -n -e '/^ie[0-9] /s/ .*//p' \
+ -e '/^le[0-9] /s/ .*//p' \
+ < /kern/msgbuf | sort -u
+}
+
+md_get_partition_range() {
+ # return an expression describing the valid partition id's
+ echo '[a-h]'
+}
+
+md_installboot() {
+ # install the boot block on disk $1
+ echo "Installing boot block..."
+ ( cd /usr/mdec ;\
+ cp -p ./ufsboot /mnt/ufsboot ;\
+ sync ; sleep 1 ; sync ;\
+ ./installboot -v /mnt/ufsboot bootxx /dev/r${1}a )
+ echo "done."
+}
+
+md_native_fstype() {
+}
+
+md_native_fsopts() {
+}
+
+md_checkfordisklabel() {
+ # $1 is the disk to check
+ local rval
+
+ disklabel $1 > /dev/null 2> /tmp/checkfordisklabel
+ if grep "no disk label" /tmp/checkfordisklabel; then
+ rval=1
+ elif grep "disk label corrupted" /tmp/checkfordisklabel; then
+ rval=2
+ else
+ rval=0
+ fi
+
+ rm -f /tmp/checkfordisklabel
+ return $rval
+}
+
+md_prep_disklabel()
+{
+ local _disk
+
+ _disk=$1
+ md_checkfordisklabel $_disk
+ case $? in
+ 0)
+ echo -n "Do you wish to edit the disklabel on $_disk? [y]"
+ ;;
+ 1)
+ echo "WARNING: Disk $_disk has no label"
+ echo -n "Do you want to create one with the disklabel editor? [y]"
+ ;;
+ 2)
+ echo "WARNING: Label on disk $_disk is corrupted"
+ echo -n "Do you want to try and repair the damage using the disklabel editor? [y]"
+ ;;
+ esac
+
+ getresp "y"
+ case "$resp" in
+ y*|Y*) ;;
+ *) return ;;
+ esac
+
+ # display example
+ cat << \__md_prep_disklabel_1
+
+Here is an example of what the partition information will look like once
+you have entered the disklabel editor. Disk partition sizes and offsets
+are in sector (most likely 512 bytes) units. Make sure these size/offset
+pairs are on cylinder boundaries (the number of sector per cylinder is
+given in the `sectors/cylinder' entry, which is not shown here).
+
+Do not change any parameters except the partition layout and the label name.
+It's probably also wisest not to touch the `8 partitions:' line, even
+in case you have defined less than eight partitions.
+
+[Example]
+8 partitions:
+# size offset fstype [fsize bsize cpg]
+ a: 50176 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 111)
+ b: 64512 50176 swap # (Cyl. 112 - 255)
+ c: 640192 0 unknown # (Cyl. 0 - 1428)
+ d: 525504 114688 4.2BSD 1024 8192 16 # (Cyl. 256 - 1428)
+[End of example]
+
+__md_prep_disklabel_1
+ echo -n "Press [Enter] to continue "
+ getresp ""
+ edlabel /dev/r${_disk}c
+}
+
+md_copy_kernel() {
+ echo -n "Copying kernel..."
+ cp -p /netbsd /mnt/netbsd
+ echo "done."
+}
+
+md_welcome_banner() {
+ if [ "$MODE" = "install" ]; then
+ echo ""
+ echo "Welcome to the NetBSD/sun3 ${VERSION} installation program."
+ cat << \__welcome_banner_1
+
+This program is designed to help you put NetBSD on your disk,
+in a simple and rational way. You'll be asked several questions,
+and it would probably be useful to have your disk's hardware
+manual, the installation notes, and a calculator handy.
+__welcome_banner_1
+
+ else
+ echo ""
+ echo "Welcome to the NetBSD/sun3 ${VERSION} upgrade program."
+ cat << \__welcome_banner_2
+
+This program is designed to help you upgrade your NetBSD system in a
+simple and rational way.
+
+As a reminder, installing the `etc' binary set is NOT recommended.
+Once the rest of your system has been upgraded, you should manually
+merge any changes to files in the `etc' set into those files which
+already exist on your system.
+__welcome_banner_2
+ fi
+
+cat << \__welcome_banner_3
+
+As with anything which modifies your disk's contents, this
+program can cause SIGNIFICANT data loss, and you are advised
+to make sure your data is backed up before beginning the
+installation process.
+
+Default answers are displayed in brackets after the questions.
+You can hit Control-C at any time to quit, but if you do so at a
+prompt, you may have to hit return. Also, quitting in the middle of
+installation may leave your system in an inconsistent state.
+
+__welcome_banner_3
+}
+
+md_not_going_to_install() {
+ cat << \__not_going_to_install_1
+
+OK, then. Enter `halt' at the prompt to halt the machine. Once the
+machine has halted, power-cycle the system to load new boot code.
+
+__not_going_to_install_1
+}
+
+md_congrats() {
+ local what;
+ if [ "$MODE" = "install" ]; then
+ what="installed";
+ else
+ what="upgraded";
+ fi
+ cat << __congratulations_1
+
+CONGRATULATIONS! You have successfully $what NetBSD!
+To boot the installed system, enter halt at the command prompt. Once the
+system has halted, reset the machine and boot from the disk.
+
+__congratulations_1
+}
#
-# $NetBSD: mini_usr.conf,v 1.2 1995/11/21 21:18:59 gwr Exp $
+# $NetBSD: mini_usr.conf,v 1.2.6.1 1996/08/29 03:12:10 gwr Exp $
#
# common/mini_usr.conf
#
progs basename chflags cksum cmp cut ftp
progs rsh sed strings tftp
+srcdirs gnu/usr.bin
+progs sort
+
ln chown chgrp
#
-# $NetBSD: mini_usr.list,v 1.2 1995/11/21 21:19:00 gwr Exp $
+# $NetBSD: mini_usr.list,v 1.2.6.1 1996/08/29 03:12:45 gwr Exp $
#
# copy the crunched binary, link to it, and kill it
LINK mini_usr usr/bin/ftp
LINK mini_usr usr/bin/rsh
LINK mini_usr usr/bin/sed
+LINK mini_usr usr/bin/sort
LINK mini_usr usr/bin/strings
LINK mini_usr usr/bin/tftp
#
-# $NetBSD: mini_xx.list,v 1.1 1995/11/21 21:19:01 gwr Exp $
+# $NetBSD: mini_xx.list,v 1.1.6.1 1996/08/29 03:14:53 gwr Exp $
# Build -static versions of some programs.
#
# These were re-linked with -static locally:
-COPY ${OBJDIR}/awk usr/bin
-
COPY ${OBJDIR}/grep usr/bin
LINK usr/bin/grep usr/bin/egrep
LINK usr/bin/grep usr/bin/fgrep
-COPY ${OBJDIR}/more usr/bin
+COPY ${OBJDIR}/less usr/bin
+LINK usr/bin/less usr/bin/more
COPY ${OBJDIR}/tip usr/bin
# These are normally -static so just copy:
-COPY ${DESTDIR}/bin/tar bin
+COPY ${DESTDIR}/usr/bin/tar usr/bin
COPY ${DESTDIR}/usr/bin/gzip usr/bin
LINK usr/bin/gzip usr/bin/gunzip
#
-# $NetBSD: mini_xx.mk,v 1.1 1995/11/21 21:19:04 gwr Exp $
+# $NetBSD: mini_xx.mk,v 1.1.6.1 1996/08/29 03:17:15 gwr Exp $
# Hacks for re-linking some programs -static
#
-MINI_XX = awk grep more tip vi
+MINI_XX = grep less tip vi
mini_xx : ${MINI_XX}
clean_xx:
- -rm -f mini_xx ${MINI_XX}
+ -rm -f ${MINI_XX}
-awk : FORCE
- cd ${BSDSRCDIR}/gnu/usr.bin/gawk ;\
- $(MAKE) -f Makefile -f ${TOP}/common/Make.static \
- OUTDIR=${.CURDIR} ${.CURDIR}/awk
-
-grep : FORCE
+grep :
cd ${BSDSRCDIR}/gnu/usr.bin/grep ;\
$(MAKE) -f Makefile -f ${TOP}/common/Make.static \
OUTDIR=${.CURDIR} ${.CURDIR}/grep
-more : FORCE
- cd ${BSDSRCDIR}/usr.bin/more ;\
+less :
+ cd ${BSDSRCDIR}/usr.bin/less/less ;\
$(MAKE) -f Makefile -f ${TOP}/common/Make.static \
- OUTDIR=${.CURDIR} ${.CURDIR}/more
+ OUTDIR=${.CURDIR} ${.CURDIR}/less
-tip : FORCE
+tip :
cd ${BSDSRCDIR}/usr.bin/tip ;\
$(MAKE) -f Makefile -f ${TOP}/common/Make.static \
OUTDIR=${.CURDIR} ${.CURDIR}/tip
-vi : FORCE
- cd ${BSDSRCDIR}/usr.bin/vi/common ;\
+vi :
+ cd ${BSDSRCDIR}/usr.bin/vi/build ;\
$(MAKE) -f Makefile -f ${TOP}/common/Make.static \
OUTDIR=${.CURDIR} ${.CURDIR}/vi
-
-FORCE:
-# $NetBSD: miniroot.list,v 1.2 1995/11/21 21:19:05 gwr Exp $
+# $NetBSD: miniroot.list,v 1.2.6.1 1996/08/29 03:19:32 gwr Exp $
# These are scripts:
COPY ${DESTDIR}/usr/bin/false bin
LINK usr/mdec/ufsboot ufsboot
# various files that we need in /etc for the install
-COPY ${DESTDIR}/etc/disktab etc
COPY ${DESTDIR}/etc/group etc
-COPY ${DESTDIR}/etc/hosts etc
COPY ${DESTDIR}/etc/master.passwd etc
COPY ${DESTDIR}/etc/passwd etc
COPY ${DESTDIR}/etc/protocols etc
COPY ${DESTDIR}/etc/services etc
COPY ${DESTDIR}/etc/spwd.db etc
+# some /etc files get special handling (for MFS /tmp yuck)
+COPY ${DESTDIR}/etc/disktab etc/disktab.shadow
+SYMLINK /tmp/disktab.shadow etc/disktab
+SYMLINK /tmp/fstab.shadow etc/fstab
+SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf
+SYMLINK /tmp/hosts etc/hosts
+
# copy the MAKEDEV script and make some devices
-COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
-SPECIAL cd dev; sh MAKEDEV std rd0 sd0 sd2 st0
-SPECIAL /bin/rm dev/MAKEDEV
-SPECIAL mkfifo dev/pipe
+COPY ${DESTDIR}/dev/MAKEDEV dev
+COPY ${DESTDIR}/dev/MAKEDEV.local dev
+SPECIAL cd dev; sh MAKEDEV all
-# and the miniroot installation tools
+# copy the miniroot installation tools
COPY ${TOPDIR}/common/mr.profile .profile
-COPY ${TOPDIR}/common/mr.remount .remount
COPY ${TOPDIR}/common/mr.termcap usr/share/misc/termcap
-# and the "install" command
-COPY ${TOPDIR}/common/install.sh install
-SPECIAL chmod 755 install
+COPY ${TOPDIR}/common/install.md install.md
+COPY ${OBJDIR}/install.sub install.sub
+SPECIAL chmod 644 install.md install.sub
+
+COPY ${TOPDIR}/../miniroot/install.sh install
+COPY ${TOPDIR}/../miniroot/upgrade.sh upgrade
+SPECIAL chmod 755 install upgrade
#
-# $NetBSD: miniroot.tree,v 1.2 1995/11/21 21:19:07 gwr Exp $
+# $NetBSD: miniroot.tree,v 1.2.6.1 1996/08/29 03:20:18 gwr Exp $
#
/set type=dir uname=root gname=wheel mode=0755
# ./etc
..
+# ./kern
+kern
+# ./kern
+..
+
# ./mnt
mnt
# ./mnt
# ./mnt2
..
+# ./proc
+proc
+# ./proc
+..
+
# ./sbin
sbin
# ./sbin
-# $OpenBSD: mr.profile,v 1.3 1996/04/25 21:31:46 niklas Exp $
-# $NetBSD: mr.profile,v 1.2 1995/11/21 21:19:08 gwr Exp $
+#
+# $NetBSD: mr.profile,v 1.2.6.1 1996/08/29 03:21:13 gwr Exp $
#
# Copyright (c) 1995 Jason R. Thorpe
# Copyright (c) 1994 Christopher G. Demetriou
# get the terminal type?
# (nah, ansi is good enough)
-# remount root
-sh /.remount
-
# run the installation script.
-echo 'To install OpenBSD, enter the command: install'
+echo 'To install NetBSD, enter the command: install'
echo 'Otherwise, enter the command: halt'
# /install XXX - Not yet...
-root::0:0:OpenBSD RAM-disk root:/root:/bin/sh
+root::0:0:NetBSD RAM-disk root:/root:/bin/sh
- Welcome to the OpenBSD/sun3 RAMDISK root!
+ Welcome to the NetBSD/sun3 RAMDISK root!
This environment is designed to do only three things:
1: Partititon your disk (use the command: edlabel /dev/rsd0c)
* (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: rdsetroot.c,v 1.1.1.1 1995/10/18 08:37:51 deraadt Exp $
+ * $Id: rdsetroot.c,v 1.2 1996/09/05 21:27:30 deraadt Exp $
*/
/*
-# $OpenBSD: Makefile,v 1.3 1996/04/25 21:31:56 niklas Exp $
-# $NetBSD: Makefile,v 1.3 1995/11/21 21:19:12 gwr Exp $
+# $NetBSD: Makefile,v 1.3.6.1 1996/08/29 03:24:24 gwr Exp $
TOP= ${.CURDIR}/..
${TOP}/common/mini_xx.list \
${TOP}/common/${IMAGE}.list
-KERNEL=${SRCSYSDIR}/arch/sun3/compile/GENERIC/bsd
+KERNEL=${SRCSYSDIR}/arch/sun3/compile/GENERIC/netbsd
MOUNT_POINT= /mnt
-#BDEV= /dev/sd2b
-#CDEV= /dev/rsd2b
-BDEV= /dev/sd0d
-CDEV= /dev/rsd0d
+BDEV= /dev/sd2b
+CDEV= /dev/rsd2b
+#BDEV= /dev/sd0d
+#CDEV= /dev/rsd0d
# These are all the parameters for the miniroot: (8MB)
DISKTYPE= miniroot
# old format, minfree, opt, b/i trks, sects, cpg
NEWFSARGS= -O -m 0 -o space -i 8192 -t 8 -u 32 -c 16
-CLEANFILES= ${IMAGE}.gz
+CLEANFILES= ${IMAGE}.gz install.sub
-${IMAGE}.gz: ${TREE} ${LISTS} ${CBIN} mini_xx
+${IMAGE}.gz: ${TREE} ${LISTS} ${CBIN} mini_xx install.sub
-newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE}
mount ${BDEV} ${MOUNT_POINT}
mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
sync ; sleep 1 ; sync
cd ${MOUNT_POINT} ;\
usr/mdec/installboot -v ufsboot usr/mdec/bootxx ${CDEV}
- cp ${KERNEL} ${MOUNT_POINT}/bsd
+ cp ${KERNEL} ${MOUNT_POINT}/netbsd
sync
@echo ""
@df -i ${MOUNT_POINT}
# Rules for making ${CBIN} ...
.include "${TOP}/common/Make.crunch"
+install.sub : ${TOP}/../miniroot/install.sub
+ sed -e "/^VERSION=/s/=.*/=${REV}/" < $? > $@
+
clean cleandir: clean_xx
-rm -f a.out core *.core *.o
-rm -f ${CLEANFILES}
-# $OpenBSD: Makefile,v 1.3 1996/04/25 21:32:01 niklas Exp $
# $NetBSD: Makefile,v 1.3 1995/11/21 21:19:14 gwr Exp $
TOP= ${.CURDIR}/..
LISTS= ${TOP}/common/${CBIN}.list \
${TOP}/common/${IMAGE}.list
-KERNEL=${SRCSYSDIR}/arch/sun3/compile/RAMDISK/bsd
+KERNEL=${SRCSYSDIR}/arch/sun3/compile/RAMDISK/netbsd
MOUNT_POINT= /mnt
BDEV= /dev/rd0
# old format, minfree, opt, b/i trks, sects, cpg
NEWFSARGS= -O -m 0 -o space -i 2048 -t 2 -u 16 -c 16
-CLEANFILES= bsd-rd rdsetroot ${IMAGE}.fs
+CLEANFILES= netbsd-rd rdsetroot ${IMAGE}.fs
-bsd-rd : rdsetroot ${IMAGE}.fs
- cp ${KERNEL} bsd-tmp
- ./rdsetroot bsd-tmp < ${IMAGE}.fs
- -mv -f bsd-tmp $@
+netbsd-rd : rdsetroot ${IMAGE}.fs
+ cp ${KERNEL} netbsd-tmp
+ ./rdsetroot netbsd-tmp < ${IMAGE}.fs
+ -mv -f netbsd-tmp $@
rdsetroot: ${TOP}/common/rdsetroot.c
$(CC) -o $@ -DDEBUG ${TOP}/common/rdsetroot.c
-# $Id: Makefile.inc,v 1.1.1.1 1995/10/18 08:37:54 deraadt Exp $
+# $Id: Makefile.inc,v 1.2 1996/09/05 21:27:33 deraadt Exp $
# Revision is 1.0
REV= 10A
-# $Id: Makefile.inc,v 1.1.1.1 1995/10/18 08:37:54 deraadt Exp $
+# $Id: Makefile.inc,v 1.2 1996/09/05 21:27:36 deraadt Exp $
# TOP is assumed to be defined by Makefile including this one.
-# $OpenBSD: dot.commonutils,v 1.2 1996/04/25 21:32:12 niklas Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
# 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: dot.commonutils,v 1.3 1996/09/05 21:27:37 deraadt Exp $
-# Installation utilites (functions), to get OpenBSD installed on
+# Installation utilites (functions), to get NetBSD installed on
# the hard disk. These are meant to be invoked from the shell prompt,
-# by people installing OpenBSD.
+# by people installing NetBSD.
Set_tmp_dir()
{
#
# kcbin.conf - unified binary for the kc floppy
-# $Id: instbin.conf,v 1.2 1996/06/29 05:54:27 tholo Exp $
+# $Id: instbin.conf,v 1.3 1996/09/05 21:27:37 deraadt Exp $
#
srcdirs /usr/src/bin /usr/src/sbin /usr/src/usr.bin /usr/src/usr.sbin
progs gawk cat chmod chown chroot cp df disklabel ed expr fsck ftp
progs gzip ifconfig init ln ls mkdir mknod more mount mt dd
-progs mount_ffs mount_nfs mv newfs pax reboot rm route sed sh shutdown
-progs slattach strings stty sync test umount update
+progs mount_ffs mount_nfs mv newfs reboot rm route sed sh shutdown
+progs slattach strings stty sync tar test umount update
ln chown chgrp
ln gzip gzcat gunzip
ln mount_nfs nfs
ln gawk awk
ln sh -sh # init invokes the shell this way
-ln pax tar
ln test [
ln reboot halt
-# $OpenBSD: list,v 1.3 1996/06/29 05:54:28 tholo Exp $
+# $Id: list,v 1.4 1996/09/05 21:27:38 deraadt Exp $
# copy the crunched binary, link to it, and kill it
COPY ${OBJDIR}/instbin instbin
LINK instbin bin/-sh
LINK instbin bin/stty
LINK instbin bin/sync
-LINK instbin bin/tar
LINK instbin bin/test
LINK instbin bin/[
LINK instbin sbin/disklabel
LINK instbin usr/bin/more
LINK instbin usr/bin/sed
LINK instbin usr/bin/strings
+LINK instbin usr/bin/tar
# LINK instbin usr/sbin/bad144
LINK instbin usr/sbin/chown
LINK instbin usr/sbin/chroot
# and the common installation tools
COPY ${TOPDIR}/inst-common/termcap.vt usr/share/misc/termcap
-COPY /genbsd .
+COPY /gennetbsd .
COPY /boot .
-# $Id: mtree.conf,v 1.1.1.1 1995/10/18 08:37:54 deraadt Exp $
+# $Id: mtree.conf,v 1.2 1996/09/05 21:27:38 deraadt Exp $
/set type=dir uname=root gname=wheel mode=0755
# .
-# $Id: Makefile,v 1.1.1.1 1995/10/18 08:37:54 deraadt Exp $
+# $Id: Makefile,v 1.2 1996/09/05 21:27:35 deraadt Exp $
TOP= ${.CURDIR}/..
-# $OpenBSD: dot.profile,v 1.2 1996/04/25 21:32:06 niklas Exp $
-
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/ export PATH
TERM=vt100 export TERM
echo 'erase ^?, werase ^H, kill ^U, intr ^C'
stty newcrt werase ^H intr ^C kill ^U erase ^?
echo
-echo "Now when OpenBSD is booted you're on your own."
+echo "Now when NetBSD is booted you're on your own."
echo "Remember to write bootblocks and to make devices"
echo "in dev in your new root filesystem before booting."
-echo "Also remember to copy /genbsd and /boot to the"
+echo "Also remember to copy /gennetbsd and /boot to the"
echo "new root; it's not there by default."
echo
echo "Good luck!"
-# $Id: list,v 1.1.1.1 1995/10/18 08:37:55 deraadt Exp $
+# $Id: list,v 1.2 1996/09/05 21:27:36 deraadt Exp $
# the disktab explanation file
COPY disktab.preinstall etc
-# $Id: list2sh.awk,v 1.1.1.1 1995/10/18 08:37:54 deraadt Exp $
+# $Id: list2sh.awk,v 1.2 1996/09/05 21:27:33 deraadt Exp $
BEGIN {
printf("cd ${CURDIR}\n");
-# $Id: runlist.sh,v 1.1.1.1 1995/10/18 08:37:54 deraadt Exp $
+# $Id: runlist.sh,v 1.2 1996/09/05 21:27:34 deraadt Exp $
if [ "X$1" = "X-d" ]; then
SHELLCMD=cat