1 # $NetBSD: dot.profile,v 1.19 2008/04/30 13:10:49 martin Exp $
3 # Copyright (c) 2000 The NetBSD Foundation, Inc.
6 # This code is derived from software contributed to The NetBSD Foundation
9 # Redistribution and use in source and binary forms, with or without
10 # modification, are permitted provided that the following conditions
12 # 1. Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 # 2. Redistributions in binary form must reproduce the above copyright
15 # notice, this list of conditions and the following disclaimer in the
16 # documentation and/or other materials provided with the distribution.
18 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 # POSSIBILITY OF SUCH DAMAGE.
31 PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
43 if [ "${BOOTFS_DONEPROFILE}" != "YES" ]; then
45 BOOTFS_DONEPROFILE=YES
46 export BOOTFS_DONEPROFILE
48 # mount root read-write
49 mount_ffs -o update /dev/md0a /
52 mount_mfs -s $MINIROOT_FSSIZE -i $MINIROOT_BPINODE swap $INSTFS_MP
67 if [ "$_resp" = "" ]; then
81 echo "Ejecting floppy disk"
85 Remove the boot disk from the floppy station and insert the second disk of
86 the floppy installation set into the disk drive.
88 The question below allows you to specify the device name of the floppy
89 drive. Usually, the default device will do just fine.
91 echo -n "Floppy device to load the installation utilities from [$dev]: "
92 getresp "$dev"; dev="$_resp"
94 echo "Extracting installation utilities... "
95 (cd $INSTFS_MP && tar zxpf $dev) || rval=1
97 echo "Ejecting floppy disk"
106 By default, the installation utilities are located in the second tape file
107 on the NetBSD/sparc installation tape. In case your tape layout is different,
108 choose the appropriate tape file number below.
112 echo -n "Tape device to load the installation utilities from [$dev]: "
113 getresp "$dev"; dev="$_resp"
116 echo -n "Tape file number [$fn]: "
117 getresp "$fn"; fn="$_resp"
119 echo -n "Tape block size (use only if you know you need it): "
120 getresp ""; if [ "$_resp" != "" ]; then
124 echo "Positioning tape... "
125 mt -f $dev asf $(($fn - 1))
126 [ $? = 0 ] || return 1
128 echo "Extracting installation utilities... "
129 (cd $INSTFS_MP && tar $bsa -z -x -p -f $dev) || return 1
136 The installation utilities are located on the ISO CD9660 filesystem on the
137 NetBSD/sparc CD-ROM. We need to mount the filesystem from the CD-ROM device
138 which you can specify below. Note: after the installation utilities are
139 extracted this filesystem will be unmounted again.
145 echo -n "CD-ROM device to use [$dev]: "
146 getresp "$dev"; dev="$_resp"
148 mount_cd9660 -o rdonly $dev /cdrom || return 1
150 # Look for instfs.tgz in MACHINE subdirectory first
151 tf=/cdrom/$MACHINE/installation/bootfs/instfs.tgz
152 [ -f $tf ] || tf=/cdrom/installation/bootfs/instfs.tgz
154 echo "Note: instfs.tgz image not found in default location"
159 echo -n "Path to instfs.tgz [$tf] "
160 [ -z "$tf" ] && echo -n "(<return> to abort) "
161 getresp "$tf"; tf="$_resp"
162 [ -z "$tf" ] && { rval=1; break; }
163 [ -f "$tf" ] && break;
168 [ $rval = 0 ] && (cd $INSTFS_MP && tar zxpf $tf) || rval=1
175 Welcome to the NetBSD/sparc microroot setup utility.
177 We've just completed the first stage of a two-stage procedure to load a
178 fully functional NetBSD installation environment on your machine. In the
179 second stage which is to follow now, a set of additional installation
180 utilities must be load from your NetBSD/sparc installation medium.
186 This procedure supports one of the following media:
193 echo -n "Installation medium to load the additional utilities from: "
197 1|cdrom) _func=cdrom;;
199 3|floppy) _func=floppy;;
200 *) echo "option not supported"; continue;;
205 # switch to /instfs, and pretend we logged in there.
206 chroot $INSTFS_MP /bin/sh /.profile
209 echo "Back in microroot; halting machine..."