diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-09-05 21:27:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-09-05 21:27:39 +0000 |
commit | 59436c90b065edbbd368ed8679d5be33153d4fcc (patch) | |
tree | 2b6543cda0aa334b4d05e91f21b85211da5ffde5 /distrib/arm32/floppies/inst | |
parent | ff0f2a750cbaf08bb2ec918bdabe6ad55177f066 (diff) |
sync to netbsd
Diffstat (limited to 'distrib/arm32/floppies/inst')
-rw-r--r-- | distrib/arm32/floppies/inst/Makefile | 8 | ||||
-rw-r--r-- | distrib/arm32/floppies/inst/disktab.preinstall | 29 | ||||
-rw-r--r-- | distrib/arm32/floppies/inst/dot.hdprofile | 63 | ||||
-rw-r--r-- | distrib/arm32/floppies/inst/dot.instutils | 157 | ||||
-rw-r--r-- | distrib/arm32/floppies/inst/dot.profile | 59 | ||||
-rw-r--r-- | distrib/arm32/floppies/inst/install.sh | 497 | ||||
-rw-r--r-- | distrib/arm32/floppies/inst/list | 11 |
7 files changed, 824 insertions, 0 deletions
diff --git a/distrib/arm32/floppies/inst/Makefile b/distrib/arm32/floppies/inst/Makefile new file mode 100644 index 00000000000..14f394c6cdd --- /dev/null +++ b/distrib/arm32/floppies/inst/Makefile @@ -0,0 +1,8 @@ +# $NetBSD: Makefile,v 1.1 1996/05/16 19:58:54 mark Exp $ + +TOP= ${.CURDIR}/.. + +.include "${TOP}/Makefile.inc" +IMAGE= inst-${REV}.fs + +.include "${TOP}/inst-common/Makefile.inc" diff --git a/distrib/arm32/floppies/inst/disktab.preinstall b/distrib/arm32/floppies/inst/disktab.preinstall new file mode 100644 index 00000000000..5fe26a7d81c --- /dev/null +++ b/distrib/arm32/floppies/inst/disktab.preinstall @@ -0,0 +1,29 @@ +# 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 new file mode 100644 index 00000000000..b5b68311738 --- /dev/null +++ b/distrib/arm32/floppies/inst/dot.hdprofile @@ -0,0 +1,63 @@ +# $NetBSD: dot.hdprofile,v 1.1 1996/05/16 19:58:57 mark Exp $ +# +# Copyright (c) 1994 Christopher G. Demetriou +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by Christopher G. Demetriou. +# 4. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +PATH=/sbin:/bin:/usr/bin:/usr/sbin:/ +export PATH +TERM=vt100 +export TERM + +umask 022 + +if [ "X${DONEPROFILE}" = "X" ]; then + DONEPROFILE=YES + + echo "Checking filesystems..." + fsck -y + + echo "Mounting filesystems..." + mount -a + mount -t kernfs /kern /kern 2>/dev/null >/dev/null + + # set up some sane defaults + echo 'erase ^H, werase ^W, kill ^U, intr ^C' + stty newcrt werase ^W intr ^C kill ^U erase ^H 9600 + echo '' + + # run update, so that installed software is written as it goes. + update + + # pull in the functions that people will use from the shell prompt. + . /.commonutils + . /.instutils + + echo "Follow the installation directions to install the NetBSD" + echo "distribution sets." +fi diff --git a/distrib/arm32/floppies/inst/dot.instutils b/distrib/arm32/floppies/inst/dot.instutils new file mode 100644 index 00000000000..46f29916203 --- /dev/null +++ b/distrib/arm32/floppies/inst/dot.instutils @@ -0,0 +1,157 @@ +# $NetBSD: dot.instutils,v 1.1 1996/05/16 19:58:58 mark Exp $ +# +# Copyright (c) 1994 Christopher G. Demetriou +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by Christopher G. Demetriou. +# 4. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# Installation configuration utilites (functions), to get NetBSD configured +# reasonably once it is installed on the hard disk. These are meant to be +# invoked from the shell prompt, by people installing NetBSD. + +Configure() +{ + DEV=/dev + ETC=/etc + if [ ! -f /etc/fstab ]; then + DEV=/mnt/dev + ETC=/mnt/etc + fi + + echo "You will now be prompted for information about this" + echo "machine. If you hit return, the default answer (in" + echo "brackets) will be used." + + echo "" + echo -n "What is this machine's hostname? [unknown.host.domain] " + read hname + if [ "$hname" = "" ]; then + hname=unknown.host.domain + fi + echo $hname > ${ETC}/myname + proto_domain=`echo $hname | sed -e 's/[^.]*\.//'` + + echo "" + echo "What domain is this machine in (this is NOT its YP" + echo -n "domain name)? [$proto_domain] " + read dname + if [ "$dname" = "" ]; then + dname=$proto_domain + fi + + echo "" + 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/netstart to " + echo "learn how to do this." + ;; + esac + + echo "" + echo -n "Making device nodes (may take a while)..." + cd ${DEV} + sh MAKEDEV all + echo " done." + + sync + + echo "" + echo "If you haven't already installed a kernel on the hard drive" + echo "using your kernel-copy floppy, do so now. Kernel" + echo "installation instructions can be found in the" + echo "installation notes." +} diff --git a/distrib/arm32/floppies/inst/dot.profile b/distrib/arm32/floppies/inst/dot.profile new file mode 100644 index 00000000000..a1944936935 --- /dev/null +++ b/distrib/arm32/floppies/inst/dot.profile @@ -0,0 +1,59 @@ +# +# Copyright (c) 1994 Christopher G. Demetriou +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by Christopher G. Demetriou. +# 4. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# $Id: dot.profile,v 1.1 1996/09/05 21:26:18 deraadt Exp $ + +PATH=/sbin:/bin:/usr/bin:/usr/sbin:/ +export PATH +TERM=vt100 +export TERM + +umask 022 + +if [ "X${DONEPROFILE}" = "X" ]; then + DONEPROFILE=YES + + # set up some sane defaults + echo 'erase ^H, werase ^W, kill ^U, intr ^C' + stty newcrt werase ^W intr ^C kill ^U erase ^H 9600 + echo '' + + # run update, so that installed software is written as it goes. + update + + # mount the kern_fs so that we can examine the dmesg state + mount -t kernfs /kern /kern + + # pull in the functions that people will use from the shell prompt. + . /.commonutils + . /.instutils + + # run the installation script. + install +fi diff --git a/distrib/arm32/floppies/inst/install.sh b/distrib/arm32/floppies/inst/install.sh new file mode 100644 index 00000000000..5d772a421d9 --- /dev/null +++ b/distrib/arm32/floppies/inst/install.sh @@ -0,0 +1,497 @@ +#!/bin/sh +# +# Copyright (c) 1994 Christopher G. Demetriou +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by Christopher G. Demetriou. +# 4. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# $Id: install.sh,v 1.1 1996/09/05 21:26:19 deraadt Exp $ + +# NetBSD installation script. +# In a perfect world, this would be a nice C program, with a reasonable +# user interface. + +stty erase ^H + +DT=/etc/disktab # /etc/disktab +FSTABDIR=/mnt/etc # /mnt/etc +#DONTDOIT=echo + +VERSION=1.1 +FSTAB=${FSTABDIR}/fstab + +getresp() { + read resp + if [ "X$resp" = "X" ]; then + resp=$1 + fi +} + +echo "Welcome to the NetBSD ${VERSION} installation program." +echo "" +echo "This program is designed to help you put NetBSD on your hard disk," +echo "in a simple and rational way. You'll be asked several questions," +echo "and it would probably be useful to have your disk's hardware" +echo "manual, the installation notes, and a calculator handy." +echo "" +echo "In particular, you will need to know some reasonably detailed" +echo "information about your disk's geometry, because there is currently" +echo "no way this this program can figure that information out." +echo "" +echo "As with anything which modifies your hard drive's contents, this" +echo "program can cause SIGNIFICANT data loss, and you are advised" +echo "to make sure your hard drive is backed up before beginning the" +echo "installation process." +echo "" +echo "Default answers are displyed in brackets after the questions." +echo "You can hit Control-C at any time to quit, but if you do so at a" +echo "prompt, you may have to hit return. Also, quitting in the middle of" +echo "installation may leave your system in an inconsistent state." +echo "" +echo -n "Proceed with installation? [n] " +getresp "n" +case "$resp" in + y*|Y*) + echo "Cool! Let's get to it..." + ;; + *) + echo "" + echo "OK, then. Enter 'halt' at the prompt to halt the" + echo "machine." + exit + ;; +esac + +echo "" +echo "To do the installation, you'll need to provide some information about" +echo "your disk." +echo "" +echo "NetBSD can be installed on ST506, ESDI, IDE, or SCSI disks." +echo -n "What kind of disk will you be installing on? [IDE] " +getresp "IDE" +case "$resp" in + esdi|ESDI|st506|ST506) + drivetype=wd + echo -n "Does it support _automatic_ sector remapping? [y] " + getresp "y" + case "$resp" in + n*|N*) + sect_fwd="sf:" + ;; + *) + sect_fwd="" + ;; + esac + ;; + ide|IDE) + drivetype=wd + sect_fwd="" + type=ST506 + ;; + scsi|SCSI) + drivetype=sd + sect_fwd="" + type=SCSI + ;; +esac + +# find out what units are possible for that disk, and query the user. +driveunits=`ls /dev/${drivetype}?a | sed -e 's,/dev/\(...\)a,\1,g'` +if [ "X${driveunits}" = "X" ]; then + echo "FATAL ERROR:" + echo "No devices for disks of type '${drivetype}'." + echo "This is probably a bug in the install disks." + echo "Exiting install program." + exit +fi +prefdrive=${drivetype}0 + +echo "" +echo "The following ${drivetype}-type disks are supported by this" +echo "installation procedure:" +echo " "${driveunits} +echo "Note that they may not exist in _your_ machine; the list of" +echo "disks in your machine was printed when the system was booting." +echo "" +while [ "X${drivename}" = "X" ]; do + echo -n "Which disk would like to install on? [${prefdrive}] " + getresp ${prefdrive} + otherdrives=`echo "${driveunits}" | sed -e s,${resp},,` + if [ "X${driveunits}" = "X${otherdrives}" ]; then + echo "" + echo "\"${resp}\" is an invalid drive name. Valid choices" + echo "are: "${driveunits} + echo "" + else + drivename=${resp} + fi +done + +echo "" +echo "Using disk ${drivename}." +echo "" +echo -n "What kind of disk is it? (one word please) [my${drivetype}] " +getresp "my${drivetype}" +labelname=$resp + +echo "" +echo "You will now need to provide some information about your disk's" +echo "geometry. This should either be in the User's Manual for your disk," +echo "or you should have written down what NetBSD printed when booting." +echo "(Note that he geometry that's printed at boot time is preferred.)" +echo "" +echo "You may choose to view the initial boot messages for your system" +echo "again right now if you like." +echo -n "View the boot messages again? [n] " +getresp "n" +case "$resp" in + y*|Y*) + more /kern/msgbuf + ;; + *) + echo "" + ;; +esac + +echo "" +echo "You will now enter the disk geometry information" +echo "" + +echo -n "Number of bytes per disk sector? [512] " +getresp 512 +bytes_per_sect="$resp" + +echo -n "Number of disk cylinders? " +getresp +cyls_per_disk="$resp" + +echo -n "Number of disk tracks (heads) per disk cylinder? " +getresp +tracks_per_cyl="$resp" + +echo -n "Number of disk sectors per disk track? " +getresp +sects_per_track="$resp" + +cylindersize=`expr $sects_per_track \* $tracks_per_cyl` +cylbytes=`expr $cylindersize \* $bytes_per_sect` +disksize=`expr $cylindersize \* $cyls_per_disk` + +echo "" +echo "Your disk has a total of $disksize $bytes_per_sect byte sectors," +echo "arranged as $cyls_per_disk cylinders which contain $cylindersize " +echo "sectors ($cylbytes bytes) each." +echo "" +echo "You can specify partition sizes in cylinders ('c') or sectors ('s')." +while [ "X${sizemult}" = "X" ]; do + echo -n "What units would you like to use? [cylinders] " + getresp cylinders + case "$resp" in + c*|C*) + sizemult=$cylindersize + sizeunit="cylinders" + ;; + s*|S*) + sizemult=1 + sizeunit="sectors" + ;; + *) + echo "" + echo "Enter cylinders ('c') or sectors ('s')." + ;; + esac +done + +if [ $sizeunit = "sectors" ]; then + echo "" + echo "For best disk performance, partitions should begin and end on" + echo "cylinder boundaries. Wherever possible, pick sizes that are" + echo "multiples of the cylinder size ($cylindersize sectors)." +fi + +echo -n "" +echo -n "Size of NetBSD portion of disk (in $sizeunit)? " +getresp +partition=$resp +partition_sects=`expr $resp \* $sizemult` +part_offset=0 +if [ $partition_sects -lt $disksize ]; then + echo -n "Offset of NetBSD portion of disk (in $sizeunit)? " + getresp + part_offset=$resp +fi +badspacesec=0 +if [ "$sect_fwd" = "sf:" ]; then + badspacecyl=`expr $sects_per_track + 126` + badspacecyl=`expr $badspacecyl + $cylindersize - 1` + badspacecyl=`expr $badspacecyl / $cylindersize` + badspacesec=`expr $badspacecyl \* $cylindersize` + echo "" + echo -n "Using $badspacesec sectors ($badspacecyl cylinders) for the " + echo "bad144 bad block table" +fi + +sects_left=`expr $partition_sects - $badspacesec` +units_left=`expr $sects_left / $sizemult` +echo "" +echo "There are $units_left $sizeunit left to allocate." +echo "" +root=0 +while [ $root -eq 0 ]; do + echo -n "Root partition size (in $sizeunit)? " + getresp + case $resp in + [1-9]*) + total=$resp + if [ $total -gt $units_left ]; then + echo -n "Root size is greater than remaining " + echo "free space on disk." + else + root=$resp + fi + ;; + esac +done +root_offset=$part_offset +part_used=`expr $root + $badspacesec / $sizemult` +units_left=`expr $partition - $part_used` +echo "" + +swap=0 +while [ $swap -eq 0 ]; do + echo "$units_left $sizeunit remaining in NetBSD portion of disk." + echo -n "Swap partition size (in $sizeunit)? " + getresp + case $resp in + [1-9]*) + if [ $swap -gt $units_left ]; then + echo -n "Swap size is greater than remaining " + echo "free space on disk." + else + swap=$resp + fi + ;; + esac +done +swap_offset=`expr $root_offset + $root` +part_used=`expr $part_used + $swap` +echo "" + +fragsize=1024 +blocksize=8192 +$DONTDOIT mount -u /dev/rd0 / +cat /etc/disktab.preinstall > $DT +echo "" >> $DT +echo "$labelname|NetBSD installation generated:\\" >> $DT +echo " :dt=${type}:ty=winchester:\\" >> $DT +echo -n " :nc#${cyls_per_disk}:ns#${sects_per_track}" >> $DT +echo ":nt#${tracks_per_cyl}:\\" >> $DT +echo " :se#${bytes_per_sect}:${sect_fwd}\\" >> $DT +_size=`expr $root \* $sizemult` +_offset=`expr $root_offset \* $sizemult` +echo -n " :pa#${_size}:oa#${_offset}" >> $DT +echo ":ta=4.2BSD:ba#${blocksize}:fa#${fragsize}:\\" >> $DT +_size=`expr $swap \* $sizemult` +_offset=`expr $swap_offset \* $sizemult` +echo " :pb#${_size}:ob#${_offset}:tb=swap:\\" >> $DT +_size=`expr $partition \* $sizemult` +echo " :pd#${_size}:od#0:\\" >> $DT + +echo "You will now have to enter information about any other partitions" +echo "to be created in the NetBSD portion of the disk. This process will" +echo "be complete when you've filled up all remaining space in the NetBSD" +echo "portion of the disk." + +while [ $part_used -lt $partition ]; do + part_size=0 + units_left=`expr $partition - $part_used` + while [ $part_size -eq 0 ]; do + echo "" + echo -n "$units_left $sizeunit remaining in NetBSD portion of " + echo "the disk" + echo -n "Next partition size (in $sizeunit)? " + getresp + case $resp in + [1-9]*) + total=`expr $part_used + $resp` + if [ $total -gt $partition ]; then + echo -n "That would make the parition" + echo "too large to fit!" + else + part_size=$resp + part_used=$total + part_name="" + while [ "$part_name" = "" ]; do + echo -n "Mount point? " + getresp + part_name=$resp + done + fi + ;; + esac + done + if [ "$ename" = "" ]; then + ename=$part_name + offset=`expr $part_offset + $root + $swap` + _size=`expr $part_size \* $sizemult` + _offset=`expr $offset \* $sizemult` + echo -n " :pe#${_size}:oe#${_offset}" >> $DT + echo ":te=4.2BSD:be#${blocksize}:fe#${fragsize}:\\" >> $DT + offset=`expr $offset + $part_size` + elif [ "$fname" = "" ]; then + fname=$part_name + _size=`expr $part_size \* $sizemult` + _offset=`expr $offset \* $sizemult` + echo -n " :pf#${_size}:of#${_offset}" >> $DT + echo ":tf=4.2BSD:bf#${blocksize}:ff#${fragsize}:\\" >> $DT + offset=`expr $offset + $part_size` + elif [ "$gname" = "" ]; then + gname=$part_name + _size=`expr $part_size \* $sizemult` + _offset=`expr $offset \* $sizemult` + echo -n " :pg#${_size}:og#${_offset}" >> $DT + echo ":tg=4.2BSD:bg#${blocksize}:fg#${fragsize}:\\" >> $DT + offset=`expr $offset + $part_size` + elif [ "$hname" = "" ]; then + hname=$part_name + _size=`expr $part_size \* $sizemult` + _offset=`expr $offset \* $sizemult` + echo -n " :ph#${_size}:oh#${_offset}" >> $DT + echo ":th=4.2BSD:bh#${blocksize}:fh#${fragsize}:\\" >> $DT + part_used=$partition + fi +done +echo " :pc#${disksize}:oc#0:" >> $DT +sync + +echo "" +echo "THIS IS YOUR LAST CHANCE!!!" +echo "" +echo -n "Are you SURE you want NetBSD installed on your hard drive? (yes/no) " +answer="" +while [ "$answer" = "" ]; do + getresp + case $resp in + yes|YES) + echo "" + echo "Here we go..." + answer=yes + ;; + no|NO) + echo "" + echo -n "OK, then. enter 'halt' to halt the machine. " + exit + ;; + *) + echo -n "I want a yes or no answer... well? " + ;; + esac +done + +echo "" +echo -n "Labeling disk $drivename..." +$DONTDOIT disklabel -w -r $drivename $labelname +echo " done." + +if [ "$sect_fwd" = "sf:" ]; then + echo -n "Initializing bad144 badblock table..." + $DONTDOIT bad144 $drivename 0 + echo " done." +fi + +echo "Initializing root filesystem, and mounting..." +$DONTDOIT newfs /dev/r${drivename}a $name +$DONTDOIT mount -v /dev/${drivename}a /mnt +if [ "$ename" != "" ]; then + echo "" + echo "Initializing $ename filesystem, and mounting..." + $DONTDOIT newfs /dev/r${drivename}e $name + $DONTDOIT mkdir -p /mnt/$ename + $DONTDOIT mount -v /dev/${drivename}e /mnt/$ename +fi +if [ "$fname" != "" ]; then + echo "" + echo "Initializing $fname filesystem, and mounting..." + $DONTDOIT newfs /dev/r${drivename}f $name + $DONTDOIT mkdir -p /mnt/$fname + $DONTDOIT mount -v /dev/${drivename}f /mnt/$fname +fi +if [ "$gname" != "" ]; then + echo "" + echo "Initializing $gname filesystem, and mounting..." + $DONTDOIT newfs /dev/r${drivename}g $name + $DONTDOIT mkdir -p /mnt/$gname + $DONTDOIT mount -v /dev/${drivename}g /mnt/$gname +fi +if [ "$hname" != "" ]; then + echo "" + echo "Initializing $hname filesystem, and mounting..." + $DONTDOIT newfs /dev/r${drivename}h $name + $DONTDOIT mkdir -p /mnt/$hname + $DONTDOIT mount -v /dev/${drivename}h /mnt/$hname +fi + +echo "" +echo "Populating filesystems with bootstrapping binaries and config files" +$DONTDOIT tar --one-file-system -cf - . | (cd /mnt ; tar --unlink -xpf - ) +$DONTDOIT cp /tmp/.hdprofile /mnt/.profile + +echo "" +echo -n "Creating an fstab..." +echo /dev/${drivename}a / ffs rw 1 1 | sed -e s,//,/, > $FSTAB +if [ "$ename" != "" ]; then + echo /dev/${drivename}e /$ename ffs rw 1 2 | sed -e s,//,/, >> $FSTAB +fi +if [ "$fname" != "" ]; then + echo /dev/${drivename}f /$fname ffs rw 1 3 | sed -e s,//,/, >> $FSTAB +fi +if [ "$gname" != "" ]; then + echo /dev/${drivename}g /$gname ffs rw 1 4 | sed -e s,//,/, >> $FSTAB +fi +if [ "$hname" != "" ]; then + echo /dev/${drivename}h /$hname ffs rw 1 5 | sed -e s,//,/, >> $FSTAB +fi +sync +echo " done." + +echo "" +echo "" +echo "OK! The preliminary work of setting up your disk is now complete." +echo "" +echo "The remaining tasks are:" +echo "" +echo "To copy a NetBSD kernel to the hard drive's root filesystem." +echo "Once accomplished, you can boot off the hard drive." +echo "" +echo "To load and install the NetBSD distribution sets." +echo "Currently the hard drive's root filesystem is mounted on /mnt" +echo "" +echo "Consult the installation notes which will describe how to" +echo "install the distribution sets and kernel. Post-installation" +echo "configuration is also discussed therein." +echo "" +echo "GOOD LUCK!" +echo "" diff --git a/distrib/arm32/floppies/inst/list b/distrib/arm32/floppies/inst/list new file mode 100644 index 00000000000..23a9fb8532e --- /dev/null +++ b/distrib/arm32/floppies/inst/list @@ -0,0 +1,11 @@ +# $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 |