diff --git a/distrib/arm32/Makefile b/distrib/arm32/Makefile deleted file mode 100644 index 2dc601e3ea9d..000000000000 --- a/distrib/arm32/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# $NetBSD: Makefile,v 1.9 2002/03/07 02:24:25 lukem Exp $ - -.include - -ITARGET= ${RELEASEDIR}/installation -IINST= ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -m ${NONBINMODE} -KERNELS= A7INST CATSINST RPCINST SHARKINST - -SUBDIR= ramdisk kernels - -.include - -RAMDISKOBJ!= cd ${.CURDIR}/ramdisk && ${PRINTOBJDIR} -KERNELOBJ!= cd ${.CURDIR}/kernels && ${PRINTOBJDIR} - -release: check_RELEASEDIR - ${IINST} ${RAMDISKOBJ}/ramdisk-${DISTRIBREV}.fs.gz ${ITARGET}/misc/ -.for kern in ${KERNELS} - ${IINST} ${KERNELOBJ}/netbsd.${kern}.gz ${ITARGET}/kernel/ -.endfor diff --git a/distrib/arm32/Makefile.inc b/distrib/arm32/Makefile.inc deleted file mode 100644 index ebdca327d3cf..000000000000 --- a/distrib/arm32/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.5 2002/03/06 23:50:55 lukem Exp $ -.include diff --git a/distrib/arm32/floppies/Makefile b/distrib/arm32/floppies/Makefile deleted file mode 100644 index 59f797e50896..000000000000 --- a/distrib/arm32/floppies/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile,v 1.1 1996/05/16 19:58:49 mark Exp $ - -SUBDIR= inst upgr - -.include diff --git a/distrib/arm32/floppies/Makefile.inc b/distrib/arm32/floppies/Makefile.inc deleted file mode 100644 index 295147f347bb..000000000000 --- a/distrib/arm32/floppies/Makefile.inc +++ /dev/null @@ -1 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.6 2002/03/06 23:50:56 lukem Exp $ diff --git a/distrib/arm32/floppies/inst-common/Makefile.inc b/distrib/arm32/floppies/inst-common/Makefile.inc deleted file mode 100644 index f49de5570b74..000000000000 --- a/distrib/arm32/floppies/inst-common/Makefile.inc +++ /dev/null @@ -1,54 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.13 2002/03/06 23:50:56 lukem 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}c -VND_RDEV= /dev/r${VND}c -IMAGE?= xxx-${DISTRIBREV}.fs -MDEC= ${DESTDIR}/usr/mdec - -LISTS= ${COMMONDIR}/list ${.CURDIR}/list -CRUNCHCONF= ${COMMONDIR}/${CBIN}.conf -MTREECONF= ${COMMONDIR}/mtree.conf - -CRUNCHGEN?= crunchgen -MTREE?= mtree - -DISKTYPE= floppy - -all: ${CBIN} - dd if=/dev/zero of=${IMAGE} bs=144k count=10 - vnconfig -t ${DISKTYPE} -v -c ${VND_DEV} ${IMAGE} - newfs -B le -O -m 0 -o space -i 5120 -c 80 ${VND_RDEV} ${DISKTYPE} - mount ${VND_DEV} ${MOUNT_POINT} - ${MTREE} -def ${MTREECONF} -p ${MOUNT_POINT}/ -u - TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ - KERNOBJDIR=${KERNOBJDIR} \ - TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS} - @echo "" - @df -i ${MOUNT_POINT} - @echo "" - umount ${MOUNT_POINT} - vnconfig -u ${VND_DEV} - -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 distclean: - /bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.cro *.c - -.include -.include diff --git a/distrib/arm32/floppies/inst-common/dot.commonutils b/distrib/arm32/floppies/inst-common/dot.commonutils deleted file mode 100644 index 972d23a77c57..000000000000 --- a/distrib/arm32/floppies/inst-common/dot.commonutils +++ /dev/null @@ -1,136 +0,0 @@ -# $NetBSD: dot.commonutils,v 1.3 2000/06/14 17:24:18 cgd Exp $ -# -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -# 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 - ) -} diff --git a/distrib/arm32/floppies/inst-common/inst.sh b/distrib/arm32/floppies/inst-common/inst.sh deleted file mode 100644 index 1c89abf6ab84..000000000000 --- a/distrib/arm32/floppies/inst-common/inst.sh +++ /dev/null @@ -1,953 +0,0 @@ -#!/bin/sh -# -# $NetBSD: inst.sh,v 1.2 2001/06/19 13:42:08 wiz 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.2 $' | 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-existent)" - 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-existent)" - 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-existent)" - 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 diff --git a/distrib/arm32/floppies/inst-common/instbin.conf b/distrib/arm32/floppies/inst-common/instbin.conf deleted file mode 100644 index bf70a8321d7e..000000000000 --- a/distrib/arm32/floppies/inst-common/instbin.conf +++ /dev/null @@ -1,29 +0,0 @@ -# -# $NetBSD: instbin.conf,v 1.2 1999/11/23 22:14:23 simonb 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 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 diff --git a/distrib/arm32/floppies/inst-common/list b/distrib/arm32/floppies/inst-common/list deleted file mode 100644 index 096ba33584df..000000000000 --- a/distrib/arm32/floppies/inst-common/list +++ /dev/null @@ -1,90 +0,0 @@ -# $NetBSD: list,v 1.3 2000/06/07 20:24:35 thorpej 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 -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/netconfig etc/netconfig -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 diff --git a/distrib/arm32/floppies/inst-common/mtree.conf b/distrib/arm32/floppies/inst-common/mtree.conf deleted file mode 100644 index d673b1062538..000000000000 --- a/distrib/arm32/floppies/inst-common/mtree.conf +++ /dev/null @@ -1,95 +0,0 @@ -# $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 -.. - diff --git a/distrib/arm32/floppies/inst-common/termcap.vt100 b/distrib/arm32/floppies/inst-common/termcap.vt100 deleted file mode 100644 index 57340c7000af..000000000000 --- a/distrib/arm32/floppies/inst-common/termcap.vt100 +++ /dev/null @@ -1,49 +0,0 @@ -# $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: diff --git a/distrib/arm32/floppies/inst/Makefile b/distrib/arm32/floppies/inst/Makefile deleted file mode 100644 index 08b2239ba8fc..000000000000 --- a/distrib/arm32/floppies/inst/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2002/03/06 23:50:56 lukem Exp $ - -TOP= ${.CURDIR}/.. - -.include "${TOP}/Makefile.inc" -IMAGE= inst-${DISTRIBREV}.fs - -.include "${TOP}/inst-common/Makefile.inc" diff --git a/distrib/arm32/floppies/inst/disktab.preinstall b/distrib/arm32/floppies/inst/disktab.preinstall deleted file mode 100644 index 61ffdafa5fbc..000000000000 --- a/distrib/arm32/floppies/inst/disktab.preinstall +++ /dev/null @@ -1,31 +0,0 @@ -# $NetBSD: disktab.preinstall,v 1.2 1998/01/09 18:56:44 perry Exp $ -# -# Disk geometry and partition layout tables. -# Key: -# dt controller type -# ty type of disk (fixed, removeable, simulated) -# d[0-4] drive-type-dependent parameters -# ns #sectors/track -# nt #tracks/cylinder -# nc #cylinders/disk -# sc #sectors/cylinder, nc*nt default -# su #sectors/unit, sc*nc default -# se sector size, DEV_BSIZE default -# rm rpm, 3600 default -# sf supports bad144-style bad sector forwarding -# sk sector skew per track, default 0 -# cs sector skew per cylinder, default 0 -# hs headswitch time, default 0 -# ts one-cylinder seek time, default 0 -# il sector interleave (n:1), 1 default -# bs boot block size, default BBSIZE -# sb superblock size, default SBSIZE -# o[a-h] partition offsets in sectors -# p[a-h] partition sizes in sectors -# b[a-h] partition block sizes in bytes -# f[a-h] partition fragment sizes in bytes -# t[a-h] partition types (filesystem, swap, etc) -# -# All partition sizes reserve space for bad sector tables. -# (5 cylinders needed for maintenance + replacement sectors) -# diff --git a/distrib/arm32/floppies/inst/dot.hdprofile b/distrib/arm32/floppies/inst/dot.hdprofile deleted file mode 100644 index f953201c0c76..000000000000 --- a/distrib/arm32/floppies/inst/dot.hdprofile +++ /dev/null @@ -1,66 +0,0 @@ -# $NetBSD: dot.hdprofile,v 1.6 2000/06/14 17:24:19 cgd Exp $ -# -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -PATH=/sbin:/bin:/usr/bin:/usr/sbin:/ -export PATH -TERM=vt100 -export TERM -HOME=/ -export HOME - -umask 022 - -if [ "X${DONEPROFILE}" = "X" ]; then - DONEPROFILE=YES - export DONEPROFILE - - 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 '' - - # 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 diff --git a/distrib/arm32/floppies/inst/dot.instutils b/distrib/arm32/floppies/inst/dot.instutils deleted file mode 100644 index 9bdff4056f1b..000000000000 --- a/distrib/arm32/floppies/inst/dot.instutils +++ /dev/null @@ -1,160 +0,0 @@ -# $NetBSD: dot.instutils,v 1.4 2000/06/14 17:24:20 cgd Exp $ -# -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -# 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 "" - 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 "" - 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/rc.d/network " - echo "to 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." -} diff --git a/distrib/arm32/floppies/inst/dot.profile b/distrib/arm32/floppies/inst/dot.profile deleted file mode 100644 index b8c4bc3f001f..000000000000 --- a/distrib/arm32/floppies/inst/dot.profile +++ /dev/null @@ -1,62 +0,0 @@ -# $NetBSD: dot.profile,v 1.7 2000/06/14 17:24:20 cgd Exp $ -# -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -PATH=/sbin:/bin:/usr/bin:/usr/sbin:/ -export PATH -TERM=vt100 -export TERM -HOME=/ -export HOME - -umask 022 - -if [ "X${DONEPROFILE}" = "X" ]; then - DONEPROFILE=YES - export DONEPROFILE - - # 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 '' - - # 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 diff --git a/distrib/arm32/floppies/inst/install.sh b/distrib/arm32/floppies/inst/install.sh deleted file mode 100644 index 226e72d31d1d..000000000000 --- a/distrib/arm32/floppies/inst/install.sh +++ /dev/null @@ -1,500 +0,0 @@ -#!/bin/sh -# $NetBSD: install.sh,v 1.5 2000/06/14 17:24:21 cgd Exp $ -# -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -# 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 pax -s '#^\./etc/.*##' -Xrwpe . /mnt -$DONTDOIT cp /tmp/.hdprofile /mnt/.profile - -echo "" -echo -n "Creating an fstab..." -echo /dev/${drivename}a / ffs rw 1 1 | sed -e s,//,/, > $FSTAB -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 "" diff --git a/distrib/arm32/floppies/inst/list b/distrib/arm32/floppies/inst/list deleted file mode 100644 index 23a9fb8532ed..000000000000 --- a/distrib/arm32/floppies/inst/list +++ /dev/null @@ -1,11 +0,0 @@ -# $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 diff --git a/distrib/arm32/floppies/list2sh.awk b/distrib/arm32/floppies/list2sh.awk deleted file mode 100644 index b92d86904604..000000000000 --- a/distrib/arm32/floppies/list2sh.awk +++ /dev/null @@ -1,55 +0,0 @@ -# $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; -} diff --git a/distrib/arm32/floppies/runlist.sh b/distrib/arm32/floppies/runlist.sh deleted file mode 100644 index 65088762de5b..000000000000 --- a/distrib/arm32/floppies/runlist.sh +++ /dev/null @@ -1,13 +0,0 @@ -# $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} diff --git a/distrib/arm32/floppies/upgr/Makefile b/distrib/arm32/floppies/upgr/Makefile deleted file mode 100644 index 2d222be2c794..000000000000 --- a/distrib/arm32/floppies/upgr/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2002/03/06 23:50:56 lukem Exp $ - -TOP= ${.CURDIR}/.. - -.include "${TOP}/Makefile.inc" -IMAGE= upgr-${DISTRIBREV}.fs - -.include "${TOP}/inst-common/Makefile.inc" diff --git a/distrib/arm32/floppies/upgr/dot.hdprofile b/distrib/arm32/floppies/upgr/dot.hdprofile deleted file mode 100644 index 90f1ec28a91c..000000000000 --- a/distrib/arm32/floppies/upgr/dot.hdprofile +++ /dev/null @@ -1,65 +0,0 @@ -# $NetBSD: dot.hdprofile,v 1.6 2000/06/14 17:24:24 cgd Exp $ -# -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -PATH=/sbin:/bin:/usr/bin:/usr/sbin:/ -export PATH -TERM=vt100 -export TERM -HOME=/ -export HOME - -umask 022 - -if [ "X${DONEPROFILE}" = "X" ]; then - DONEPROFILE=YES - export DONEPROFILE - - 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 '' - - # 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 diff --git a/distrib/arm32/floppies/upgr/dot.profile b/distrib/arm32/floppies/upgr/dot.profile deleted file mode 100644 index 445bde722910..000000000000 --- a/distrib/arm32/floppies/upgr/dot.profile +++ /dev/null @@ -1,59 +0,0 @@ -# $NetBSD: dot.profile,v 1.7 2000/06/14 17:24:25 cgd Exp $ -# -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -PATH=/sbin:/bin:/usr/bin:/usr/sbin:/ -export PATH -TERM=vt100 -export TERM -HOME=/ -export HOME - -umask 022 - -if [ "X${DONEPROFILE}" = "X" ]; then - DONEPROFILE=YES - export DONEPROFILE - - # 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 '' - - # pull in the functions that people will use from the shell prompt. - . /.commonutils - . /.upgrutils - - # run the upgrade script. - upgrade -fi diff --git a/distrib/arm32/floppies/upgr/dot.upgrutils b/distrib/arm32/floppies/upgr/dot.upgrutils deleted file mode 100644 index 99870749bc82..000000000000 --- a/distrib/arm32/floppies/upgr/dot.upgrutils +++ /dev/null @@ -1,61 +0,0 @@ -# $NetBSD: dot.upgrutils,v 1.3 2000/06/14 17:24:26 cgd Exp $ -# -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -# 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." -} diff --git a/distrib/arm32/floppies/upgr/list b/distrib/arm32/floppies/upgr/list deleted file mode 100644 index 9848d23b4f66..000000000000 --- a/distrib/arm32/floppies/upgr/list +++ /dev/null @@ -1,8 +0,0 @@ -# $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 diff --git a/distrib/arm32/floppies/upgr/upgrade.sh b/distrib/arm32/floppies/upgr/upgrade.sh deleted file mode 100644 index b8bc078220d1..000000000000 --- a/distrib/arm32/floppies/upgr/upgrade.sh +++ /dev/null @@ -1,257 +0,0 @@ -#!/bin/sh -# $NetBSD: upgrade.sh,v 1.4 2000/06/14 17:24:27 cgd Exp $ -# -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -# 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 pax -s '#^\./etc/.*##' -Xrwpe . /mnt -$DONTDOIT mv /mnt/etc/rc /mnt/etc/rc.bak -$DONTDOIT cp /tmp/.hdprofile /mnt/.profile - -echo "" -echo "Mounting remaining partitions..." -chroot /mnt mount -at ffs > /dev/null 2>&1 -echo "Done." - -echo "" -echo "" -echo "OK! The preliminary work of setting up your disk is now complete," -echo "and you can now upgrade the actual NetBSD software." -echo "" -echo "Right now, your hard disk is mounted on /mnt. You should consult" -echo "the installation notes to determine how to load and install the new" -echo "NetBSD distribution sets, and how to clean up after the upgrade" -echo "software, when you are done." -echo "" -echo "GOOD LUCK!" -echo "" diff --git a/distrib/arm32/kernels/Makefile b/distrib/arm32/kernels/Makefile deleted file mode 100644 index 6fb0231cef57..000000000000 --- a/distrib/arm32/kernels/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2002/03/06 23:50:57 lukem Exp $ - -TOP= ${.CURDIR}/.. - -.include "${TOP}/Makefile.inc" -.include -.include - -KERNELS= A7INST CATSINST RPCINST SHARKINST - -STRIP?= strip - -RAMDISKDIR!= cd $(.CURDIR)/../ramdisk && ${PRINTOBJDIR} -RAMDISK= ${RAMDISKDIR}/ramdisk-${DISTRIBREV}.fs - -CLEANFILES+= netbsd.tmp ${KERNELS:C/^.*$/netbsd.&.gz/g} -MDSETIMAGE?= mdsetimage - -all: ${KERNELS:C/^.*$/netbsd.&.gz/g} - -.for kern in ${KERNELS} -netbsd.${kern}.gz: ${KERNOBJDIR}/${kern}/netbsd ${RAMDISK} - cp ${KERNOBJDIR}/${kern}/netbsd netbsd.tmp - ${MDSETIMAGE} -v netbsd.tmp ${RAMDISK} - ${STRIP} netbsd.tmp - gzip -9 netbsd.tmp - mv netbsd.tmp.gz ${.TARGET} -.endfor - -clean cleandir distclean: - /bin/rm -f *.core ${CLEANFILES} - -.include diff --git a/distrib/arm32/ramdisk/Makefile b/distrib/arm32/ramdisk/Makefile deleted file mode 100644 index ab269eb740bf..000000000000 --- a/distrib/arm32/ramdisk/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# $NetBSD: Makefile,v 1.21 2002/03/06 23:50:57 lukem Exp $ - -TOP= ${.CURDIR}/.. - -.include "${TOP}/Makefile.inc" -IMAGE= ramdisk-${DISTRIBREV}.fs - -AUXTARGETS= install.sh upgrade.sh start.sh -AUXCLEAN= ${AUXTARGETS} - -CBIN= ramdiskbin - -MOUNT_POINT?= /mnt -# DEV/RDEV file system device, CDEV/RDEV vnconfig device -VND?= vnd0 -VND_DEV= /dev/${VND}a -VND_RDEV= /dev/r${VND}a -VND_CDEV= /dev/${VND}c -VND_CRDEV= /dev/r${VND}c -MDEC= ${DESTDIR}/usr/mdec - -LISTS= list -CRUNCHCONF= ${CBIN}.conf -MTREECONF= mtree.conf - -CRUNCHGEN?= crunchgen -MTREE?= mtree - -DISKTYPE= install-ramdisk -RDSIZE= 3800 - -install.sh: install.tmpl - sed "s/@@VERSION@@/${DISTRIBVER}/" < ${.ALLSRC} > ${.TARGET} - -upgrade.sh: upgrade.tmpl - sed "s/@@VERSION@@/${DISTRIBVER}/" < ${.ALLSRC} > ${.TARGET} - -start.sh: start.tmpl - sed "s/@@VERSION@@/${DISTRIBVER}/" < ${.ALLSRC} > ${.TARGET} - -all: ${AUXTARGETS} ${CBIN} - dd if=/dev/zero of=${IMAGE} count=${RDSIZE} - vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE} - disklabel -rw ${VND_CRDEV} ${DISKTYPE} - newfs -B le -m 0 -o space -i 5152 -c 104 -s${RDSIZE} ${VND_RDEV} - mount ${VND_DEV} ${MOUNT_POINT} - ${MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -u - TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ - KERNOBJDIR=${KERNOBJDIR} \ - TARGDIR=${MOUNT_POINT} sh ${.CURDIR}/runlist.sh ${.CURDIR}/${LISTS} - @echo "" - @df -i ${MOUNT_POINT} - @echo "" - umount ${MOUNT_POINT} - vnconfig -u ${VND_CDEV} - gzip -c9 ${IMAGE} > ${IMAGE}.gz - -unconfig: - -umount -f ${MOUNT_POINT} - -vnconfig -u ${VND_CDEV} - -/bin/rm -f ${IMAGE} ${IMAGE}.gz - -${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF} - ${CRUNCHGEN} -D ${TOP}/../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} - -${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c - ${MAKE} -f ${CBIN}.mk all - -clean cleandir distclean: - /bin/rm -f ${AUXCLEAN} *.core ${IMAGE} ${IMAGE}.gz ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.cro *.c - -.include -.include diff --git a/distrib/arm32/ramdisk/disktab.preinstall b/distrib/arm32/ramdisk/disktab.preinstall deleted file mode 100644 index a4e5ea53ead7..000000000000 --- a/distrib/arm32/ramdisk/disktab.preinstall +++ /dev/null @@ -1,31 +0,0 @@ -# $NetBSD: disktab.preinstall,v 1.1 1997/10/18 04:05:21 mark 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) -# diff --git a/distrib/arm32/ramdisk/dot.commonutils b/distrib/arm32/ramdisk/dot.commonutils deleted file mode 100644 index 2f4fc1af7f07..000000000000 --- a/distrib/arm32/ramdisk/dot.commonutils +++ /dev/null @@ -1,135 +0,0 @@ -# $NetBSD: dot.commonutils,v 1.3 2000/06/14 17:24:30 cgd Exp $ -# -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -# 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 "" - - 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 -r -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 --unlink -xvpf /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 - ) -} diff --git a/distrib/arm32/ramdisk/dot.hdprofile b/distrib/arm32/ramdisk/dot.hdprofile deleted file mode 100644 index 1ec408ebc3e0..000000000000 --- a/distrib/arm32/ramdisk/dot.hdprofile +++ /dev/null @@ -1,62 +0,0 @@ -# $NetBSD: dot.hdprofile,v 1.6 2000/06/14 17:24:30 cgd Exp $ -# -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -PATH=/sbin:/bin:/usr/bin:/usr/sbin:/ -export PATH -TERM=pc3 -export TERM -HOME=/ -export HOME - -umask 022 - -if [ "X${DONEPROFILE}" = "X" ]; then - DONEPROFILE=YES - export DONEPROFILE - - echo "Checking filesystems..." - fsck -y - - echo "Mounting root..." - mount -u / - - # set up some sane defaults - echo 'erase ^?, werase ^W, kill ^U, intr ^C' - stty newcrt werase ^W intr ^C kill ^U erase ^? 9600 - echo '' - - TERMCAP=/.termcap ; export TERMCAP - - [ -x /sysinst ] && /sysinst -fi diff --git a/distrib/arm32/ramdisk/dot.instutils b/distrib/arm32/ramdisk/dot.instutils deleted file mode 100644 index 4d8ad05c6d4e..000000000000 --- a/distrib/arm32/ramdisk/dot.instutils +++ /dev/null @@ -1,188 +0,0 @@ -# $NetBSD: dot.instutils,v 1.4 2000/06/14 17:24:31 cgd Exp $ -# -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -# Installation configuration utilities (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 "" - 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 "" - 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/rc.d/network " - echo "to 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." -} - -# Upgrade cleanup utilities (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." -} diff --git a/distrib/arm32/ramdisk/dot.profile b/distrib/arm32/ramdisk/dot.profile deleted file mode 100644 index 4cd2dd5d5be9..000000000000 --- a/distrib/arm32/ramdisk/dot.profile +++ /dev/null @@ -1,64 +0,0 @@ -# $NetBSD: dot.profile,v 1.11 2000/06/14 22:52:42 cgd Exp $ -# -# Copyright (c) 1997 Perry E. Metzger -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -PATH=/sbin:/bin:/usr/bin:/usr/sbin:/ -export PATH -TERM=pc3 -export TERM -HOME=/ -export HOME - -umask 022 - -ROOTDEV=/dev/md0a - -if [ "X${DONEPROFILE}" = "X" ]; then - DONEPROFILE=YES - export DONEPROFILE - - # set up some sane defaults - echo 'erase ^?, werase ^W, kill ^U, intr ^C' - stty newcrt werase ^W intr ^C kill ^U erase ^? 9600 - echo '' - - # mount the ramdisk read write - mount -u $ROOTDEV / - - # mount the kern_fs so that we can examine the dmesg state - mount -t kernfs /kern /kern - - # run the installation or upgrade script. - sysinst -fi diff --git a/distrib/arm32/ramdisk/inst.sh b/distrib/arm32/ramdisk/inst.sh deleted file mode 100644 index 2acd6f8a175d..000000000000 --- a/distrib/arm32/ramdisk/inst.sh +++ /dev/null @@ -1,1041 +0,0 @@ -#!/bin/sh -# -# $NetBSD: inst.sh,v 1.4 2001/06/19 13:42:08 wiz Exp $ -# -# Copyright (c) 1995-1997 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. - -# -# 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="1.9" - -Load_tape() -{ - Set_Distrib_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..." - pax -rvpe -f /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 - pax -rf /dev/rfd${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 - pax -rf /dev/rfd${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-existent)" - 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_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 - - if [ ! -d /cdrom ]; then - mkdir /cdrom - fi - if [ ! -d /cdrom ]; then - echo "No /cdrom directory, read only root filesystem ?" - exit 1 - fi - - mount -r -t cd9660 /dev/cd${which}a /cdrom - if [ ! $? = 0 ]; then - echo "Mount failed" - else - distribdir="/cdrom/distrib" - fi - -} - - -Mount_DEV_CDROM() -{ - echo -n "Mount which device as CDROM ? [sd0a] " - read which - - if [ ! -d /cdrom ]; then - mkdir /cdrom - fi - if [ ! -d /cdrom ]; then - echo "No /cdrom directory, read only root filesystem ?" - exit 1 - fi - - mount -r -t cd9660 /dev/${which} /cdrom - if [ ! $? = 0 ]; then - echo "Mount failed" - else - distribdir="/cdrom/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-existent)" - else - echo ")" - fi - echo -n "2. Mount CDROM " - if [ ! -b /dev/cd0a ]; then - echo "- Not available" - else - echo "" - fi - if [ -f /var/inst/developer ]; then - echo "D. Mount 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_CDROM - ;; - d|D) - Mount_DEV_CDROM - ;; - 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 - awk 'BEGIN {c=1} (match($1,"set:")!=0) {set=$2} (c==1) {(match($1,"desc:")!=0) { if (c==1) {printf "%-16s",set} \ - else {printf "%-16s",""} printf "%s\n",substr($0,index($0,$2)); c+=1 }}' $set.set $set.SET 2>/dev/null -# 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 - awk 'BEGIN {c=1} (match($1,"set:")!=0) {set=$2} (match($1,"desc:")!=0) { if (c==1) {printf "%-16s",set} \ - else {printf "%-16s",""} printf "%s\n",substr($0,index($0,$2)); c+=1 }' $set.set $set.SET 2>/dev/null -# 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 :" - for set in $sets; do - fail="" - 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 [ ! "X$p1" = "X0" -a ! "X$p1" = "X" ]; then - # Set contains many parts - if [ -f "$set".00 ]; then - numext=1 - p2=`ls "$set".[0-9][0-9] 2>/dev/null | wc | awk '{print $1}'` - else - numext=0 - if [ $setname = "set" ]; then - p2=`ls "$set".[a-z][a-z] 2>/dev/null | wc | awk '{print $1}'` - else - p2=`ls "$set".[A-Z][A-Z] 2>/dev/null | wc | awk '{print $1}'` - fi - fi - 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 - if [ $numext -eq 1 ]; then - forline="0 1 2 3 4 5 6 7 8 9" - else - if [ $setname = "set" ]; then - forline="a b c d e f g h i j k l m n o p q r s t u v w x y z" - else - forline="A B C D E F G H I J K L M N O P Q R S T U V W X Y Z" - fi - fi - loop=0 - for a in $forline; do - if [ $loop -ge $p1 ]; then - break - fi - for b in $forline; do - if [ $loop -ge $p1 ]; then - break - fi - echo -n " [$a$b]" - file=`echo $a$b | tr '[A-Z]' '[a-z]'` - cksum=`cat $set.$setname | grep "cksum.$file:" | cut -f2` - cksum1=`cat "$set".$a$b 2>&1 | cksum | cut "-d " -f1` - #echo "#$cksum, $cksum1#" - if [ ! "$cksum" = "$cksum1" ]; then - echo -n " part $a$b failed checksum" - fail="yes" - fi - loop=$(($loop+1)) - done - done - if [ "$fail" = "" ]; then - echo " Passed checksum" - else - echo "" - fi - fi - if [ -f $set.tar.gz ]; then - printf "$set\t: [tar.gz]" - cksum=`cat $set.$setname | grep "cksum.tar.gz:" | cut -f2` - cksum1=`cat $set.tar.gz 2>&1 | cksum | cut -d" " -f1` - if [ ! "$cksum" = "$cksum1" ]; then - echo " failed checksum" - else - echo " Passed checksum" - fi - 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 - p1=`cat $set.$setname 2>/dev/null | grep 'parts:' | cut -f2` - if [ ! "X$p1" = "X0" -a ! "X$p1" = "X" ]; then - printf "$set\t(parts):" - if [ -f $set.00 ]; then - cat "$set".[0-9][0-9] 2>/dev/null | $GUNZIP -t 2>/dev/null 1>/dev/null - else - if [ $setname = "set" ]; then - cat "$set".[a-z][a-z] 2>/dev/null | $GUNZIP -t 2>/dev/null 1>/dev/null - else - cat "$set".[A-Z][A-Z] 2>/dev/null | $GUNZIP -t 2>/dev/null 1>/dev/null - fi - fi - if [ ! $? = 0 ]; then - echo " Failed archive integrity" - else - echo " Passed" - fi - fi - if [ -f $set.tar.gz ]; then - printf "$set\t(tar.gz):" - $GUNZIP -t $set.tar.gz 2>/dev/null 1>/dev/null - if [ ! $? = 0 ]; then - echo " Failed archive integrity" - else - echo " Passed" - fi - 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 "Comparing 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. Validate 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:" - if [ -f $set.tar.gz ]; then - pax -zvf $set.tar.gz - elif [ -f $set.00 ]; then - cat "$set".[0-9][0-9] | $GUNZIP | pax -v - else - if [ $setname = "set" ]; then - cat "$set".[a-z][a-z] | $GUNZIP | pax -v - else - cat "$set".[A-Z][A-Z] | $GUNZIP | pax -v - fi - fi - 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" - fi - - if [ "$res2" = "std" ]; then - res2="base etc misc text local man kern config" - fi - -# Hack to make sure the base set is the first installed - - res2=`echo "$res2" | awk 'BEGIN {s="";found=0} {for (n=1;n<=NF;++n) \ - { if ($n=="base") {found=1} else {s=s $n " "}}} \ - END {if (found==1) {printf "base "} print s}'` - res2=`echo "$res2" | awk 'BEGIN {s="";found=0} {for (n=1;n<=NF;++n) \ - { if ($n=="BASE") {found=1} else {s=s $n " "}}} \ - END {if (found==1) {printf "BASE "} print s}'` - - 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 -o -f "$set".aa -o -f "$set".AA -o -f $set.tar.gz ]; then - upgrade="no" - if [ -x "$INSTALLDIR/scripts/$set" ]; then - echo "Running pre-upgrade script for $set" - (cd $dest_dir ; INSTALLROOT=$dest_dir; export INSTALLROOT ; $INSTALLDIR/scripts/$set pre-upgrade) - upgrade="yes" - fi - - filelist="$dest_dir/tmp/$set.files" - echo "Installing $set" - case $verbose in - y*|Y*) - if [ -f $set.tar.gz ]; then - cat "$set".tar.gz | $GUNZIP | (cd $dest_dir ; pax -rvpe | tee $filelist) - elif [ -f $set.00 ]; then - cat "$set".[0-9][0-9] | $GUNZIP | (cd $dest_dir ; pax -rvpe - | tee $filelist) - else - if [ $setname = "set" ]; then - cat "$set".[a-z][a-z] | $GUNZIP | (cd $dest_dir ; pax -rvpe | tee $filelist) - else - cat "$set".[A-Z][A-Z] | $GUNZIP | (cd $dest_dir ; pax -rvpe | tee $filelist) - fi - fi - ;; - *) - if [ -f $set.tar.gz ]; then - cat "$set".tar.gz | $GUNZIP | (cd $dest_dir ; pax -rvpe > $filelist) - elif [ -f $set.00 ]; then - cat "$set".[0-9][0-9] | $GUNZIP | (cd $dest_dir ; pax -rvpe > $filelist) - else - if [ $setname = "set" ]; then - cat "$set".[a-z][a-z] | $GUNZIP | (cd $dest_dir ; pax -rvpe > $filelist) - else - cat "$set".[A-Z][A-Z] | $GUNZIP | (cd $dest_dir ; pax -rvpe > $filelist) - fi - fi - ;; - 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 - if [ "$upgrade" = "yes" ]; then - echo "Running upgrade script for $set" - (cd $dest_dir ; INSTALLROOT=$dest_dir; export INSTALLROOT ; $INSTALLDIR/scripts/$set upgrade) - else - echo "Running installation script for $set" - (cd $dest_dir ; INSTALLROOT=$dest_dir; export INSTALLROOT ; $INSTALLDIR/scripts/$set install) - fi - 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() -{ - echo -n "" -} - - -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-existent)" - 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 -mkdir $distribdir 2>/dev/null -chmod 1777 $distribdir 2>/dev/null - -if [ $# -gt 0 ]; then - distribdir=$1 -fi - -if [ -x /usr/bin/whoami ]; then - IAM=`whoami` - - if [ ! "$IAM" = "root" ]; then - echo "inst should be run as root" - exit - fi -fi - -Main_Menu - -exit diff --git a/distrib/arm32/ramdisk/install.tmpl b/distrib/arm32/ramdisk/install.tmpl deleted file mode 100644 index 4f1de8258b52..000000000000 --- a/distrib/arm32/ramdisk/install.tmpl +++ /dev/null @@ -1,519 +0,0 @@ -#!/bin/sh -# $NetBSD: install.tmpl,v 1.8 2000/06/14 22:52:42 cgd Exp $ -# -# Copyright (c) 1997 Perry E. Metzger -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -# 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 -ASYNC="-o async" -ROOTDEV=/dev/md0a - -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=$(( $sects_per_track * $tracks_per_cyl )) -cylbytes=$(( $cylindersize * $bytes_per_sect )) -disksize=$(( $cylindersize * $cyls_per_disk )) - -echo "" -echo "Your disk has a total of $disksize $bytes_per_sect byte sectors," -echo "arranged as $cyls_per_disk cylinders which contain $cylindersize " -echo "sectors ($cylbytes bytes) each." -echo "" -echo "You can specify partition sizes in cylinders ('c') or sectors ('s')." -while [ "X${sizemult}" = "X" ]; do - echo -n "What units would you like to use? [cylinders] " - getresp cylinders - case "$resp" in - c*|C*) - sizemult=$cylindersize - sizeunit="cylinders" - ;; - s*|S*) - sizemult=1 - sizeunit="sectors" - ;; - *) - echo "" - echo "Enter cylinders ('c') or sectors ('s')." - ;; - esac -done - -if [ $sizeunit = "sectors" ]; then - echo "" - echo "For best disk performance, partitions should begin and end on" - echo "cylinder boundaries. Wherever possible, pick sizes that are" - echo "multiples of the cylinder size ($cylindersize sectors)." -fi - -echo -n "" -echo -n "Size of NetBSD portion of disk (in $sizeunit)? " -getresp -partition=$resp -partition_sects=$(( $resp * $sizemult )) -part_offset=0 -if [ $partition_sects -lt $disksize ]; then - echo -n "Offset of NetBSD portion of disk (in $sizeunit)? " - getresp - part_offset=$resp -fi -badspacesec=0 -if [ "$sect_fwd" = "sf:" ]; then - badspacecyl=$(( $sects_per_track + 126 )) - badspacecyl=$(( $badspacecyl + $cylindersize - 1 )) - badspacecyl=$(( $badspacecyl / $cylindersize )) - badspacesec=$(( $badspacecyl * $cylindersize )) - echo "" - echo -n "Using $badspacesec sectors ($badspacecyl cylinders) for the " - echo "bad144 bad block table" -fi - -sects_left=$(( $partition_sects - $badspacesec )) -units_left=$(( $sects_left / $sizemult )) -echo "" -echo "There are $units_left $sizeunit left to allocate." -echo "" -root=0 -while [ $root -eq 0 ]; do - echo -n "Root partition size (in $sizeunit)? " - getresp - case $resp in - [1-9]*) - total=$resp - if [ $total -gt $units_left ]; then - echo -n "Root size is greater than remaining " - echo "free space on disk." - else - root=$resp - fi - ;; - esac -done -root_offset=$part_offset -part_used=$(( $root + $badspacesec / $sizemult )) -units_left=$(( $partition - $part_used )) -echo "" - -swap=0 -while [ $swap -eq 0 ]; do - echo "$units_left $sizeunit remaining in NetBSD portion of disk." - echo -n "Swap partition size (in $sizeunit)? " - getresp - case $resp in - [1-9]*) - if [ $swap -gt $units_left ]; then - echo -n "Swap size is greater than remaining " - echo "free space on disk." - else - swap=$resp - fi - ;; - esac -done -swap_offset=$(( $root_offset + $root )) -part_used=$(( $part_used + $swap )) -echo "" - -fragsize=1024 -blocksize=8192 -$DONTDOIT mount -u $ROOTDEV / -cat /etc/disktab.preinstall > $DT -echo "" >> $DT -echo "$labelname|NetBSD installation generated:\\" >> $DT -echo " :dt=${type}:ty=winchester:\\" >> $DT -echo -n " :nc#${cyls_per_disk}:ns#${sects_per_track}" >> $DT -echo ":nt#${tracks_per_cyl}:\\" >> $DT -echo " :se#${bytes_per_sect}:${sect_fwd}\\" >> $DT -_size=$(( $root * $sizemult )) -echo $root_offset >/dev/null -echo $sizemult >/dev/null -_offset=$(( $root_offset * $sizemult )) -echo -n " :pa#${_size}:oa#${_offset}" >> $DT -echo ":ta=4.2BSD:ba#${blocksize}:fa#${fragsize}:\\" >> $DT -_size=$(( $swap * $sizemult )) -_offset=$(( $swap_offset * $sizemult )) -echo " :pb#${_size}:ob#${_offset}:tb=swap:\\" >> $DT -echo " :pc#${disksize}:oc#0:\\" >> $DT -_size=$(( $root_offset * $sizemult )) -echo " :pd#${_size}:od#0:\\" >> $DT -_size=$(( $partition * $sizemult )) -_offset=$(( $part_offset * $sizemult )) - -echo "You will now have to enter information about any other partitions" -echo "to be created in the NetBSD portion of the disk. This process will" -echo "be complete when you've filled up all remaining space in the NetBSD" -echo "portion of the disk." - -while [ $part_used -lt $partition ]; do - part_size=0 - units_left=$(( $partition - $part_used )) - while [ $part_size -eq 0 ]; do - echo "" - echo -n "$units_left $sizeunit remaining in NetBSD portion of " - echo "the disk" - echo -n "Next partition size (in $sizeunit)? " - getresp - case $resp in - [1-9]*) - total=$(( $part_used + $resp )) - if [ $total -gt $partition ]; then - echo -n "That would make the parition" - echo "too large to fit!" - else - part_size=$resp - part_used=$total - part_name="" - while [ "$part_name" = "" ]; do - echo -n "Mount point? " - getresp - part_name=$resp - done - fi - ;; - esac - done - if [ "$ename" = "" ]; then - ename=$part_name - offset=$(( $part_offset + $root + $swap )) - _size=$(( $part_size * $sizemult )) - _offset=$(( $offset * $sizemult )) - echo -n " :pe#${_size}:oe#${_offset}" >> $DT - echo ":te=4.2BSD:be#${blocksize}:fe#${fragsize}:\\" >> $DT - offset=$(( $offset + $part_size )) - elif [ "$fname" = "" ]; then - fname=$part_name - _size=$(( $part_size * $sizemult )) - _offset=$(( $offset * $sizemult )) - echo -n " :pf#${_size}:of#${_offset}" >> $DT - echo ":tf=4.2BSD:bf#${blocksize}:ff#${fragsize}:\\" >> $DT - offset=$(( $offset + $part_size )) - elif [ "$gname" = "" ]; then - gname=$part_name - _size=$(( $part_size * $sizemult )) - _offset=$(( $offset * $sizemult )) - echo -n " :pg#${_size}:og#${_offset}" >> $DT - echo ":tg=4.2BSD:bg#${blocksize}:fg#${fragsize}:\\" >> $DT - offset=$(( $offset + $part_size )) - elif [ "$hname" = "" ]; then - hname=$part_name - _size=$(( $part_size * $sizemult )) - _offset=$(( $offset * $sizemult )) - echo -n " :ph#${_size}:oh#${_offset}" >> $DT - echo ":th=4.2BSD:bh#${blocksize}:fh#${fragsize}:\\" >> $DT - part_used=$partition - fi -done -echo "" >> $DT -sync - -echo "" -echo "THIS IS YOUR LAST CHANCE!!!" -echo "" -echo -n "Are you SURE you want NetBSD installed on your hard drive ($drivename) ? (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 $ASYNC /dev/${drivename}a /mnt -if [ "$ename" != "" ]; then - echo "" - echo "Initializing $ename filesystem, and mounting..." - $DONTDOIT newfs /dev/r${drivename}e $name - $DONTDOIT mkdir -p /mnt/$ename - $DONTDOIT mount -v $ASYNC /dev/${drivename}e /mnt/$ename -fi -if [ "$fname" != "" ]; then - echo "" - echo "Initializing $fname filesystem, and mounting..." - $DONTDOIT newfs /dev/r${drivename}f $name - $DONTDOIT mkdir -p /mnt/$fname - $DONTDOIT mount -v $ASYNC /dev/${drivename}f /mnt/$fname -fi -if [ "$gname" != "" ]; then - echo "" - echo "Initializing $gname filesystem, and mounting..." - $DONTDOIT newfs /dev/r${drivename}g $name - $DONTDOIT mkdir -p /mnt/$gname - $DONTDOIT mount -v $ASYNC /dev/${drivename}g /mnt/$gname -fi -if [ "$hname" != "" ]; then - echo "" - echo "Initializing $hname filesystem, and mounting..." - $DONTDOIT newfs /dev/r${drivename}h $name - $DONTDOIT mkdir -p /mnt/$hname - $DONTDOIT mount -v $ASYNC /dev/${drivename}h /mnt/$hname -fi - -echo "" -echo "Populating filesystems with bootstrapping binaries and config files" -cd / -$DONTDOIT pax -Xrwpe . /mnt -$DONTDOIT cp /tmp/.hdprofile /mnt/.profile - -# -# Fix up a few things -# -$DONTDOIT ln -s /usr/X11R6.3 /mnt/usr/X11R6.1 2>/dev/null - -echo "" -echo -n "Creating an fstab..." -echo /dev/${drivename}a / ffs rw 1 1 | sed -e s,//,/, > $FSTAB -echo /dev/${drivename}b none swap sw 0 0 | sed -e s,//,/, >> $FSTAB -if [ "$ename" != "" ]; then - echo /dev/${drivename}e /$ename ffs rw 1 2 | sed -e s,//,/, >> $FSTAB -fi -if [ "$fname" != "" ]; then - echo /dev/${drivename}f /$fname ffs rw 1 3 | sed -e s,//,/, >> $FSTAB -fi -if [ "$gname" != "" ]; then - echo /dev/${drivename}g /$gname ffs rw 1 4 | sed -e s,//,/, >> $FSTAB -fi -if [ "$hname" != "" ]; then - echo /dev/${drivename}h /$hname ffs rw 1 5 | sed -e s,//,/, >> $FSTAB -fi -sync -echo " done." - -echo "" -echo "" -echo "OK! The preliminary work of setting up your disk is now complete." -echo "" -echo "The remaining tasks are:" -echo "" -echo "To load and install the NetBSD distribution sets." -echo "Currently the hard drive's root filesystem is mounted on /mnt" -echo "" -echo "A NetBSD kernel has been installed on the hard drive's root filesystem" -echo "so you can boot off the hard drive." -echo "" -echo "Consult the installation notes which will describe how to" -echo "install the distribution sets and kernel. Post-installation" -echo "configuration is also discussed therein." -echo "" -echo "GOOD LUCK!" -echo "" -echo "Type 'inst' at the prompt to start the set installer ..." -echo "" -echo "Remember: You MUST install the base, etc, misc and kernel sets." -echo "" -#/usr/local/sbin/inst diff --git a/distrib/arm32/ramdisk/list b/distrib/arm32/ramdisk/list deleted file mode 100644 index 1d7bead7a51e..000000000000 --- a/distrib/arm32/ramdisk/list +++ /dev/null @@ -1,99 +0,0 @@ -# $NetBSD: list,v 1.8 2000/06/07 20:24:36 thorpej Exp $ - -# copy the crunched binary, link to it, and kill it -COPY ${OBJDIR}/ramdiskbin ramdiskbin -LINK ramdiskbin sysinst -LINK ramdiskbin bin/cat -LINK ramdiskbin bin/chmod -LINK ramdiskbin bin/cp -LINK ramdiskbin bin/dd -LINK ramdiskbin bin/df -LINK ramdiskbin bin/ed -LINK ramdiskbin bin/ln -LINK ramdiskbin bin/ls -LINK ramdiskbin bin/mkdir -LINK ramdiskbin bin/mv -LINK ramdiskbin bin/pax -LINK ramdiskbin bin/pwd -LINK ramdiskbin bin/rm -LINK ramdiskbin bin/sh -LINK ramdiskbin bin/stty -LINK ramdiskbin bin/sync -LINK ramdiskbin bin/test -LINK ramdiskbin bin/[ -LINK ramdiskbin sbin/disklabel -LINK ramdiskbin sbin/fsck -LINK ramdiskbin sbin/fsck_ffs -LINK ramdiskbin sbin/halt -LINK ramdiskbin sbin/ifconfig -LINK ramdiskbin sbin/init -LINK ramdiskbin sbin/mknod -LINK ramdiskbin sbin/mount -LINK ramdiskbin sbin/mount_cd9660 -LINK ramdiskbin sbin/mount_ffs -LINK ramdiskbin sbin/mount_filecore -LINK ramdiskbin sbin/mount_kernfs -LINK ramdiskbin sbin/mount_msdos -LINK ramdiskbin sbin/mount_nfs -LINK ramdiskbin sbin/newfs -LINK ramdiskbin sbin/ping -LINK ramdiskbin sbin/reboot -LINK ramdiskbin sbin/restore -LINK ramdiskbin sbin/route -LINK ramdiskbin sbin/rrestore -LINK ramdiskbin sbin/shutdown -LINK ramdiskbin sbin/slattach -LINK ramdiskbin sbin/swapctl -LINK ramdiskbin sbin/umount -SYMLINK /bin/cat usr/bin/chgrp -SYMLINK /bin/cat usr/bin/ftp -SYMLINK /bin/cat usr/bin/gunzip -SYMLINK /bin/cat usr/bin/gzcat -SYMLINK /bin/cat usr/bin/gzip -SYMLINK /bin/cat usr/bin/more -SYMLINK /bin/cat usr/bin/sed -SYMLINK /bin/cat usr/bin/tar -SYMLINK /bin/cat usr/bin/tip -SYMLINK /bin/cat usr/sbin/chown -SYMLINK /bin/cat usr/sbin/chroot -SPECIAL /bin/rm ramdiskbin - -# copy the MAKEDEV script and make some devices -COPY ${CURDIR}/../../../etc/etc.arm32/MAKEDEV dev/MAKEDEV -SPECIAL cd dev; sh MAKEDEV ramdisk -SPECIAL /bin/rm dev/MAKEDEV - -# we need the boot blocks /usr/mdec -#COPYDIR ${DESTDIR}/usr/mdec usr/mdec - -# various files that we need in /etc for the install -COPY ${CURDIR}/../../../etc/group etc/group -COPY ${CURDIR}/../../../etc/master.passwd etc/master.passwd -COPY ${CURDIR}/../../../etc/protocols etc/protocols -COPY ${CURDIR}/../../../etc/netconfig etc/netconfig -COPY ${CURDIR}/../../../etc/services etc/services -SPECIAL pwd_mkdb -p -d ./ etc/master.passwd - -# and the common installation tools -#COPY ${CURDIR}/dot.commonutils .commonutils -COPY ${CURDIR}/termcap.pc3 usr/share/misc/termcap - -# the disktab explanation file -COPY ${CURDIR}/disktab.preinstall etc/disktab.preinstall - -#COPY ${CURDIR}/inst.sh usr/local/sbin/inst - -# and the installation tools -COPY ${CURDIR}/dot.profile .profile -#COPY ${CURDIR}/dot.instutils .instutils -#COPY ${OBJDIR}/install.sh install -#COPY ${OBJDIR}/upgrade.sh upgrade -#COPY ${OBJDIR}/start.sh start -COPY ${CURDIR}/dot.hdprofile tmp/.hdprofile -#SPECIAL chmod 755 install -#SPECIAL chmod 755 upgrade -#SPECIAL chmod 755 start - -#the lists of obsolete files used by sysinst -SPECIAL sh ${CURDIR}/../../../distrib/sets/makeobsolete -b -s ${CURDIR}/../../../distrib/sets -t ./dist - diff --git a/distrib/arm32/ramdisk/list2sh.awk b/distrib/arm32/ramdisk/list2sh.awk deleted file mode 100644 index 49dc488f7195..000000000000 --- a/distrib/arm32/ramdisk/list2sh.awk +++ /dev/null @@ -1,70 +0,0 @@ -# $NetBSD: list2sh.awk,v 1.1 1997/10/18 07:42:31 mark Exp $ - -BEGIN { - printf("cd ${OBJDIR}\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); - 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); - 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" { - printf("echo '%s'\n", $0); - printf("(cd ${TARGDIR}/%s && find . ! -name . | xargs /bin/rm -rf)\n", - $3); - printf("(cd %s && pax -pe -rw . ${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; -} diff --git a/distrib/arm32/ramdisk/mtree.conf b/distrib/arm32/ramdisk/mtree.conf deleted file mode 100644 index 141027bde247..000000000000 --- a/distrib/arm32/ramdisk/mtree.conf +++ /dev/null @@ -1,82 +0,0 @@ -# $NetBSD: mtree.conf,v 1.3 1999/06/05 20:17:39 bouyer Exp $ - -/set type=dir uname=root gname=wheel mode=0755 -# . -. - -# ./bin -bin -# ./bin -.. - -# ./dev -dev -# ./dev -.. - -# ./dist -dist -# ./dist -.. - -# ./etc -etc -# ./etc -.. - -# ./mnt -mnt -# ./mnt -.. - -# ./mnt2 -mnt2 -# ./mnt2 -.. - -# ./kern -kern -# ./kern -.. - -# ./sbin -sbin -# ./sbin -.. - -# ./tmp -tmp mode=01777 -# ./tmp -.. - -# ./usr -usr - -# ./usr/bin -bin -# ./usr/bin -.. - -# ./usr/mdec -mdec -# ./usr/mdec -.. - -# ./usr/sbin -sbin -# ./usr/sbin -.. - -# ./usr/share -share - -# ./usr/share/misc -misc -# ./usr/share/misc -.. - -# ./usr/share -.. - -# ./usr -.. diff --git a/distrib/arm32/ramdisk/ramdiskbin.conf b/distrib/arm32/ramdisk/ramdiskbin.conf deleted file mode 100644 index 6eef874547ff..000000000000 --- a/distrib/arm32/ramdisk/ramdiskbin.conf +++ /dev/null @@ -1,34 +0,0 @@ -# $NetBSD: ramdiskbin.conf,v 1.8 2000/02/03 19:25:17 itojun Exp $ -# -# ramdiskbin.conf - unified binary for the install ramdisk -# - -srcdirs bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin - -progs cat chmod chown chroot cp dd df disklabel ed -progs fsck fsck_ffs ftp gzip ifconfig init less ln ls -progs mkdir mknod mount mount_cd9660 mount_ffs mount_filecore mount_msdos -progs mount_nfs mount_kernfs mv newfs ping pwd reboot restore rm route -progs sed sh shutdown slattach stty swapctl sync test tip -progs umount -progs sysinst pax -special sysinst srcdir distrib/utils/sysinst/arch/arm32 -special init srcdir distrib/utils/init_s -special ping srcdir distrib/utils/x_ping - -ln pax tar -ln chown chgrp -ln gzip gzcat gunzip -ln less more -ln sh -sh # init invokes the shell this way -ln test [ -ln mount_cd9660 cd9660 -ln mount_ffs ffs -ln mount_filecore filecore -ln mount_msdos msdos -ln mount_nfs nfs -ln mount_kernfs kernfs -ln reboot halt -ln restore rrestore - -libs -lbz2 -ledit -lutil -lcurses -ltermcap -lrmt -lcrypt -ll -lm diff --git a/distrib/arm32/ramdisk/runlist.sh b/distrib/arm32/ramdisk/runlist.sh deleted file mode 100644 index b87732dca656..000000000000 --- a/distrib/arm32/ramdisk/runlist.sh +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: runlist.sh,v 1.1 1997/10/18 07:42:33 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 ${CURDIR}/list2sh.awk | ${SHELLCMD} diff --git a/distrib/arm32/ramdisk/start.tmpl b/distrib/arm32/ramdisk/start.tmpl deleted file mode 100644 index 6e15c076fc0b..000000000000 --- a/distrib/arm32/ramdisk/start.tmpl +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -# $NetBSD: start.tmpl,v 1.2 1998/01/09 08:03:19 perry Exp $ - -again="true" - -echo "Welcome to the NetBSD @@VERSION@@ installation floppy." -echo - -while [ $again = "true" ]; do - - echo 'enter "install" to install NetBSD,' - echo ' "upgrade" to upgrade an existing NetBSD system,' - echo ' or "shell" for a shell prompt.' - echo - echo -n "your choice? " - read resp - - case "$resp" in - install|upgrade|shell) - again="false" - ;; - "") - echo - ;; - *) - echo "Sorry, $resp isn't valid." - echo - ;; - esac -done - -case "$resp" in - install) - install - ;; - upgrade) - upgrade - ;; - shell) - echo 'If you want to run install or upgrade later,' - echo 'simply type "install" or "upgrade" to the shell.' - echo 'good luck!' - ;; -esac diff --git a/distrib/arm32/ramdisk/termcap.pc3 b/distrib/arm32/ramdisk/termcap.pc3 deleted file mode 100644 index 666d82de139c..000000000000 --- a/distrib/arm32/ramdisk/termcap.pc3 +++ /dev/null @@ -1,44 +0,0 @@ -# $NetBSD: termcap.pc3,v 1.1 1998/10/05 00:21:59 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 -# -pc3|ibmpc3|IBM PC 386BSD Console:\ - :DO=\E[%dB:K1=\E[H:K2=\E[E:K3=\E[I:K4=\E[F:K5=\E[G:LE=\E[%dD:\ - :RI=\E[%dC:UP=\E[%dA:am:bl=^G:bs:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\ - :cm=\E[%i%d;%dH:co#80:cr=^M:do=^J:ho=\E[H:is=\E[m:k0=\E[V:k1=\E[M:\ - :k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:k9=\E[U:\ - :kD=\177:kH=\E[F:kN=\E[G:kP=\E[I:kb=\177:kd=\E[B:kh=\E[H:kl=\E[D:\ - :kr=\E[C:ku=\E[A:le=^H:li#25:ms:nd=\E[C:rs=\E[m\E[x\E[14r:se=\E[m:\ - :sf=\E[S:so=\E[7m:sr=\E[T:ta=^I:te=\E[m:ti=\E[m:up=\E[A:km:pt:\ - :AL=\E[%dL:DL=\E[%dM:SF=\E[%dS:SR=\E[%dT:al=\E[L:dl=\E[M: diff --git a/distrib/arm32/ramdisk/termcap.xterm b/distrib/arm32/ramdisk/termcap.xterm deleted file mode 100644 index 1d3a73b49f99..000000000000 --- a/distrib/arm32/ramdisk/termcap.xterm +++ /dev/null @@ -1,23 +0,0 @@ -# $NetBSD: termcap.xterm,v 1.2 1999/03/13 09:03:28 itohy Exp $ -# -xterm-r6|xterm-old|xterm X11R6 version:\ - :am:bs:km:mi:ms:xn:\ - :co#80:it#8:li#24:\ - :*6=\E[4~:@0=\E[1~:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:\ - :DO=\E[%dB:F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:\ - :F5=\E[28~:F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:\ - :FA=\E[34~:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:\ - :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\ - :ae=\E(B:al=\E[L:as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\ - :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\ - :dl=\E[M:do=^J:eA=\E(B:ei=\E[4l:ho=\E[H:im=\E[4h:\ - :is=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:k1=\EOP:\ - :k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:k7=\E[18~:\ - :k8=\E[19~:k9=\E[20~:k;=\E[21~:kD=\E[3~:kI=\E[2~:kN=\E[6~:\ - :kP=\E[5~:kb=^H:kd=\EOB:ke=\E[?1l\E>:kl=\EOD:kr=\EOC:\ - :ks=\E[?1h\E=:ku=\EOA:le=^H:md=\E[1m:me=\E[m:ml=\El:\ - :mr=\E[7m:mu=\Em:nd=\E[C:\ - :r2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:rc=\E8:\ - :sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:ta=^I:\ - :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:ue=\E[m:up=\E[A:\ - :us=\E[4m: diff --git a/distrib/arm32/ramdisk/upgrade.tmpl b/distrib/arm32/ramdisk/upgrade.tmpl deleted file mode 100644 index ca2ee519429e..000000000000 --- a/distrib/arm32/ramdisk/upgrade.tmpl +++ /dev/null @@ -1,240 +0,0 @@ -#!/bin/sh -# $NetBSD: upgrade.tmpl,v 1.4 2000/06/14 22:52:42 cgd Exp $ -# -# Copyright (c) 1997 Perry E. Metzger -# Copyright (c) 1994 Christopher G. Demetriou -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed for the -# NetBSD Project. See http://www.netbsd.org/ for -# information about NetBSD. -# 4. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# <> - -# NetBSD upgrade script. -# In a perfect world, this would be a nice C program, with a reasonable -# user interface. - -DT=/etc/disktab # /etc/disktab -FSTABDIR=/mnt/etc # /mnt/etc -#DONTDOIT=echo -UARGS="-c 2" - -FSTAB=${FSTABDIR}/fstab - -getresp() { - read resp - if [ "X$resp" = "X" ]; then - resp=$1 - fi -} - -echo "Welcome to the NetBSD @@VERSION@@ upgrade program." -echo "" -echo "This program is designed to help you put the new version of NetBSD" -echo "on your hard disk, in a simple and rational way. To upgrade, you" -echo "must have plenty of free space on all partitions which will be" -echo "upgraded. If you have at least 1MB free on your root partition," -echo "and several free on your /usr patition, you should be fine." -echo "" -echo "As with anything which modifies your hard drive's contents, this" -echo "program can cause SIGNIFICANT data loss, and you are advised" -echo "to make sure your hard drive is backed up before beginning the" -echo "upgrade process." -echo "" -echo "Default answers are displyed in brackets after the questions." -echo "You can hit Control-C at any time to quit, but if you do so at a" -echo "prompt, you may have to hit return. Also, quitting in the middle of" -echo "the upgrade may leave your system in an inconsistent (and unusable)" -echo "state." -echo "" -echo -n "Proceed with upgrade? [n] " -getresp "n" -case "$resp" in - y*|Y*) - echo "Cool! Let's get to it..." - ;; - *) - echo "" - echo "OK, then. Enter 'halt' at the prompt to halt the" - echo "machine." - exit - ;; -esac - -# find out what units are possible, and query the user. -driveunits=`ls /dev/[sw]d?a | sed -e 's,/dev/\(...\)a,\1,g'` -if [ "X${driveunits}" = "X" ]; then - echo "FATAL ERROR:" - echo "No disk devices." - echo "This is probably a bug in the install disks." - echo "Exiting install program." - exit -fi - -echo "" -echo "The following disks are supported by this upgrade procedure:" -echo " "${driveunits} -echo "If your system was previously completely contained within the" -echo "disks listed above (i.e. if your system didn't occupy any space" -echo "on disks NOT listed above), this upgrade disk can upgrade your" -echo "system. If it cannot, hit Control-C at the prompt." -echo "" -while [ "X${drivename}" = "X" ]; do - echo -n "Which disk contains your root partition? " - getresp - otherdrives=`echo "${driveunits}" | sed -e s,${resp},,` - if [ "X${driveunits}" = "X${otherdrives}" ]; then - echo "" - echo "\"${resp}\" is an invalid drive name. Valid choices" - echo "are: "${driveunits} - echo "" - else - drivename=${resp} - fi -done - -echo "" -echo "Root partition is on ${drivename}a." -echo "checking the file system on ${drivename}a..." - -fsck_ffs -f /dev/r${drivename}a -if [ $? != 0 ]; then - echo "FATAL ERROR: FILE SYSTEM UPGRADE FAILED." - echo "You should probably reboot the machine, fsck your" - echo "disk(s), and try the upgrade procedure again." - exit 1 -fi - -echo "" -echo "Mounting root partition on /mnt..." -mount /dev/${drivename}a /mnt -if [ $? != 0 ]; then - echo "FATAL ERROR: MOUNT FAILED." - echo "You should verify that your system is set up as you" - echo "described, and re-attempt the upgrade procedure." - exit 1 -fi -echo "Done." - -echo "" -echo -n "Copying new fsck binary to your hard disk..." -if [ ! -d /mnt/sbin ]; then - mkdir /mnt/sbin -fi -(cd / ; pax -rwpe ./sbin/* /mnt) -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 -sync -echo " Done." - -echo "" -echo "Re-mounting root partition read-only..." -mount -u -o ro /dev/${drivename}a /mnt -if [ $? != 0 ]; then - echo "FATAL ERROR: RE-MOUNT FAILED." - echo "It in unclear why this error would occur. It looks" - echo "like you may end up having to upgrade by hand." - exit 1 -fi -echo "Done." - -echo "" -echo "checking the rest of your file systems..." -chroot /mnt fsck -f -p -if [ $? != 0 ]; then - echo "FATAL ERROR: FILE SYSTEM UPGRADE(S) FAILED." - echo "You should probably reboot the machine, fsck your" - echo "file system(s), and try the upgrade procedure" - echo "again." - exit 1 -fi - echo "Done." - -echo "" -echo "Re-mounting root partition read-write..." -mount -u -o rw /dev/${drivename}a /mnt -if [ $? != 0 ]; then - echo "FATAL ERROR: RE-MOUNT FAILED." - echo "It in unclear why this error would occur. It looks" - echo "like you may end up having to upgrade by hand." - exit 1 -fi -echo "Done." - -echo "" -echo "Copying bootstrapping binaries and config files to the hard drive..." -cd / -$DONTDOIT cp /mnt/.profile /mnt/.profile.bak -$DONTDOIT pax -s '#^/etc/.*##' -Xrwpe . /mnt -$DONTDOIT mv /mnt/etc/rc /mnt/etc/rc.bak -$DONTDOIT cp /tmp/.hdprofile /mnt/.profile -echo "Upgrading kernel (old kernel is /netbsd.bak)" -$DONTDOIT mv /mnt/netbsd /mnt/netbsd.bak -$DONTDOIT gunzip /mnt/netbsd.gz -egrep 'none.*swap.*sw' ${FSTAB} >/dev/null -if [ $? != 0 ]; then - echo "Your fstab file does not list any swap partitions" - echo -n "Would you like to add swap partitions to your fstab ? [n]" - getresp "n" - case "$resp" in - y*|Y*) - cp ${FSTAB} ${FSTAB}.bak - while [ "X${resp}" != "X" ]; do - echo -n "Enter swap device to add: [finish] " - getresp - if "X${resp} != "X" ]; then - cat "${resp} none swap sw 0 0" >> ${FSTAB} - fi - done - ;; -esac -fi - -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 "" -echo "Type 'inst' at the prompt to start the set installer ..." -echo "" -#/usr/local/sbin/inst