head	1.12;
access;
symbols
	perseant-exfatfs-base-20250801:1.12
	perseant-exfatfs-base-20240630:1.12
	perseant-exfatfs:1.12.0.48
	perseant-exfatfs-base:1.12
	cjep_sun2x:1.12.0.46
	cjep_sun2x-base:1.12
	cjep_staticlib_x-base1:1.12
	cjep_staticlib_x:1.12.0.44
	cjep_staticlib_x-base:1.12
	phil-wifi-20200421:1.12
	phil-wifi-20200411:1.12
	phil-wifi-20200406:1.12
	pgoyette-compat-merge-20190127:1.12
	pgoyette-compat-20190127:1.12
	pgoyette-compat-20190118:1.12
	pgoyette-compat-1226:1.12
	pgoyette-compat-1126:1.12
	pgoyette-compat-1020:1.12
	pgoyette-compat-0930:1.12
	pgoyette-compat-0906:1.12
	pgoyette-compat-0728:1.12
	pgoyette-compat-0625:1.12
	pgoyette-compat-0521:1.12
	pgoyette-compat-0502:1.12
	pgoyette-compat-0422:1.12
	pgoyette-compat-0415:1.12
	pgoyette-compat-0407:1.12
	pgoyette-compat-0330:1.12
	pgoyette-compat-0322:1.12
	pgoyette-compat-0315:1.12
	pgoyette-compat:1.12.0.42
	pgoyette-compat-base:1.12
	perseant-stdc-iso10646:1.12.0.40
	perseant-stdc-iso10646-base:1.12
	prg-localcount2-base3:1.12
	prg-localcount2-base2:1.12
	prg-localcount2-base1:1.12
	prg-localcount2:1.12.0.38
	prg-localcount2-base:1.12
	pgoyette-localcount-20170426:1.12
	bouyer-socketcan-base1:1.12
	pgoyette-localcount-20170320:1.12
	bouyer-socketcan:1.12.0.36
	bouyer-socketcan-base:1.12
	pgoyette-localcount-20170107:1.12
	pgoyette-localcount-20161104:1.12
	localcount-20160914:1.12
	pgoyette-localcount-20160806:1.12
	pgoyette-localcount-20160726:1.12
	pgoyette-localcount:1.12.0.34
	pgoyette-localcount-base:1.12
	netbsd-5-2-3-RELEASE:1.12
	netbsd-5-1-5-RELEASE:1.12
	yamt-pagecache-base9:1.12
	yamt-pagecache-tag8:1.12
	tls-earlyentropy:1.12.0.30
	tls-earlyentropy-base:1.12
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.12
	riastradh-drm2-base3:1.12
	netbsd-5-2-2-RELEASE:1.12
	netbsd-5-1-4-RELEASE:1.12
	netbsd-5-2-1-RELEASE:1.12
	netbsd-5-1-3-RELEASE:1.12
	agc-symver:1.12.0.32
	agc-symver-base:1.12
	tls-maxphys-base:1.12
	yamt-pagecache-base8:1.12
	netbsd-5-2:1.12.0.28
	yamt-pagecache-base7:1.12
	netbsd-5-2-RELEASE:1.12
	netbsd-5-2-RC1:1.12
	yamt-pagecache-base6:1.12
	yamt-pagecache-base5:1.12
	yamt-pagecache-base4:1.12
	netbsd-5-1-2-RELEASE:1.12
	netbsd-5-1-1-RELEASE:1.12
	yamt-pagecache-base3:1.12
	yamt-pagecache-base2:1.12
	yamt-pagecache:1.12.0.26
	yamt-pagecache-base:1.12
	bouyer-quota2-nbase:1.12
	bouyer-quota2:1.12.0.24
	bouyer-quota2-base:1.12
	matt-nb5-pq3:1.12.0.22
	matt-nb5-pq3-base:1.12
	netbsd-5-1:1.12.0.20
	netbsd-5-1-RELEASE:1.12
	netbsd-5-1-RC4:1.12
	netbsd-5-1-RC3:1.12
	netbsd-5-1-RC2:1.12
	netbsd-5-1-RC1:1.12
	netbsd-5-0-2-RELEASE:1.12
	netbsd-5-0-1-RELEASE:1.12
	jym-xensuspend-nbase:1.12
	netbsd-5-0:1.12.0.18
	netbsd-5-0-RELEASE:1.12
	netbsd-5-0-RC4:1.12
	netbsd-5-0-RC3:1.12
	netbsd-5-0-RC2:1.12
	jym-xensuspend:1.12.0.16
	jym-xensuspend-base:1.12
	netbsd-5-0-RC1:1.12
	netbsd-5:1.12.0.14
	netbsd-5-base:1.12
	yamt-pf42-base4:1.12
	yamt-pf42-base3:1.12
	hpcarm-cleanup-nbase:1.12
	yamt-pf42-base2:1.12
	yamt-pf42:1.12.0.12
	yamt-pf42-base:1.12
	mjf-devfs2:1.12.0.10
	mjf-devfs2-base:1.12
	keiichi-mipv6:1.12.0.8
	keiichi-mipv6-base:1.12
	mjf-devfs:1.12.0.6
	mjf-devfs-base:1.12
	cube-autoconf:1.12.0.4
	cube-autoconf-base:1.12
	hpcarm-cleanup:1.12.0.2
	hpcarm-cleanup-base:1.12
	netbsd-1-5-PATCH003:1.10.2.2
	netbsd-1-5-PATCH002:1.10.2.2
	netbsd-1-5-PATCH001:1.10.2.2
	netbsd-1-5-RELEASE:1.10.2.1
	netbsd-1-5-BETA2:1.10.2.1
	netbsd-1-5-BETA:1.10.2.1
	netbsd-1-4-PATCH003:1.4.2.4
	netbsd-1-5-ALPHA2:1.10
	netbsd-1-5:1.10.0.2
	netbsd-1-5-base:1.10
	minoura-xpg4dl:1.8.0.6
	minoura-xpg4dl-base:1.8
	netbsd-1-4-PATCH002:1.4.2.4
	wrstuden-devbsize-19991221:1.8
	wrstuden-devbsize:1.8.0.4
	wrstuden-devbsize-base:1.8
	comdex-fall-1999:1.8.0.2
	comdex-fall-1999-base:1.8
	netbsd-1-4-PATCH001:1.4.2.4
	netbsd-1-4-RELEASE:1.4.2.3
	netbsd-1-4:1.4.0.2
	netbsd-1-4-base:1.4
	netbsd-1-3-PATCH003:1.1.2.1
	netbsd-1-3-PATCH003-CANDIDATE2:1.1.2.1
	netbsd-1-3-PATCH003-CANDIDATE1:1.1.2.1
	netbsd-1-3-PATCH003-CANDIDATE0:1.1.2.1
	netbsd-1-3-PATCH002:1.1
	netbsd-1-3-PATCH001:1.1
	netbsd-1-3-RELEASE:1.1
	netbsd-1-3-BETA:1.1
	netbsd-1-3:1.1.0.2
	netbsd-1-3-base:1.1;
locks; strict;
comment	@# @;


1.12
date	2000.11.28.03.03.29;	author minoura;	state dead;
branches;
next	1.11;

1.11
date	2000.09.12.15.40.00;	author minoura;	state Exp;
branches;
next	1.10;

1.10
date	2000.06.14.22.52.49;	author cgd;	state Exp;
branches
	1.10.2.1;
next	1.9;

1.9
date	2000.06.14.06.48.58;	author cgd;	state Exp;
branches;
next	1.8;

1.8
date	99.05.01.10.59.55;	author minoura;	state Exp;
branches;
next	1.7;

1.7
date	99.04.19.22.44.37;	author minoura;	state Exp;
branches;
next	1.6;

1.6
date	99.04.15.15.21.41;	author minoura;	state Exp;
branches;
next	1.5;

1.5
date	99.04.02.15.46.35;	author minoura;	state Exp;
branches;
next	1.4;

1.4
date	99.03.24.15.54.46;	author minoura;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	99.01.25.23.34.25;	author garbled;	state Exp;
branches;
next	1.2;

1.2
date	98.10.01.16.49.11;	author minoura;	state Exp;
branches;
next	1.1;

1.1
date	97.10.19.15.29.14;	author oki;	state Exp;
branches
	1.1.2.1;
next	;

1.10.2.1
date	2000.09.14.14.15.24;	author minoura;	state Exp;
branches;
next	1.10.2.2;

1.10.2.2
date	2000.12.15.05.30.16;	author he;	state dead;
branches;
next	;

1.4.2.1
date	99.04.02.23.56.29;	author minoura;	state Exp;
branches;
next	1.4.2.2;

1.4.2.2
date	99.04.15.16.36.16;	author minoura;	state Exp;
branches;
next	1.4.2.3;

1.4.2.3
date	99.04.20.14.22.52;	author perry;	state Exp;
branches;
next	1.4.2.4;

1.4.2.4
date	99.06.21.13.52.54;	author perry;	state Exp;
branches;
next	;

1.1.2.1
date	98.10.24.01.05.59;	author cgd;	state Exp;
branches;
next	;


desc
@@


1.12
log
@Reorganize (again) the installation system.
 - Remove historical `script' installer, which was provided for
  4MB RAM systems.
 - Instead we provide `floppy-root' installer, which is composed
  of 2 floppies just like the installation system used in the netbsd-1-2
  days; one floppy contains (GENERIC) kernel and the other contains
  the miniroot.
 - The miniroots for both `ramdisk-root' installation system and
  `floppy-root' installation system are identical.
@
text
@#!/bin/sh
# $NetBSD: upgrade.tmpl,v 1.11 2000/09/12 15:40:00 minoura 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.
# 
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>

#	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="-T ffs:-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.  Once the machine has halted, remove the"
		echo	"floppy and press any key to reboot."
		exit
		;;
esac

# find out what units are possible, and query the user.
driveunits=`ls /dev/sd?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	""
echo	"If (and only if!) you are upgrading from NetBSD 0.9 or below,"
echo	"you should upgrade to the new file system format. Do not answer"
echo	"yes if you are upgrading from NetBSD 1.0 or above."
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	"If you are upgrading from NetBSD 0.9 or below,"
		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."
		upgrargs=""
		upgradefs=NO
		;;
	*)
		upgrargs=$UARGS
		upgradefs=YES
		;;
esac

echo	""
echo	"You may have to increase the virtual memory by activating"
echo	"the swap device if your machine has only 4MB memory installed, or,"
echo	"if one or more of your NetBSD disk partitions are very large."
echo	""
if [ `sysctl -n hw.physmem` -le 4194304 ]; then # less than 4megs
    defresp=y
else
    defresp=n
fi

echo -n	"Add ${drivename}b as swap device? [${defresp}]"

getresp $defresp
case $resp in
    n*)
	echo	""
	echo	"Swapping is not enabled."
	;;
    *)
	echo	""
	echo	"Good.  Configuring the swap device..."
	swapctl -a /dev/${drivename}b
	;;
esac

if [ $upgradefs = YES ]; then
	echo	""
	echo	"your file systems will be upgraded while they are checked"
fi

echo	"Do not be alarmed by the message \"fsck: Cannot open \`/etc/fstab'\"."
echo	"checking the file system on ${drivename}a..."
	
fsck -f -p $upgrargs /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..."
cd / ; pax -wr sbin/fsck* /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
echo	" Done."

echo	""
echo    "Re-mounting root partition read-only..."
sync
mount -u -r /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 $upgrargs
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	"Updating boot blocks on ${drivename}..."
# shouldn't be needed, but...
$DONTDOIT /usr/mdec/installboot /usr/mdec/sdboot /dev/r${drivename}a
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	""
@


1.11
log
@Reduce ramdisk size by using hacked commands in distrib/utils.
@
text
@d2 1
a2 1
# $NetBSD: upgrade.tmpl,v 1.10 2000/06/14 22:52:49 cgd Exp $
@


1.10
log
@sweep of my licenses for consistency.  (no functional changes)  These
files have copyright held by people in addition to myself.  (I did the
original work, they copied it, enhanced it, and added their copyright
to the derivative work.)  Their approval has been given re: the license
change.
@
text
@d2 1
a2 1
# $NetBSD: upgrade.tmpl,v 1.9 2000/06/14 06:48:58 cgd Exp $
d152 1
a152 1
if [ `cat /kern/physmem` -le 1024 ]; then # less than 4megs
d249 1
a249 1
$DONTDOIT dd if=/usr/mdec/sdboot of=/dev/r${drivename}a conv=sync
a278 7

if [ `cat /kern/physmem` -le 1024 ]; then # less than 4megs
    echo	""
    echo	"Note that you have to use the SMALL kernel named"
    echo	"netbsd.SMALL in x68k/binary/kernel/ directory instead of"
    echo	"the standard kernel which is included the kern.tgz."
fi
@


1.10.2.1
log
@Pullup from the trunk; approved by thorpej.

> From: Minoura Makoto <minoura@@netbsd.org>
> Subject: CVS commit: syssrc
> To: source-changes@@netbsd.org
> Date: Tue, 12 Sep 2000 18:40:02 +0300 (EEST)
> Reply-To: minoura@@netbsd.org
>
>
> Module Name:	syssrc
> Committed By:	minoura
> Date:		Tue Sep 12 15:40:01 UTC 2000
>
> Modified Files:
> 	basesrc/distrib/x68k/floppies/ramdisk: Makefile dot.hdprofile
> 	    dot.profile install.tmpl list ramdiskbin.conf upgrade.tmpl
> 	syssrc/sys/arch/x68k/conf: INSTALL_SMALL
>
> Log Message:
> Reduce ramdisk size by using hacked commands in distrib/utils.
>
>
> To generate a diff of this commit:
> cvs rdiff -r1.16 -r1.17 basesrc/distrib/x68k/floppies/ramdisk/Makefile
> cvs rdiff -r1.7 -r1.8 basesrc/distrib/x68k/floppies/ramdisk/dot.hdprofile
> cvs rdiff -r1.10 -r1.11 basesrc/distrib/x68k/floppies/ramdisk/dot.profile \
>     basesrc/distrib/x68k/floppies/ramdisk/install.tmpl \
>     basesrc/distrib/x68k/floppies/ramdisk/upgrade.tmpl
> cvs rdiff -r1.11 -r1.12 basesrc/distrib/x68k/floppies/ramdisk/list
> cvs rdiff -r1.8 -r1.9 basesrc/distrib/x68k/floppies/ramdisk/ramdiskbin.conf
> cvs rdiff -r1.5 -r1.6 syssrc/sys/arch/x68k/conf/INSTALL_SMALL
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
@
text
@d2 1
a2 1
# $NetBSD: upgrade.tmpl,v 1.10 2000/06/14 22:52:49 cgd Exp $
d152 1
a152 1
if [ `sysctl -n hw.physmem` -le 4194304 ]; then # less than 4megs
d249 1
a249 1
$DONTDOIT /usr/mdec/installboot /usr/mdec/sdboot /dev/r${drivename}a
d279 7
@


1.10.2.2
log
@Pull up file removal (requested by minoura):
  Reorganize installation system by removing the old script based
  installer, provided for 4M systems.  Instead we provide
  ``floppy-root'' 2-floppy installer.
@
text
@d2 1
a2 1
# $NetBSD: upgrade.tmpl,v 1.10.2.1 2000/09/14 14:15:24 minoura Exp $
@


1.9
log
@fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well.  No functional changes.
@
text
@d2 1
a2 1
# $NetBSD: upgrade.tmpl,v 1.8 1999/05/01 10:59:55 minoura Exp $
d4 1
a5 1
# Copyright (c) 1997 Perry E. Metzger
d7 1
a7 1
#
d18 3
a20 3
#	This product includes software developed by Christopher G. Demetriou.
#	This product includes software developed for the NetBSD Project
#	by Perry E. Metzger.
d22 2
a23 2
#    derived from this software without specific prior written permission
#
d34 2
@


1.8
log
@Forgotten part in 1.7.
Copy /sbin/fsck_ffs with /sbin/fsck.
@
text
@d2 1
a2 2
#
#	$NetBSD: upgrade.tmpl,v 1.7 1999/04/19 22:44:37 minoura Exp $
a33 1
#
@


1.7
log
@Two changes.
 - Now that fsck is only the wrapper for fsck_*, ffs upgrade options
 should passed through with -T option.  fsck_ffs is also required to
 be copied with fsck.
 - fsck_ffs may request large memory when the partition is big.
 Configure swap device even when the RAM > 4MB.
@
text
@d3 1
a3 1
#	$NetBSD: upgrade.tmpl,v 1.6 1999/04/15 15:21:41 minoura Exp $
d202 1
a202 4
if [ ! -d /mnt/sbin ]; then
	mkdir /mnt/sbin
fi
cp /sbin/fsck /mnt/sbin/fsck
@


1.6
log
@swapon only if physmem <= 4MB.
swapon before fsck.  This is needed if the connected disk is large.
Other message cosmetics.
@
text
@d3 1
a3 1
#	$NetBSD: upgrade.tmpl,v 1.5 1999/04/02 15:46:35 minoura Exp $
d44 1
a44 1
UARGS="-c 2"
d147 5
d153 10
d164 3
a166 3
	echo	"You have to increase the virtual memory by activating"
	echo	"the swap device especially if you are going to retrieve"
	echo	"the distribution sets via network."
d168 4
a171 19
	echo -n	"Enable swapping? (yes/no)"
	getresp "y"
	case $resp in
		n*)
			echo	""
			echo	"Good, swapping is not enabled."
			;;
		*)
			echo	""
			echo	"Here we go..."
			swapctl -a /dev/${drivename}b
			;;
	esac
	echo	""
	echo	"Note that you have to use the SMALL kernel named"
	echo	"netbsd.SMALL in x68k/binary/kernel/ directory instead of"
	echo	"the standard kernel which is included the kern.tgz."
	echo	""
fi
d178 1
d216 2
a217 1
umount /mnt && mount -r /dev/${drivename}a /mnt
d282 8
@


1.5
log
@SMALL kernel is not included in kern.tgz.
@
text
@d3 1
a3 1
#	$NetBSD: upgrade.tmpl,v 1.4 1999/03/24 15:54:46 minoura Exp $
d147 26
a269 25

if [ `cat /kern/physmem` -lt 1536 ]; then # less than 6megs
	echo	""
	echo	"You have to increase the virtual memory by activating"
	echo	"the swap device you have just configured"
	echo	"especially if you are going to retrieve the distribution sets"
	echo	"via network."
	echo -n	"Enable swapping? (yes/no)"
	getresp "y"
	case $resp in
		n*)
			echo	""
			echo	"OK, swapping is not enabled."
			;;
		*)
			echo	""
			echo	"Here we go..."
			swapctl -a /dev/${drivename}b
			;;
	esac
	echo	""
	echo	"Note that you have to use the SMALL kernel named"
	echo	"netbsd.SMALL in x68k/binary/kernel/ directory instead of"
	echo	"the standard kernel which is included the kern.tgz."
fi
@


1.4
log
@Mostly imported from netbsd-1-3 branch (1.3.3 and 1.3.4)
 - Set ${driveunits} correctly.
 - swapon on small memory machines.
@
text
@d3 1
a3 1
#	$NetBSD: upgrade.tmpl,v 1.3 1999/01/25 23:34:25 garbled Exp $
d266 2
a267 4
	echo	"netbsd.SMALL which is included in the kern.tgz"
	echo	"distribution set instead of the standard kernel."
	echo	"After you have extracted the kern.tgz distribution set,"
	echo	"type \`mv /mnt/netbsd.SMALL /mnt/netbsd'."
@


1.4.2.1
log
@SMALL kernel is not included in kern.tgz.
@
text
@d3 1
a3 1
#	$NetBSD: upgrade.tmpl,v 1.4 1999/03/24 15:54:46 minoura Exp $
d266 4
a269 2
	echo	"netbsd.SMALL in x68k/binary/kernel/ directory instead of"
	echo	"the standard kernel which is included the kern.tgz."
@


1.4.2.2
log
@Pullup rev.1.6.
@
text
@d3 1
a3 1
#	$NetBSD: upgrade.tmpl,v 1.4.2.1 1999/04/02 23:56:29 minoura Exp $
a146 26
if [ `cat /kern/physmem` -le 1024 ]; then # less than 4megs
	echo	""
	echo	"You have to increase the virtual memory by activating"
	echo	"the swap device especially if you are going to retrieve"
	echo	"the distribution sets via network."
	echo	""
	echo -n	"Enable swapping? (yes/no)"
	getresp "y"
	case $resp in
		n*)
			echo	""
			echo	"Good, swapping is not enabled."
			;;
		*)
			echo	""
			echo	"Here we go..."
			swapctl -a /dev/${drivename}b
			;;
	esac
	echo	""
	echo	"Note that you have to use the SMALL kernel named"
	echo	"netbsd.SMALL in x68k/binary/kernel/ directory instead of"
	echo	"the standard kernel which is included the kern.tgz."
	echo	""
fi

d244 25
@


1.4.2.3
log
@pullup 1.6->1.7 (minoura makoto)
@
text
@d3 1
a3 1
#	$NetBSD: upgrade.tmpl,v 1.4.2.2 1999/04/15 16:36:16 minoura Exp $
d44 1
a44 1
UARGS="-T ffs:-c=2"
a146 5
echo	""
echo	"You may have to increase the virtual memory by activating"
echo	"the swap device if your machine has only 4MB memory installed, or,"
echo	"if one or more of your NetBSD disk partitions are very large."
echo	""
a147 10
    defresp=y
else
    defresp=n
fi

echo -n	"Add ${drivename}b as swap device? [${defresp}]"

getresp $defresp
case $resp in
    n*)
d149 21
a169 3
	echo	"Swapping is not enabled."
	;;
    *)
d171 1
a171 4
	echo	"Good.  Configuring the swap device..."
	swapctl -a /dev/${drivename}b
	;;
esac
a177 1
echo	"Do not be alarmed by the message \"fsck: Cannot open \`/etc/fstab'\"."
d215 1
a215 2
sync
mount -u -r /dev/${drivename}a /mnt
a279 8

if [ `cat /kern/physmem` -le 1024 ]; then # less than 4megs
    echo	""
    echo	"Note that you have to use the SMALL kernel named"
    echo	"netbsd.SMALL in x68k/binary/kernel/ directory instead of"
    echo	"the standard kernel which is included the kern.tgz."
fi

@


1.4.2.4
log
@pullup 1.7->1.8 (minoura)
@
text
@d3 1
a3 1
#	$NetBSD: upgrade.tmpl,v 1.4.2.3 1999/04/20 14:22:52 perry Exp $
d202 4
a205 1
cd / ; pax -wr sbin/fsck* /mnt
@


1.3
log
@1) Remove all vestiges of tar from src/distrib.  Use pax and appropriate
commandlines for all tar operations.  (work supplied by Matt Green)
2) Update arch/*/md.c to deal with new sysinst/run.c.  Special case
anything that needs to do a redirect or a pipe.
3) #if 0 some unused code in target.c. This code will need to be updated,
or special cased with do_system.

Big thank you to Matt for all his work on this.
@
text
@d3 1
a3 1
#	$NetBSD: upgrade.tmpl,v 1.2 1998/10/01 16:49:11 minoura Exp $
d90 1
a90 1
driveunits=`ls /dev/[sw]d?a | sed -e 's,/dev/\(...\)a,\1,g'`
d244 27
@


1.2
log
@They won't work :-p
@
text
@d3 1
a3 1
#	$NetBSD: upgrade.tmpl,v 1.1 1997/10/19 15:29:14 oki Exp $
d236 1
a236 1
$DONTDOIT tar --exclude etc --one-file-system -cf - . | (cd /mnt ; tar --unlink -xpf - )
@


1.1
log
@Initial commit of installer use ramdisk image.
lifted from i386, modified for x68k by me.
@
text
@d3 1
a3 1
#	$NetBSD: upgrade.tmpl,v 1.2 1997/06/18 00:11:28 perry Exp $
d189 1
a189 1
mount -u -o ro /dev/${drivename}a /mnt
d224 1
a224 2
$DONTDOIT rm -f /mnt/boot
$DONTDOIT /usr/mdec/installboot /usr/mdec/biosboot.sym /dev/r${drivename}a
@


1.1.2.1
log
@pull up rev 1.2 from trunk (via patch).  (minoura)
@
text
@d3 1
a3 1
#	$NetBSD: upgrade.tmpl,v 1.1 1997/10/19 15:29:14 oki Exp $
d189 1
a189 1
umount /mnt && mount -r /dev/${drivename}a /mnt
d223 3
a225 1
$DONTDOIT dd if=/usr/mdec/sdboot of=/dev/r${drivename}a conv=sync
@
