1 floppy drive support

This commit is contained in:
glass 1994-10-18 07:02:52 +00:00
parent a99b93e354
commit a63619a01c
11 changed files with 215 additions and 51 deletions

View File

@ -27,17 +27,27 @@
# (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 1994/10/02 16:07:03 cgd Exp $
# $Id: dot.commonutils,v 1.4 1994/10/18 07:03:06 glass 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.
# 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=/mnt/usr/distrib
def_tmp_dir="$dest_dir"usr/distrib
fi
echo -n "What directory should be used to find and/or store "
@ -101,7 +111,7 @@ Load_tape()
echo -n "continue..."
read foo
echo "Extracting files from the tape..."
tar xvfp /dev/$which
$TAR xvpf --unlink /dev/$which
echo "Done."
}
@ -118,5 +128,5 @@ Extract()
tarverbose=
;;
esac
cat "$1"* | gunzip | (cd /mnt ; tar xfp$tarverbose -)
cat "$1"* | $GUNZIP | (cd $dest_dir ; $TAR --unlink -xp"$tarverbose"f - )
}

View File

@ -1,4 +1,4 @@
# $Id: list,v 1.1.1.1 1994/08/29 15:30:22 cgd Exp $
# $Id: list,v 1.2 1994/10/18 07:03:09 glass Exp $
# copy the crunched binary, link to it, and kill it
COPY ${OBJDIR}/instbin instbin
@ -36,21 +36,21 @@ LINK instbin sbin/route
LINK instbin sbin/shutdown
LINK instbin sbin/slattach
LINK instbin sbin/umount
LINK instbin usr/bin/awk
LINK instbin usr/bin/chgrp
LINK instbin usr/bin/ftp
LINK instbin usr/bin/gunzip
LINK instbin usr/bin/gzcat
LINK instbin usr/bin/gzip
LINK instbin usr/bin/more
LINK instbin usr/bin/sed
LINK instbin usr/bin/strings
LINK instbin usr/bin/tar
LINK instbin usr/bin/tip
LINK instbin usr/sbin/bad144
LINK instbin usr/sbin/chown
LINK instbin usr/sbin/chroot
LINK instbin usr/sbin/update
SYMLINK /bin/cat usr/bin/awk
SYMLINK /bin/cat usr/bin/chgrp
SYMLINK /bin/cat usr/bin/ftp
SYMLINK /bin/cat usr/bin/gunzip
SYMLINK /bin/cat usr/bin/gzcat
SYMLINK /bin/cat usr/bin/gzip
SYMLINK /bin/cat usr/bin/more
SYMLINK /bin/cat usr/bin/sed
SYMLINK /bin/cat usr/bin/strings
SYMLINK /bin/cat usr/bin/tar
SYMLINK /bin/cat usr/bin/tip
SYMLINK /bin/cat usr/sbin/bad144
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

View File

@ -0,0 +1,62 @@
#
# 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.hdprofile,v 1.1 1994/10/18 07:02:57 glass Exp $
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
export PATH
TERM=pc3
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 ^?, werase ^W, kill ^U, intr ^C'
stty newcrt werase ^W intr ^C kill ^U erase ^? 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

View File

@ -27,7 +27,7 @@
# (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.1.1.1 1994/08/29 15:30:22 cgd Exp $
# $Id: dot.instutils,v 1.2 1994/10/18 07:03:00 glass Exp $
# Installation configuration utilites (functions), to get NetBSD configured
# reasonably once it is installed on the hard disk. These are meant to be
@ -35,8 +35,12 @@
Configure()
{
DEV=/mnt/dev
ETC=/mnt/etc
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"
@ -60,7 +64,7 @@ Configure()
fi
echo ""
if [ -e /mnt/etc/sendmail.cf ]; then
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!"
@ -146,10 +150,8 @@ Configure()
sync
echo ""
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"
echo "key to reboot. Use the kernel-copy floppy to copy a kernel"
echo "to your hard disk."
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."
}

View File

@ -28,7 +28,7 @@
# (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.3 1994/08/31 00:10:42 cgd Exp $
# $Id: install.sh,v 1.4 1994/10/18 07:03:02 glass Exp $
# NetBSD installation script.
# In a perfect world, this would be a nice C program, with a reasonable
@ -398,7 +398,7 @@ while [ "$answer" = "" ]; do
done
echo ""
echo -n "Labellling disk $drivename..."
echo -n "Labeling disk $drivename..."
$DONTDOIT disklabel -w -B $drivename $labelname
echo " done."
@ -440,9 +440,13 @@ if [ "$hname" != "" ]; then
$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..."
$DONTDOIT mkdir -p $FSTABDIR
echo /dev/${drivename}a / ufs rw 1 1 | sed -e s,//,/, > $FSTAB
if [ "$ename" != "" ]; then
echo /dev/${drivename}e /$ename ufs rw 1 2 | sed -e s,//,/, >> $FSTAB
@ -461,13 +465,19 @@ echo " done."
echo ""
echo ""
echo "OK! The preliminary work of setting up your disk is now complete,"
echo "and you can install the actual NetBSD software."
echo "OK! The preliminary work of setting up your disk is now complete."
echo ""
echo "The remaining tasks are:"
echo ""
echo "Right now, your disk is mounted on /mnt. You should consult"
echo "the installation notes to determine how to load and install the"
echo "NetBSD distribution sets, and how to configure your system when"
echo "you are done."
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 ""

View File

@ -1,4 +1,4 @@
# $Id: list,v 1.1.1.1 1994/08/29 15:30:21 cgd Exp $
# $Id: list,v 1.2 1994/10/18 07:03:04 glass Exp $
# the disktab explanation file
COPY disktab.preinstall etc
@ -7,4 +7,5 @@ COPY disktab.preinstall etc
COPY dot.profile .profile
COPY dot.instutils .instutils
COPY install.sh install
COPY dot.hdprofile tmp/.hdprofile
SPECIAL chmod 755 install

View File

@ -1,4 +1,4 @@
# $Id: list2sh.awk,v 1.1.1.1 1994/08/29 15:30:14 cgd Exp $
# $Id: list2sh.awk,v 1.2 1994/10/18 07:02:52 glass Exp $
BEGIN {
printf("cd ${CURDIR}\n");
@ -18,6 +18,11 @@ $1 == "LINK" {
printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $3);
next;
}
$1 == "SYMLINK" {
printf("echo '%s'\n", $0);
printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $3);
next;
}
$1 == "SPECIAL" {
printf("echo '%s'\n", $0);
printf("(cd ${TARGDIR};");

View File

@ -0,0 +1,62 @@
#
# 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.hdprofile,v 1.1 1994/10/18 07:03:11 glass Exp $
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
export PATH
TERM=pc3
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 ^?, werase ^W, kill ^U, intr ^C'
stty newcrt werase ^W intr ^C kill ^U erase ^? 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

View File

@ -27,7 +27,7 @@
# (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.1.1.1 1994/08/29 15:30:20 cgd Exp $
# $Id: dot.upgrutils,v 1.2 1994/10/18 07:03:14 glass Exp $
# Upgrade cleanup utilites (functions), to make sure a recently-upgraded
# system is safely runnable. These are meant to be invoked from the shell
@ -35,12 +35,16 @@
Cleanup()
{
DEV=/mnt/dev
ETC=/mnt/etc
upgrade_dir=/
if [ ! -f /etc/fstab ]; then
upgrade_dir=/mnt
fi
echo "Cleaning up miscellaneous files in /etc..."
chroot /mnt /usr/sbin/pwd_mkdb -p /etc/master.passwd
chroot /mnt /bin/rm /etc/sendmail.fc > /dev/null 2>&1
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."

View File

@ -1,7 +1,8 @@
# $Id: list,v 1.1.1.1 1994/08/29 15:30:19 cgd Exp $
# $Id: list,v 1.2 1994/10/18 07:03:15 glass 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

View File

@ -28,7 +28,7 @@
# (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.2 1994/08/30 23:48:25 cgd Exp $
# $Id: upgrade.sh,v 1.3 1994/10/18 07:03:16 glass Exp $
# NetBSD upgrade script.
# In a perfect world, this would be a nice C program, with a reasonable
@ -227,6 +227,13 @@ if [ $? != 0 ]; then
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 ufs > /dev/null 2>&1
@ -235,11 +242,11 @@ echo "Done."
echo ""
echo ""
echo "OK! The preliminary work of setting up your disk is now complete,"
echo "and you can upgrade the actual NetBSD software."
echo "and you can now upgrade the actual NetBSD software."
echo ""
echo "Right now, your disk is mounted on /mnt. You should consult"
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 "NetBSD distribution sets, and how to clean up after the upgrade"
echo "software, when you are done."
echo ""
echo "GOOD LUCK!"