1#!/bin/sh 2# 3# $NetBSD: install.md,v 1.2 1997/10/09 07:25:49 jtc Exp $ 4# 5# Copyright (c) 1996 The NetBSD Foundation, Inc. 6# All rights reserved. 7# 8# This code is derived from software contributed to The NetBSD Foundation 9# by Jason R. Thorpe. 10# 11# Redistribution and use in source and binary forms, with or without 12# modification, are permitted provided that the following conditions 13# are met: 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. 19# 3. All advertising materials mentioning features or use of this software 20# must display the following acknowledgement: 21# This product includes software developed by the NetBSD 22# Foundation, Inc. and its contributors. 23# 4. Neither the name of The NetBSD Foundation nor the names of its 24# contributors may be used to endorse or promote products derived 25# from this software without specific prior written permission. 26# 27# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 28# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 29# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 30# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 31# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 32# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 33# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37# POSSIBILITY OF SUCH DAMAGE. 38# 39 40# 41# machine dependent section of installation/upgrade script 42# 43 44# Machine-dependent install sets 45MDSETS="" 46 47md_set_term() { 48 if [ ! -z "$TERM" ]; then 49 return 50 fi 51 echo -n "Specify terminal type [vt220]: " 52 getresp "vt220" 53 TERM="$resp" 54 export TERM 55 # XXX call tset? 56} 57 58md_makerootwritable() { 59 # Was: do_mfs_mount "/tmp" "2048" 60 # /tmp is the mount point 61 # 2048 is the size in DEV_BIZE blocks 62 63 umount /tmp > /dev/null 2>&1 64 if ! mount_mfs -s 2048 swap /tmp ; then 65 cat << \__mfs_failed_1 66 67FATAL ERROR: Can't mount the memory filesystem. 68 69__mfs_failed_1 70 exit 71 fi 72 73 # Bleh. Give mount_mfs a chance to DTRT. 74 sleep 2 75} 76 77md_get_diskdevs() { 78 # return available disk devices 79 dmesg | grep "^sd[0-9]*:.*cylinders" | cut -d":" -f1 | sort -u 80} 81 82md_get_cddevs() { 83 # return available CD-ROM devices 84 dmesg | grep "cd[0-9]*:.*CD-ROM" | cut -d":" -f1 | sort -u 85} 86 87md_get_ifdevs() { 88 # return available network interfaces 89 dmesg | grep "^ae[0-9]*:" | cut -d":" -f1 | sort -u 90 dmesg | grep "^sn[0-9]*:" | cut -d":" -f1 | sort -u 91} 92 93md_installboot() { 94 # $1 is the root disk 95 96 # We don't have boot blocks. Sigh. 97} 98 99md_checkfordisklabel() { 100 # $1 is the disk to check 101 102 # We don't support labels on the mac68k port. (Yet.) 103 104 rval="0" 105} 106 107md_labeldisk() { 108 # $1 is the disk to label 109 110 # We don't support labels on the mac68k port. (Yet.) 111} 112 113md_prep_disklabel() { 114 # $1 is the root disk 115 116 # We don't support labels on the mac68k port. (Yet.) 117} 118 119md_copy_kernel() { 120 echo -n "Copying kernel..." 121 cp -p /netbsd /mnt/netbsd 122 echo "done." 123} 124 125 # Note, while they might not seem machine-dependent, the 126 # welcome banner and the punt message may contain information 127 # and/or instructions specific to the type of machine. 128 129md_welcome_banner() { 130( 131 echo "" 132 echo "Welcome to the NetBSD/mac68k ${VERSION} installation program." 133 cat << \__welcome_banner_1 134 135This program is designed to help you install NetBSD on your system in a 136simple and rational way. You'll be asked several questions, and it would 137probably be useful to have your disk's hardware manual, the installation 138notes, and a calculator handy. 139 140In particular, you will need to know some reasonably detailed 141information about your disk's geometry. This program can determine 142some limited information about certain specific types of HP-IB disks. 143If you have SCSI disks, however, prior knowledge of disk geometry 144is absolutely essential. The kernel will attempt to display geometry 145information for SCSI disks during boot, if possible. If you did not 146make it note of it before, you may wish to reboot and jot down your 147disk's geometry before proceeding. 148 149As with anything which modifies your hard disk's contents, this 150program can cause SIGNIFICANT data loss, and you are advised 151to make sure your hard drive is backed up before beginning the 152installation process. 153 154Default answers are displyed in brackets after the questions. 155You can hit Control-C at any time to quit, but if you do so at a 156prompt, you may have to hit return. Also, quitting in the middle of 157installation may leave your system in an inconsistent state. 158 159__welcome_banner_1 160) | more 161} 162 163md_not_going_to_install() { 164 cat << \__not_going_to_install_1 165 166OK, then. Enter 'halt' at the prompt to halt the machine. Once the 167machine has halted, power-cycle the system to load new boot code. 168 169__not_going_to_install_1 170} 171 172md_congrats() { 173 cat << \__congratulations_1 174 175CONGRATULATIONS! You have successfully installed NetBSD! To boot the 176installed system, enter halt at the command prompt. Once the system has 177halted, power-cycle the machine in order to load new boot code. Make sure 178you boot from the root disk. 179 180__congratulations_1 181} 182 183md_native_fstype() { 184 # Nothing to do. 185} 186 187md_native_fsopts() { 188 # Nothing to do. 189} 190