3 # $NetBSD: install.md,v 1.3 2003/03/07 16:57:46 he Exp $
5 # Copyright (c) 1996 The NetBSD Foundation, Inc.
8 # This code is derived from software contributed to The NetBSD Foundation
11 # Redistribution and use in source and binary forms, with or without
12 # modification, are permitted provided that the following conditions
14 # 1. Redistributions of source code must retain the above copyright
15 # notice, this list of conditions and the following disclaimer.
16 # 2. Redistributions in binary form must reproduce the above copyright
17 # notice, this list of conditions and the following disclaimer in the
18 # documentation and/or other materials provided with the distribution.
20 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 # POSSIBILITY OF SUCH DAMAGE.
34 # machine dependent section of installation/upgrade script
37 # Machine-dependent install sets
41 if [ ! -z "$TERM" ]; then
44 echo -n "Specify terminal type [vt220]: "
51 md_makerootwritable
() {
52 # Was: do_mfs_mount "/tmp" "2048"
53 # /tmp is the mount point
54 # 2048 is the size in DEV_BIZE blocks
56 umount
/tmp
> /dev
/null
2>&1
57 if ! mount_mfs
-s 2048 swap
/tmp
; then
58 cat << \__mfs_failed_1
60 FATAL ERROR
: Can
't mount the memory filesystem.
66 # Bleh. Give mount_mfs a chance to DTRT.
71 # return available disk devices
72 dmesg | awk -F : '/^sd
[0-9]*:.
*cylinders
/ { print
$1; }' | sort -u
76 # return available CD-ROM devices
77 dmesg | awk -F : '/cd[0-9]*:.
*CD-ROM
/ { print
$1; }' | sort -u
81 # return available network interfaces
82 dmesg | awk -F : '/^ae
[0-9]*:/ { print
$1; }' | sort -u
83 dmesg | awk -F : '/^sn
[0-9]*:/ { print
$1; }' | sort -u
89 # We don't have boot blocks. Sigh.
92 md_checkfordisklabel
() {
93 # $1 is the disk to check
95 # We don't support labels on the mac68k port. (Yet.)
101 # $1 is the disk to label
103 # We don't support labels on the mac68k port. (Yet.)
106 md_prep_disklabel
() {
107 # $1 is the root disk
109 # We don't support labels on the mac68k port. (Yet.)
113 echo -n "Copying kernel..."
114 cp -p /netbsd
/mnt
/netbsd
118 # Note, while they might not seem machine-dependent, the
119 # welcome banner and the punt message may contain information
120 # and/or instructions specific to the type of machine.
122 md_welcome_banner
() {
125 echo "Welcome to the NetBSD/mac68k ${VERSION} installation program."
126 cat << \__welcome_banner_1
128 This program is designed to
help you
install NetBSD on your system
in a
129 simple and rational way. You
'll be asked several questions, and it would
130 probably be useful to have your disk's hardware manual
, the installation
131 notes
, and a calculator handy.
133 In particular
, you will need to know some reasonably detailed
134 information about your disk
's geometry. This program can determine
135 some limited information about certain specific types of HP-IB disks.
136 If you have SCSI disks, however, prior knowledge of disk geometry
137 is absolutely essential. The kernel will attempt to display geometry
138 information for SCSI disks during boot, if possible. If you did not
139 make it note of it before, you may wish to reboot and jot down your
140 disk's geometry before proceeding.
142 As with anything
which modifies your hard disk
's contents, this
143 program can cause SIGNIFICANT data loss, and you are advised
144 to make sure your hard drive is backed up before beginning the
145 installation process.
147 Default answers are displyed in brackets after the questions.
148 You can hit Control-C at any time to quit, but if you do so at a
149 prompt, you may have to hit return. Also, quitting in the middle of
150 installation may leave your system in an inconsistent state.
156 md_not_going_to_install() {
157 cat << \__not_going_to_install_1
159 OK, then. Enter 'halt
' at the prompt to halt the machine. Once the
160 machine has halted, power-cycle the system to load new boot code.
162 __not_going_to_install_1
166 cat << \__congratulations_1
168 CONGRATULATIONS! You have successfully installed NetBSD! To boot the
169 installed system, enter halt at the command prompt. Once the system has
170 halted, power-cycle the machine in order to load new boot code. Make sure
171 you boot from the root disk.