From 63033551c5381c29e9871f0fc7880cc24e73d4e7 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 16 Nov 1995 14:20:12 +0000 Subject: update from netbsd --- distrib/atari/inst-common/dot.commonutils | 16 +- distrib/hp300/miniroot/inst-common/instbin.conf | 12 +- distrib/hp300/miniroot/inst-common/list | 9 +- distrib/hp300/miniroot/inst/install.sh | 493 +++++++++-- distrib/hp300/miniroot/inst/list | 5 +- distrib/hp300/miniroot/inst/upgrade.sh | 1037 +++++++++++++++++++++++ distrib/notes/hp300/contents | 94 +- distrib/notes/hp300/hardware | 57 +- distrib/notes/hp300/install | 236 +----- distrib/notes/hp300/legal | 8 +- distrib/notes/hp300/prep | 289 ++++--- distrib/notes/hp300/upgrade | 93 +- distrib/notes/hp300/whatis | 2 +- distrib/notes/hp300/xfer | 132 +-- distrib/notes/pc532/contents | 61 +- distrib/notes/pc532/install | 76 +- distrib/notes/pc532/upgrade | 32 +- distrib/notes/sparc/contents | 2 +- distrib/notes/sparc/install | 74 +- distrib/notes/sparc/xfer | 8 +- distrib/pc532/floppies/inst/install.sh | 12 +- distrib/sets/lists/base/mi | 1 - 22 files changed, 2073 insertions(+), 676 deletions(-) create mode 100644 distrib/hp300/miniroot/inst/upgrade.sh diff --git a/distrib/atari/inst-common/dot.commonutils b/distrib/atari/inst-common/dot.commonutils index 52edee385dc..09588224842 100644 --- a/distrib/atari/inst-common/dot.commonutils +++ b/distrib/atari/inst-common/dot.commonutils @@ -1,5 +1,5 @@ # -# $NetBSD: dot.commonutils,v 1.2 1995/05/28 10:50:13 leo Exp $ +# $NetBSD: dot.commonutils,v 1.2.2.1 1995/11/15 22:01:35 leo Exp $ # # Copyright (c) 1994 Christopher G. Demetriou # All rights reserved. @@ -34,11 +34,17 @@ # the hard disk. These are meant to be invoked from the shell prompt, # by people installing NetBSD. +# we know that /etc/fstab is only generated on the hard drive +dest_dir=/ +if [ ! -f /etc/fstab ]; then + dest_dir=/mnt/ +fi + Set_tmp_dir() { def_tmp_dir=`pwd` if [ "$def_tmp_dir" = "/" -o "$def_tmp_dir" = "/mnt" ]; then - def_tmp_dir=/mnt/usr/distrib + def_tmp_dir="$dest_dir"usr/distrib fi echo -n "What directory should be used to find and/or store " @@ -122,8 +128,10 @@ Extract() esac if [ $snapshot = n ] then - cat "$1".??? | gunzip | (cd / ; tar xfp$tarverbose -) + cat "$1".??? | gunzip | + (cd $dest_dir ; tar --unlink -xp"$tarverbose"f -) else - cat "$1".tar.gz | gunzip | (cd /mnt ; tar xfp$tarverbose -) + cat "$1".tar.gz | gunzip | + (cd $dest_dir ; tar --unlink -xp"$tarverbose"f -) fi } diff --git a/distrib/hp300/miniroot/inst-common/instbin.conf b/distrib/hp300/miniroot/inst-common/instbin.conf index dfb412f4846..ecada0e961d 100644 --- a/distrib/hp300/miniroot/inst-common/instbin.conf +++ b/distrib/hp300/miniroot/inst-common/instbin.conf @@ -1,14 +1,14 @@ -# $NetBSD: instbin.conf,v 1.1.2.1 1995/11/07 07:22:03 thorpej Exp $ +# $NetBSD: instbin.conf,v 1.1.2.3 1995/11/14 10:03:13 thorpej Exp $ # # instbin.conf - configuration for hp300 miniroot srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin usr.bin/vi -progs bad144 basename cat cut chflags chmod chown chroot cp dd df disklabel -progs dmesg ed expr fsck ftp gawk grep gzip hostname ifconfig init ln ls -progs mkdir mknod more mount mount_cd9660 mount_ffs mount_nfs mt mv newfs ping -progs pwd reboot rm route sed sh shutdown slattach sleep sort strings stty -progs sync tar test tip tset umount update +progs basename cat cut chflags chmod chown chroot cp dd df disklabel +progs dmesg ed expr fsck ftp gawk grep gzip hostname ifconfig init kill ln ls +progs mkdir mknod more mount mount_cd9660 mount_ffs mount_nfs mt mv newfs +progs netstat ping pwd reboot rm route rsh sed sh shutdown slattach sleep +progs sort strings stty sync tar test tip tset umount update # XXX catch vi; see above progs common diff --git a/distrib/hp300/miniroot/inst-common/list b/distrib/hp300/miniroot/inst-common/list index 57dfea5d4af..518652674d5 100644 --- a/distrib/hp300/miniroot/inst-common/list +++ b/distrib/hp300/miniroot/inst-common/list @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.1.2.1 1995/11/07 07:22:05 thorpej Exp $ +# $NetBSD: list,v 1.1.2.3 1995/11/14 10:03:15 thorpej Exp $ # copy the crunched binary, link to it, and kill it COPY ${OBJDIR}/instbin instbin @@ -12,6 +12,7 @@ LINK instbin bin/expr LINK instbin bin/hostname LINK instbin bin/ln LINK instbin bin/ls +LINK instbin bin/kill LINK instbin bin/mkdir LINK instbin bin/mt LINK instbin bin/mv @@ -52,6 +53,8 @@ SYMLINK /instbin usr/bin/gunzip SYMLINK /instbin usr/bin/gzcat SYMLINK /instbin usr/bin/gzip SYMLINK /instbin usr/bin/more +SYMLINK /instbin usr/bin/netstat +SYMLINK /instbin usr/bin/rsh SYMLINK /instbin usr/bin/sed SYMLINK /instbin usr/bin/strings SYMLINK /instbin usr/bin/sort @@ -59,7 +62,6 @@ SYMLINK /instbin usr/bin/tar SYMLINK /instbin usr/bin/tip SYMLINK /instbin usr/bin/tset SYMLINK /instbin usr/bin/vi -SYMLINK /instbin usr/sbin/bad144 SYMLINK /instbin usr/sbin/chown SYMLINK /instbin usr/sbin/chroot SYMLINK /instbin usr/sbin/update @@ -90,7 +92,8 @@ COPY ${DESTDIR}/etc/services etc/services COPY ${DESTDIR}/etc/spwd.db etc/spwd.db COPY ${DESTDIR}/etc/disktab etc/disktab.shadow SYMLINK /tmp/disktab.shadow etc/disktab -SYMLINK /tmp/fstab.shadow etc/fstab +SYMLINK /tmp/fstab.shadow etc/fstab +SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf SYMLINK /tmp/hosts etc/hosts # the zoneinfo diff --git a/distrib/hp300/miniroot/inst/install.sh b/distrib/hp300/miniroot/inst/install.sh index 2f172d90f50..00ddd77fa32 100644 --- a/distrib/hp300/miniroot/inst/install.sh +++ b/distrib/hp300/miniroot/inst/install.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: install.sh,v 1.1.2.3 1995/11/07 10:33:25 thorpej Exp $ +# $NetBSD: install.sh,v 1.1.2.7 1995/11/16 07:30:54 thorpej Exp $ # # Copyright (c) 1995 Jason R. Thorpe. # All rights reserved. @@ -36,6 +36,7 @@ # user interface. VERSION=1.1 +export VERSION # XXX needed in subshell ROOTDISK="" # filled in below FILESYSTEMS="/tmp/filesystems" # used thoughout FQDN="" # domain name @@ -59,6 +60,27 @@ isin() { return 1 } +rmel() { +# remove first argument from list formed by the remaining arguments + _a=$1; shift + while [ $# != 0 ]; do + if [ "$_a" != "$1" ]; then + echo "$1"; + fi + shift + done +} + +twiddle() { +# spin the propeller so we don't get bored + while : ; do + sleep 1; echo -n "/"; + sleep 1; echo -n "-"; + sleep 1; echo -n "\\"; + sleep 1; echo -n "|"; + done > /dev/tty & echo $! +} + # # machine dependent section # @@ -87,11 +109,350 @@ md_installboot() { echo "done." } +md_checkfordisklabel() { + # $1 is the disk to check + + disklabel -r $1 > /dev/null 2> /tmp/checkfordisklabel + if grep "no disk label" /tmp/checkfordisklabel; then + rval="1" + elif grep "disk label corrupted" /tmp/checkfordisklabel; then + rval="2" + else + rval="0" + fi + + rm -f /tmp/checkfordisklabel +} + +hp300_init_label_scsi_disk() { + # $1 is the disk to label + + # Name the disks we install in the temporary fstab. + if [ "X${_disk_instance}" = "X" ]; then + _disk_instance="0" + else + _disk_instance=`expr $_disk_instance + 1` + fi + _cur_disk_name="install-disk-${_disk_instance}" + + # Get geometry information from the user. + more << \__scsi_label_1 + +You will need to provide some information about your disk's geometry. +Geometry info for SCSI disks was printed at boot time. If that information +is not available, use the information provided in your disk's manual. +Please note that the geometry printed at boot time is preferred. + +IMPORTANT NOTE: due to a limitation in the disklabel(8) program, the +number of cylinders on the disk will be increased by 1 so that the initial +label can be placed on disk for editing. When the disklabel editor appears, +make absolutely certain you subtract 1 from the total number of cylinders, +and adjust the size of partition 'c' such that: + + size = (sectors per track) * (tracks per cyl) * (total cylinders) + +Note that the disklabel editor will be run twice; once to set the size of +partition 'c' and correct the geometry, and again so that you may correctly +edit the partition map. This is to work around the afore mentioned +limitation in disklabel(8). Apologies offered in advance. + +__scsi_label_1 + + # Give the opportunity to review the boot messages. + echo -n "Review boot messages now? [y] " + getresp "y" + case "$resp" in + y*|Y*) + (echo ""; dmesg; echo "") | more + ;; + + *) + ;; + esac + + echo "" + echo -n "Number of bytes per disk sector? [512] " + getresp "512" + _secsize="$resp" + + resp="" # force one iteration + while [ "X${resp}" = "X" ]; do + echo -n "Number of cylinders? " + getresp "" + done + _cylinders="$resp" + _fudge_cyl=`expr $_cylinders + 1` + + resp="" # force one iteration + while [ "X${resp}" = "X" ]; do + echo -n "Number of tracks (heads)? " + getresp "" + done + _tracks_per_cyl="$resp" + + resp="" # force one iteration + while [ "X${resp}" = "X" ]; do + echo -n "Number of disk sectors (blocks)? " + getresp "" + done + _nsectors="$resp" + + # Calculate some values we need. + _sec_per_cyl=`expr $_nsectors / $_cylinders` + _sec_per_track=`expr $_sec_per_cyl / $_tracks_per_cyl` + _new_c_size=`expr $_sec_per_track \* $_tracks_per_cyl \* $_cylinders` + + # Emit a disktab entry, suitable for getting started. + # What we have is a `c' partition with the total number of + # blocks, and an `a' partition with 1 sector; just large enough + # to open. Don't ask. + echo "" >> /etc/disktab + echo "# Created by install" >> /etc/disktab + echo "${_cur_disk_name}:\\" >> /etc/disktab + echo -n " :ty=winchester:ns#${_sec_per_track}:" >> /etc/disktab + echo "nt#${_tracks_per_cyl}:nc#${_fudge_cyl}:\\" >> /etc/disktab + echo " :pa#1:\\" >> /etc/disktab + echo " :pc#${_nsectors}:" >> /etc/disktab + + # Ok, here's what we need to do. First of all, we install + # this initial label by opening the `c' partition of the disk + # and using the `-r' flag for disklabel(8). However, because + # of limitations in disklabel(8), we've had to fudge the number + # of cylinders up 1 so that disklabel(8) doesn't complain about + # `c' running past the end of the disk, which can be quite + # common even with OEM HP drives! So, we've given ourselves + # an `a' partition, which is the minimum needed to open the disk + # so that we can perform the DIOCWDLABEL ioctl. So, once the + # initial label is installed, we open the `a' partition so that + # we can fix up the number of cylinders and make the size of + # `c' come out to (ncyl * ntracks_per_cyl * nsec_per_track). + # After that's done, we re-open `c' and let the user actually + # edit the partition table. It's horrible, I know. Bleh. + + disklabel -W ${1} + if ! disklabel -w -r ${1} ${_cur_disk_name}; then + echo "" + echo "ERROR: can't bootstrap disklabel!" + rval="1" + return + fi + + echo "" + echo "The disklabel editor will now start. During this phase, you" + echo "must reset the 'cylinders' value to ${_cylinders}, and adjust" + echo "the size of partition 'c' to ${_new_c_size}. Do not modify" + echo "the partition map at this time. You will have the opportunity" + echo "to do so in a moment." + echo "" + echo -n "Press to continue. " + getresp "" + + disklabel -W ${1} + if ! disklabel -e /dev/r${1}a; then + echo "" + echo "ERROR: can't fixup geometry!" + rval="1" + return + fi + + cat << \__explain_motives_2 + +Now that you have corrected the geometry of your disk, you may edit the +partition map. Don't forget to fill in the fsize (frag size), bsize +(filesystem block size), and cpg (cylinders per group) values. If you +are unsure what these should be, use: + + fsize: 1024 + bsize: 4096 + cpg: 16 + +__explain_motives_2 + echo -n "Press to continue. " + getresp "" + + rval="0" + return +} + +hp300_init_label_hpib_disk() { + # $1 is the disk to label + + # We look though the boot messages attempting to find + # the model number for the provided disk. + _hpib_disktype="" + if dmesg | grep "${1}: " > /dev/null 2>&1; then + _hpib_disktype=HP`dmesg | grep "${1}: " | sort -u | \ + awk '{print $2}'` + fi + if [ "X${_hpib_disktype}" = "X" ]; then + echo "" + echo "ERROR: $1 doesn't appear to exist?!" + rval="1" + return + fi + + # Peer through /etc/disktab to see if the disk has a "default" + # layout. If it doesn't, we have to treat it like a SCSI disk; + # i.e. prompt for geometry, and create a default to place + # on the disk. + if ! grep "${_hpib_disktype}[:|]" /etc/disktab > /dev/null \ + 2>&1; then + echo "" + echo "WARNING: can't find defaults for $1 ($_hpib_disktype)" + echo "" + hp300_init_label_scsi_disk $1 + return + fi + + # We've found the defaults. Now use them to place an initial + # disklabel on the disk. + # XXX What kind of ugliness to we have to deal with to get around + # XXX stupidity on the part of disklabel semantics? + disklabel -W ${1} + if ! disklabel -r -w ${1} $_hpib_disktype; then + # Error message displayed by disklabel(8) + echo "" + echo "ERROR: can't install default label!" + echo "" + echo -n "Try a different method? [y] " + getresp "y" + case "$resp" in + y*|Y*) + hp300_init_label_scsi_disk $1 + return + ;; + + *) + rval="1" + return + ;; + esac + fi + + rval="0" + return +} + +md_labeldisk() { + # $1 is the disk to label + + # Check to see if there is a disklabel present on the device. + # If so, we can just edit it. If not, we must first install + # a default label. + md_checkfordisklabel $1 + case "$rval" in + 0) + # Go ahead and just edit the disklabel. + disklabel -W $1 + disklabel -e $1 + ;; + + *) + echo -n "No disklabel present, installing a default for type: " + case "$1" in + rd*) + echo "HP-IB" + hp300_init_label_hpib_disk $1 + ;; + + sd*) + echo "SCSI" + hp300_init_label_scsi_disk $1 + ;; + + *) + # Shouldn't happen, but... + echo "unknown?! Giving up." + return; + ;; + esac + + # Check to see if installing the default was + # successful. If so, go ahead and pop into the + # disklabel editor. + if [ "X${rval}" != X"0" ]; then + echo "Sorry, can't label this disk." + echo "" + return; + fi + + # We have some defaults installed. Pop into + # the disklabel editor. + disklabel -W $1 + if ! disklabel -e $1; then + echo "" + echo "ERROR: couldn't set partition map for $1" + echo "" + fi + esac +} + + # Note, while they might not seem machine-dependent, the + # welcome banner and the punt message may contain information + # and/or instructions specific to the type of machine. + +md_welcome_banner() { +( + echo "" + echo "Welcome to the NetBSD/hp300 ${VERSION} installation program." + cat << \__welcome_banner_1 + +This program is designed to help you install NetBSD on your system in a +simple and rational way. You'll be asked several questions, and it would +probably be useful to have your disk's hardware manual, the installation +notes, and a calculator handy. + +In particular, you will need to know some reasonably detailed +information about your disk's geometry. This program can determine +some limited information about certain specific types of HP-IB disks. +If you have SCSI disks, however, prior knowledge of disk geometry +is absolutely essential. The kernel will attempt to display geometry +information for SCSI disks during boot, if possible. If you did not +make it note of it before, you may wish to reboot and jot down your +disk's geometry before proceeding. + +As with anything which modifies your hard disk's contents, this +program can cause SIGNIFICANT data loss, and you are advised +to make sure your hard drive is backed up before beginning the +installation process. + +Default answers are displyed in brackets after the questions. +You can hit Control-C at any time to quit, but if you do so at a +prompt, you may have to hit return. Also, quitting in the middle of +installation may leave your system in an inconsistent state. + +__welcome_banner_1 +) | more +} + +md_not_going_to_install() { + cat << \__not_going_to_install_1 + +OK, then. Enter 'halt' at the prompt to halt the machine. Once the +machine has halted, power-cycle the system to load new boot code. + +__not_going_to_install_1 +} + +md_congrats() { + cat << \__congratulations_1 + +CONGRATULATIONS! You have successfully installed NetBSD! To boot the +installed system, enter halt at the command prompt. Once the system has +halted, power-cycle the machine in order to load new boot code. Make sure +you boot from the root disk. + +__congratulations_1 +} + # end of machine dependent section do_mfs_mount() { + # $1 is the mount point + # $2 is the size in DEV_BIZE blocks + umount $1 > /dev/null 2>&1 - if ! mount_mfs -s 2048 swap $1 ; then + if ! mount_mfs -s $2 swap $1 ; then cat << \__mfs_failed_1 FATAL ERROR: Can't mount the memory filesystem. @@ -129,26 +490,13 @@ __getrootdisk_1 fi } -checkfordisklabel() { - disklabel -r $1 > /dev/null 2> /tmp/checkfordisklabel - if grep "no disk label" /tmp/checkfordisklabel; then - rval="1" - elif grep "disk label corrupted" /tmp/checkfordisklabel; then - rval="2" - else - rval="0" - fi - - rm -f /tmp/checkfordisklabel -} - labelmoredisks() { cat << \__labelmoredisks_1 You may label the following disks: __labelmoredisks_1 - echo "$_DKDEVS" | grep -v "${ROOTDISK}" + echo "$_DKDEVS" echo "" echo -n "Label which disk? [done] " getresp "done" @@ -157,10 +505,8 @@ __labelmoredisks_1 ;; *) - if echo "$_DKDEVS" | grep -v "${ROOTDISK}" | \ - grep "^$resp" > /dev/null ; then - # XXX CODE ME - echo "Yup, it exists." + if echo "$_DKDEVS" | grep "^$resp" > /dev/null ; then + md_labeldisk $resp else echo "" echo "The disk $resp does not exist." @@ -220,6 +566,9 @@ __configurenetwork_1 if isin $resp $_IFS ; then _interface_name=$resp + # Keep in the list in case it's misconfigured + # and the user want's to re-do it. + # Get IP address resp="" # force one iteration while [ "X${resp}" = X"" ]; do @@ -231,7 +580,7 @@ __configurenetwork_1 # Get symbolic name resp="" # force one iteration while [ "X${resp}" = X"" ]; do - echo -n "Symbolic name? " + echo -n "Symbolic (host) name? " getresp "" _interface_symname=$resp done @@ -333,7 +682,7 @@ __install_ftp_2 fi _ftp_file=`echo ${resp} | awk '{print $1}'` - echo "get ${_ftp_file} |\"tar -zxvpf -\"" >> \ + echo "get ${_ftp_file} |\"tar --unlink -zxvpf -\"" >> \ /tmp/ftp-script.sh done @@ -364,7 +713,7 @@ install_common_nfs_cdrom() { fi # Extract file - cat $_common_filename | (cd /mnt; tar -zxvpf -) + cat $_common_filename | (cd /mnt; tar --unlink -zxvpf -) echo "Extraction complete." } @@ -584,14 +933,14 @@ __install_tape_2 1) ( cd /mnt - dd if=$TAPE | tar -zxvpf - + dd if=$TAPE | tar --unlink -zxvpf - ) ;; 2) ( cd /mnt - dd if=$TAPE | tar -xvpf - + dd if=$TAPE | tar --unlink -xvpf - ) ;; @@ -629,32 +978,8 @@ __get_timezone_1 export TZ } -echo "" -echo "Welcome to the NetBSD ${VERSION} installation program." -cat << \__welcome_banner_1 - -This program is designed to help you put NetBSD on your hard disk, -in a simple and rational way. You'll be asked several questions, -and it would probably be useful to have your disk's hardware -manual, the installation notes, and a calculator handy. - -In particular, you will need to know some reasonably detailed -information about your disk's geometry. This program can determine -some limited information about certain specific types of HP-IB disks. -If you have SCSI disks, however, prior knowledge of disk geometry -is absolutely essential. - -As with anything which modifies your hard disk's contents, this -program can cause SIGNIFICANT data loss, and you are advised -to make sure your hard drive is backed up before beginning the -installation process. - -Default answers are displyed in brackets after the questions. -You can hit Control-C at any time to quit, but if you do so at a -prompt, you may have to hit return. Also, quitting in the middle of -installation may leave your system in an inconsistent state. - -__welcome_banner_1 +# Good {morning,afternoon,evening,night}. +md_welcome_banner echo -n "Proceed with installation? [n] " getresp "n" case "$resp" in @@ -662,18 +987,16 @@ case "$resp" in echo "Cool! Let's get to it..." ;; *) - cat << \__welcome_banner_2 - -OK, then. Enter 'halt' at the prompt to halt the machine. Once the -machine has halted, power-cycle the system to load new boot code. - -__welcome_banner_2 + md_not_going_to_install exit ;; esac +# XXX Work around vnode aliasing bug (thanks for the tip, Chris...) +ls -l /dev > /dev/null 2>&1 + # We don't like it, but it sure makes a few things a lot easier. -do_mfs_mount "/tmp" +do_mfs_mount "/tmp" "2048" # Install the shadowed disktab file; lets us write to it for temporary # purposes without mounting the miniroot read-write. @@ -685,8 +1008,8 @@ done # Make sure there's a disklabel there. If there isn't, puke after # disklabel prints the error message. -checkfordisklabel ${ROOTDISK} -case $rval in +md_checkfordisklabel ${ROOTDISK} +case "$resp" in 1) cat << \__disklabel_not_present_1 @@ -739,6 +1062,7 @@ You will now be given the opportunity to place disklabels on any additional disks on your system. __disklabel_notice_2 +_DKDEVS=`rmel ${ROOTDISK} ${_DKDEVS}` resp="X" # force at least one iteration while [ "X$resp" != X"done" ]; do labelmoredisks @@ -869,6 +1193,26 @@ case "$resp" in fi fi + echo -n "Enter IP address of primary nameserver: [none] " + getresp "none" + if [ "X${resp}" != X"none" ]; then + echo "domain $FQDN" > /tmp/resolv.conf + echo "nameserver $resp" >> /tmp/resolv.conf + echo "search $FQDN" >> /tmp/resolv.conf + + echo -n "Would you like to use the nameserver now? [y] " + getresp "y" + case "$resp" in + y*|Y*) + cp /tmp/resolv.conf \ + /tmp/resolv.conf.shadow + ;; + + *) + ;; + esac + fi + echo "" echo "The host table is as follows:" echo "" @@ -1015,7 +1359,7 @@ if [ -f /base.tar.gz ]; then getresp "y" case "$resp" in y*|Y*) - cat $_f | (cd /mnt; tar -zxvpf -) + cat $_f | (cd /mnt; tar --unlink -zxvpf -) _yup="TRUE" ;; *) @@ -1088,7 +1432,7 @@ get_timezone # Copy in configuration information and make devices in target root. ( cd /tmp - for file in fstab hostname.* hosts myname mygate; do + for file in fstab hostname.* hosts myname mygate resolv.conf; do if [ -f $file ]; then echo -n "Copying $file..." cp $file /mnt/etc/$file @@ -1102,8 +1446,10 @@ get_timezone echo "done." echo -n "Making devices..." + pid=`twiddle` cd /mnt/dev sh MAKEDEV all + kill $pid echo "done." echo -n "Copying kernel..." @@ -1114,19 +1460,20 @@ get_timezone ) # Unmount all filesystems and check their integrity. -sync; sleep 2 -umount -a -echo "Checking filesystem integrity..." -fsck -pf +echo -n "Syncing disks..." +pid=`twiddle` +sync; sleep 4; sync; sleep 2; sync; sleep 2 +kill $pid +echo "done." -cat << \__congratulations_1 +echo "Unmounting filesystems..." +umount -va -CONGRATULATIONS! You have successfully installed NetBSD on your hard disk! -To boot the installed system, enter halt at the command prompt. Once the -system has halted, power-cycle the machine in order to load new boot code. -Make sure you boot from the disk. +echo "Checking filesystem integrity..." +fsck -pf -__congratulations_1 +# Pat on the back. +md_congrats # ALL DONE! -exit +exit 0 diff --git a/distrib/hp300/miniroot/inst/list b/distrib/hp300/miniroot/inst/list index 64c1df1c037..063a39737a7 100644 --- a/distrib/hp300/miniroot/inst/list +++ b/distrib/hp300/miniroot/inst/list @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.1 1995/10/03 22:48:01 thorpej Exp $ +# $NetBSD: list,v 1.1.2.1 1995/11/14 01:36:10 thorpej Exp $ # copy the kernel COPY ${CURDIR}/../../../../sys/arch/hp300/compile/GENERIC/netbsd netbsd @@ -6,4 +6,5 @@ COPY ${CURDIR}/../../../../sys/arch/hp300/compile/GENERIC/netbsd netbsd # and the installation tools COPY dot.profile .profile COPY install.sh install -SPECIAL chmod 755 install +COPY upgrade.sh upgrade +SPECIAL chmod 755 install upgrade diff --git a/distrib/hp300/miniroot/inst/upgrade.sh b/distrib/hp300/miniroot/inst/upgrade.sh new file mode 100644 index 00000000000..f429c1483bf --- /dev/null +++ b/distrib/hp300/miniroot/inst/upgrade.sh @@ -0,0 +1,1037 @@ +#!/bin/sh +# $NetBSD: upgrade.sh,v 1.1.2.1 1995/11/14 09:59:58 thorpej Exp $ +# +# Copyright (c) 1995 Jason R. Thorpe. +# 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 +# by Jason R. Thorpe. +# 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. +# + +# NetBSD installation script. +# In a perfect world, this would be a nice C program, with a reasonable +# user interface. + +VERSION=1.1 +export VERSION # XXX needed in subshell +ROOTDISK="" # filled in below + +trap "umount /tmp > /dev/null 2>&1" 0 + +getresp() { + read resp + if [ "X$resp" = "X" ]; then + resp=$1 + fi +} + +isin() { +# test the first argument against the remaining ones, return succes on a match + _a=$1; shift + while [ $# != 0 ]; do + if [ "$_a" = "$1" ]; then return 0; fi + shift + done + return 1 +} + +twiddle() { +# spin the propeller so we don't get bored + while : ; do + sleep 1; echo -n "/"; + sleep 1; echo -n "-"; + sleep 1; echo -n "\\"; + sleep 1; echo -n "|"; + done > /dev/tty & echo $! +} + +# +# machine dependent section +# +md_get_diskdevs() { + # return available disk devices + dmesg | grep "^rd.*:" | awk -F: '{print $1}' | sort -u + dmesg | grep "^sd.*:*cylinders" | awk -F: '{print $1}' | sort -u +} + +md_get_cddevs() { + # return available CD-ROM devices + dmesg | grep "sd.*:*CD-ROM" | awk -F: '{print $1}' | sort -u +} + +md_installboot() { + # $1 is the root disk + + echo -n "Installing boot block..." + disklabel -W ${1} + disklabel -B ${1} + echo "done." +} + +md_checkfordisklabel() { + disklabel -r $1 > /dev/null 2> /tmp/checkfordisklabel + if grep "no disk label" /tmp/checkfordisklabel; then + rval="1" + elif grep "disk label corrupted" /tmp/checkfordisklabel; then + rval="2" + else + rval="0" + fi + + rm -f /tmp/checkfordisklabel +} + + # Note, while they might not seem machine-dependent, the + # welcome banner and the punt message may contain information + # and/or instructions specific to the type of machine. + +md_welcome_banner() { +( + echo "" + echo "Welcome to the NetBSD/hp300 ${VERSION} upgrade program." + cat << \__welcome_banner_1 + +This program is designed to help you upgrade your NetBSD system in a +simple and rational way. + +As a reminder, installing the `etc' binary set is NOT recommended. +Once the rest of your system has been upgraded, you should manually +merge any changes to files in the `etc' set into those files which +already exist on your system. + +As with anything which modifies your hard disk's contents, this +program can cause SIGNIFICANT data loss, and you are advised +to make sure your hard drive is backed up before beginning the +installation process. + +Default answers are displyed in brackets after the questions. +You can hit Control-C at any time to quit, but if you do so at a +prompt, you may have to hit return. Also, quitting in the middle of +installation may leave your system in an inconsistent state. + +__welcome_banner_1 +) | more +} + +md_not_going_to_install() { + cat << \__not_going_to_install_1 + +OK, then. Enter 'halt' at the prompt to halt the machine. Once the +machine has halted, power-cycle the system to load new boot code. + +__not_going_to_install_1 +} + +md_congrats() { + cat << \__congratulations_1 + +CONGRATULATIONS! You have successfully upgraded NetBSD! To boot the +installed system, enter halt at the command prompt. Once the system has +halted, power-cycle the machine in order to load new boot code. Make sure +you boot from the root disk. + +__congratulations_1 +} + +# end of machine dependent section + +do_mfs_mount() { + # $1 is the mount point + # $2 is the size in DEV_BIZE blocks + + umount $1 > /dev/null 2>&1 + if ! mount_mfs -s $2 swap $1 ; then + cat << \__mfs_failed_1 + +FATAL ERROR: Can't mount the memory filesystem. + +__mfs_failed_1 + exit + fi + + # Bleh. Give mount_mfs a chance to DTRT. + sleep 2 +} + +getrootdisk() { + cat << \__getrootdisk_1 + +The installation program needs to know which disk to consider +the root disk. Note the unit number may be different than +the unit number you used in the standalone installation +program. + +Available disks are: + +__getrootdisk_1 + _DKDEVS=`md_get_diskdevs` + echo "$_DKDEVS" + echo "" + echo -n "Which disk is the root disk? " + getresp "" + if isin $resp $_DKDEVS ; then + ROOTDISK="$resp" + else + echo "" + echo "The disk $resp does not exist." + ROOTDISK="" + fi +} + +install_ftp() { + # Get several parameters from the user, and create + # a shell script that directs the appropriate + # commands into ftp. + cat << \__install_ftp_1 + +This is an automated ftp-based installation process. You will be asked +several questions. The correct set of commands will be placed in a script +that will be fed to ftp(1). + +__install_ftp_1 + # Get server IP address + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo -n "Server IP? [${_ftp_server_ip}] " + getresp "${_ftp_server_ip}" + _ftp_server_ip=$resp + done + + # Get server directory + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo -n "Server directory? [${_ftp_server_dir}] " + getresp "${_ftp_server_dir}" + _ftp_server_dir=$resp + done + + # Get login name + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo -n "Login? [${_ftp_server_login}] " + getresp "${_ftp_server_login}" + _ftp_server_login=$resp + done + + # Get password + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo -n "Password? [${_ftp_server_password}] " + getresp "${_ftp_server_password}" + _ftp_server_password=$resp + done + + # Get list of files for mget. + cat << \__install_ftp_2 + +You will now be asked for files to extract. Enter one file at a time. +When you are done entering files, enter 'done'. + +__install_ftp_2 + echo "#!/bin/sh" > /tmp/ftp-script.sh + echo "cd /mnt" >> /tmp/ftp-script.sh + echo "ftp -i -n $_ftp_server_ip << \__end_commands" >> \ + /tmp/ftp-script.sh + echo "user $_ftp_server_login $_ftp_server_password" >> \ + /tmp/ftp-script.sh + echo "bin" >> /tmp/ftp-script.sh + echo "cd $_ftp_server_dir" >> /tmp/ftp-script.sh + + resp="" # force one interation + while [ "X${resp}" != X"done" ]; do + echo -n "File? [done] " + getresp "done" + if [ "X${resp}" = X"done" ]; then + break + fi + + _ftp_file=`echo ${resp} | awk '{print $1}'` + echo "get ${_ftp_file} |\"tar --unlink -zxvpf -\"" >> \ + /tmp/ftp-script.sh + done + + echo "quit" >> /tmp/ftp-script.sh + echo "__end_commands" >> /tmp/ftp-script.sh + + sh /tmp/ftp-script.sh + rm -f /tmp/ftp-script.sh + echo "Extraction complete." +} + +install_common_nfs_cdrom() { + # $1 - directory containing file + + # Get the name of the file. + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo -n "File name? " + getresp "" + done + _common_filename="/mnt2/$1/$resp" + + # Ensure file exists + if [ ! -f $_common_filename ]; then + echo "File $_common_filename does not exist. Check to make" + echo "sure you entered the information properly." + return + fi + + # Extract file + cat $_common_filename | (cd /mnt; tar --unlink -zxvpf -) + echo "Extraction complete." +} + +install_cdrom() { + # Get the cdrom device info + cat << \__install_cdrom_1 + +The following CD-ROM devices are installed on your system; please select +the CD-ROM device containing the installation media: + +__install_cdrom_1 + _CDDEVS=`md_get_cddevs` + echo "$_CDDEVS" + echo "" + echo -n "Which is the CD-ROM with the installation media? [abort] " + getresp "abort" + case "$resp" in + abort) + echo "Aborting." + return + ;; + + *) + if isin $resp $_CDDEVS ; then + _cdrom_drive=$resp + else + echo "" + echo "The CD-ROM $resp does not exist." + echo "Aborting." + return + fi + ;; + esac + + # Get partition + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo -n "Partition? [c] " + getresp "c" + case "$resp" in + [a-h]) + _cdrom_partition=$resp + ;; + + *) + echo "Invalid response: $resp" + resp="" # force loop to repeat + ;; + esac + done + + # Ask for filesystem type + cat << \__install_cdrom_2 + +There are two CD-ROM filesystem types currently supported by this program: + 1) ISO-9660 (cd9660) + 2) Berkeley Fast Filesystem (ffs) + +__install_cdrom_2 + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo -n "Which filesystem type? [cd9660] " + getresp "cd9660" + case "$resp" in + cd9660|ffs) + _cdrom_filesystem=$resp + ;; + + *) + echo "Invalid response: $resp" + resp="" # force loop to repeat + ;; + esac + done + + # Mount the CD-ROM + if ! mount -t ${_cdrom_filesystem} -o ro \ + /dev/${_cdrom_drive}${_cdrom_partition} /mnt2 ; then + echo "Cannot mount CD-ROM drive. Aborting." + return + fi + + # Get the directory where the file lives + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo "Enter the directory relative to the mount point that" + echo -n "contains the file. [${_cdrom_directory}] " + getresp "${_cdrom_directory}" + done + _cdrom_directory=$resp + + install_common_nfs_cdrom ${_cdrom_directory} + umount -f /mnt2 > /dev/null 2>&1 +} + +install_nfs() { + # Get the IP address of the server + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo -n "Server IP address? [${_nfs_server_ip}] " + getresp "${_nfs_server_ip}" + done + _nfs_server_ip=$resp + + # Get server path to mount + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo -n "Filesystem on server to mount? [${_nfs_server_path}] " + getresp "${_nfs_server_path}" + done + _nfs_server_path=$resp + + # Determine use of TCP + echo -n "Use TCP transport (only works with capable NFS server)? [n] " + getresp "n" + case "$resp" in + y*|Y*) + _nfs_tcp="-T" + ;; + + *) + _nfs_tcp="" + ;; + esac + + # Mount the server + if ! mount_nfs $_nfs_tcp ${_nfs_server_ip}:${_nfs_server_path} \ + /mnt2 ; then + echo "Cannot mount NFS server. Aborting." + return + fi + + # Get the directory where the file lives + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo "Enter the directory relative to the mount point that" + echo -n "contains the file. [${_nfs_directory}] " + getresp "${_nfs_directory}" + done + _nfs_directory=$resp + + install_common_nfs_cdrom ${_nfs_directory} + umount -f /mnt2 > /dev/null 2>&1 +} + +install_tape() { + # Get the name of the tape from the user. + cat << \__install_tape_1 + +The installation program needs to know which tape device to use. Make +sure you use a "no rewind on close" device. + +__install_tape_1 + _tape=`basename $TAPE` + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo -n "Name of tape device? [${_tape}]" + getresp "${_tape}" + done + _tape=`basename $resp` + TAPE="/dev/${_tape}" + if [ ! -c $TAPE ]; then + echo "$TAPE does not exist or is not a character special file." + echo "Aborting." + return + fi + export TAPE + + # Rewind the tape device + echo -n "Rewinding tape..." + if ! mt rewind ; then + echo "$TAPE may not be attached to the system or may not be" + echo "a tape device. Aborting." + return + fi + echo "done." + + # Get the file number + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + echo -n "File number? " + getresp "" + case "$resp" in + [1-9]*) + _nskip=`expr $resp - 1` + ;; + + *) + echo "Invalid file number ${resp}." + resp="" # fore loop to repeat + ;; + esac + done + + # Skip to correct file. + echo -n "Skipping to source file..." + if [ "X${_nskip}" != X"0" ]; then + if ! mt fsf $_nskip ; then + echo "Could not skip $_nskip files. Aborting." + return + fi + fi + echo "done." + + cat << \__install_tape_2 + +There are 2 different ways the file can be stored on tape: + + 1) an image of a gzipped tar file + 2) a standard tar image + +__install_tape_2 + resp="" # force one iteration + while [ "X${resp}" = X"" ]; do + getresp "1" + case "$resp" in + 1) + ( + cd /mnt + dd if=$TAPE | tar --unlink -zxvpf - + ) + ;; + + 2) + ( + cd /mnt + dd if=$TAPE | tar --unlink -xvpf - + ) + ;; + + *) + echo "Invalid response: $resp." + resp="" # force loop to repeat + ;; + esac + done + echo "Extraction complete." +} + +get_timezone() { +cat << \__get_timezone_1 + +Select a time zone: + +__get_timezone_1 + ls /usr/share/zoneinfo # XXX + echo "" + if [ X"$TZ" = "X" ]; then + TZ=`ls -l /etc/timezone 2>/dev/null | awk -F/ '{print $NF}'` + fi + echo -n "What timezone are you in [$TZ]? " + getresp "$TZ" + case "$resp" in + "") + echo "Timezone defaults to GMT" + TZ="GMT" + ;; + *) + TZ="$resp" + ;; + esac + export TZ +} + +# Much of this is gratuitously stolen from /etc/netstart. +enable_network() { + + # Set up the hostname. + if [ ! -f /mnt/etc/myname ]; then + echo "ERROR: no /etc/myname!" + return 1 + fi + hostname=`cat /mnt/etc/myname` + hostname $hostname + + # configure all the interfaces which we know about. +( + tmp="$IFS" + IFS="$IFS." + set -- `echo /mnt/etc/hostname*` + IFS=$tmp + unset tmp + + while [ $# -ge 2 ] ; do + shift # get rid of "hostname" + ( + read af name mask bcaddr extras + read dt dtaddr + + if [ ! -n "$name" ]; then + echo "/etc/hostname.$1: invalid network configuration file" + exit + fi + + cmd="ifconfig $1 $af $name " + if [ "${dt}" = "dest" ]; then cmd="$cmd $dtaddr"; fi + if [ -n "$mask" ]; then cmd="$cmd netmask $mask"; fi + if [ -n "$bcaddr" -a "X$bcaddr" != "XNONE" ]; then + cmd="$cmd broadcast $bcaddr"; + fi + cmd="$cmd $extras" + + $cmd + ) < /mnt/etc/hostname.$1 + shift + done +) + + # set the address for the loopback interface + ifconfig lo0 inet localhost + + # use loopback, not the wire + route add $hostname localhost + + # /etc/mygate, if it exists, contains the name of my gateway host + # that name must be in /etc/hosts. + if [ -f /mnt/etc/mygate ]; then + route delete default > /dev/null 2>&1 + route add default `cat /mnt/etc/mygate` + fi + + # enable the resolver, if appropriate. + if [ -f /mnt/etc/resolv.conf ]; then + _resolver_enabled="TRUE" + cp /mnt/etc/resolv.conf /tmp/resolv.conf.shadow + fi + + # Display results... + echo "Network interface configuration:" + ifconfig -a + + echo "" + + if [ "X${_resolver_enabled}" = X"TRUE" ]; then + netstat -r + echo "" + echo "Resolver enabled." + else + netstat -rn + echo "" + echo "Resolver not enabled." + fi + + return 0 +} + +# Good {morning,afternoon,evening,night}. +md_welcome_banner +echo -n "Proceed with upgrade? [n] " +getresp "n" +case "$resp" in + y*|Y*) + echo "Cool! Let's get to it..." + ;; + *) + md_not_going_to_install + exit + ;; +esac + +# XXX Work around vnode aliasing bug (thanks for the tip, Chris...) +ls -l /dev > /dev/null 2>&1 + +# We don't like it, but it sure makes a few things a lot easier. +do_mfs_mount "/tmp" "2048" + +while [ "X${ROOTDISK}" = "X" ]; do + getrootdisk +done + +# Make sure there's a disklabel there. If there isn't, puke after +# disklabel prints the error message. +md_checkfordisklabel ${ROOTDISK} +case $rval in + 1) + cat << \__disklabel_not_present_1 + +FATAL ERROR: There is no disklabel present on the root disk! You must +label the disk with SYS_INST before continuing. + +__disklabel_not_present_1 + exit + ;; + + 2) + cat << \__disklabel_corrupted_1 + +FATAL ERROR: The disklabel on the root disk is corrupted! You must +re-label the disk with SYS_INST before continuing. + +__disklabel_corrupted_1 + exit + ;; + + *) + ;; +esac + +# Assume partition 'a' of $ROOTDISK is for the root filesystem. Confirm +# this with the user. Check and mount the root filesystem. +resp="" # force one iteration +while [ "X${resp}" = "X" ]; do + echo -n "Root filesystem? [${ROOTDISK}a] " + getresp "${ROOTDISK}a" + _root_filesystem="/dev/`basename $resp`" + if [ ! -b ${_root_filesystem} ]; then + echo "Sorry, ${resp} is not a block device." + resp="" # force loop to repeat + fi +done + +echo "Checking root filesystem..." +if ! fsck -pf ${_root_filesystem}; then + echo "ERROR: can't check root filesystem!" + exit 1 +fi + +echo "Mounting root filesystem..." +if ! mount -o ro ${_root_filesystem} /mnt; then + echo "ERROR: can't mount root filesystem!" + exit 1 +fi + +# Grab the fstab so we can munge it for our own use. +if [ ! -f /mnt/etc/fstab ]; then + echo "ERROR: no /etc/fstab!" + exit 1 +fi +cp /mnt/etc/fstab /tmp/fstab + +# Grab the hosts table so we can use it. +if [ ! -f /mnt/etc/hosts ]; then + echo "ERROR: no /etc/hosts!" + exit 1 +fi +cp /mnt/etc/hosts /tmp/hosts + +# Start up the network in same/similar configuration as the installed system +# uses. +cat << \__network_config_1 + +The upgrade program would now like to enable the network. It will use the +configuration already stored on the root filesystem. This is required +if you wish to use the network installation capabilities of this program. + +__network_config_1 +echo -n "Enable network? [y] " +getresp "y" +case "$resp" in + y*|Y*) + if ! enable_network; then + echo "ERROR: can't enable network!" + exit 1 + fi + + cat << \__network_config_2 + +You will now be given the opportunity to escape to the command shell to +do any additional network configuration you may need. This may include +adding additional routes, if needed. In addition, you might take this +opportunity to redo the default route in the event that it failed above. + +__network_config_2 + echo -n "Escape to shell? [n] " + getresp "n" + case "$resp" in + y*|Y*) + echo "Type 'exit' to return to upgrade." + sh + ;; + + *) + ;; + esac + ;; + *) + ;; +esac + +# Now that the network has been configured, it is safe to configure the +# fstab. We remove all but ufs/ffs/nfs. +( + rm -f /tmp/fstab.new + while read line; do + _fstype=`echo $line | awk '{print $3}'` + if [ "X${_fstype}" = X"ufs" -o \ + "X${_fstype}" = X"ffs" -o \ + "X${_fstype}" = X"nfs" ]; then + echo $line >> /tmp/fstab.new + fi + done +) < /tmp/fstab + +if [ ! -f /tmp/fstab.new ]; then + echo "ERROR: strange fstab!" + exit 1 +fi + +# Convert ufs to ffs. +sed -e 's/ufs/ffs/' < /tmp/fstab.new > /tmp/fstab +rm -f /tmp/fstab.new + +echo "The fstab is configured as follows:" +echo "" +cat /tmp/fstab +cat << \__fstab_config_1 + +You may wish to edit the fstab. For example, you may need to resolve +dependencies in the order which the filesystems are mounted. Note that +this fstab is only for installation purposes, and will not be copied into +the root filesystem. + +__fstab_config_1 +echo -n "Edit the fstab? [n] " +getresp "n" +case "$resp" in + y*|Y*) + vi /tmp/fstab + ;; + + *) + ;; +esac + +# Now that the 'real' fstab is configured, we munge it into a 'shadow' +# fstab which we'll use for mounting and unmounting all of the target +# filesystems relative to /mnt. Mount all filesystems. +awk '{ + if ($2 == "/") + printf("%s /mnt %s %s %s %s\n", $1, $3, $4, $5, $6) + else + printf("%s /mnt%s %s %s %s %s\n", $1, $2, $3, $4, $5, $6) +}' < /tmp/fstab > /tmp/fstab.shadow + +echo "" + +# Must mount filesystems manually, one at a time, so we can make sure the +# mount points exist. +if ! umount /mnt; then + echo "ERROR: can't unmount previously mounted root!" + exit 1 +fi + +# Check all of the filesystems. +echo "Checking filesystems..." +if ! fsck -pf; then + echo "ERROR: can't check filesystems!" + exit 1 +fi + +( + while read line; do + _dev=`echo $line | awk '{print $1}'` + _mp=`echo $line | awk '{print $2}'` + _fstype=`echo $line | awk '{print $3}'` + _opt=`echo $line | awk '{print $4}'` + + # If not the root filesystem, make sure the mount + # point is present. + if [ "X{$_mp}" != X"/mnt" ]; then + mkdir -p $_mp + fi + + # Mount the filesystem. If the mount fails, exit + # with an error condition to tell the outer + # later to bail. + if ! mount -v -t $_fstype -o $_opt $_dev $_mp ; then + # error message displated by mount + exit 1 + fi + done +) < /etc/fstab + +if [ "X${?}" != X"0" ]; then + cat << \__mount_filesystems_1 + +FATAL ERROR: Cannot mount filesystems. Double-check your configuration +and restart the upgrade process. + +__mount_filesystems_1 + exit +fi + +# Ask the user which media to load the distribution from. +cat << \__install_sets_1 + +It is now time to extract the installation sets onto the hard disk. +Make sure The sets are either on a local device (i.e. tape, CD-ROM) or on a +network server. + +__install_sets_1 +if [ -f /base.tar.gz ]; then + echo -n "Install from sets in the current root filesystem? [y] " + getresp "y" + case "$resp" in + y*|Y*) + for _f in /*.tar.gz; do + echo -n "Install $_f ? [y]" + getresp "y" + case "$resp" in + y*|Y*) + cat $_f | (cd /mnt; tar --unlink -zxvpf -) + _yup="TRUE" + ;; + *) + ;; + esac + echo "Extraction complete." + done + ;; + *) + _yup="FALSE" + ;; + esac +else + _yup="FALSE" +fi + +# Go on prodding for alternate locations +resp="" # force at least one iteration +while [ "X${resp}" = X"" ]; do + # If _yup is not FALSE, it means that we extracted sets above. + # If that's the case, bypass the menu the first time. + if [ X"$_yup" = X"FALSE" ]; then + echo -n "Install from (f)tp, (t)ape, (C)D-ROM, or (N)FS? [f] " + getresp "f" + case "$resp" in + f*|F*) + install_ftp + ;; + + t*|T*) + install_tape + ;; + + c*|C*) + install_cdrom + ;; + + n*|N*) + install_nfs + ;; + + *) + echo "Invalid response: $resp" + resp="" + ;; + esac + else + _yup="FALSE" # So we'll ask next time + fi + + # Give the user the opportunity to extract more sets. They don't + # necessarily have to come from the same media. + echo "" + echo -n "Extract more sets? [n] " + getresp "n" + case "$resp" in + y*|Y*) + # Force loop to repeat + resp="" + ;; + + *) + ;; + esac +done + +# Get timezone info +get_timezone + +# Fix up the fstab. +echo -n "Converting ufs to ffs in /etc/fstab..." +sed -e 's/ufs/ffs/' < /mnt/etc/fstab > /tmp/fstab +echo "done." +echo -n "Would you like to edit the resulting fstab? [y] " +getresp "y" +case "$resp" in + y*|Y*) + vi /tmp/fstab + ;; + + *) + ;; +esac + +# Copy in configuration information and make devices in target root. +( + cd /tmp + for file in fstab; do + if [ -f $file ]; then + echo -n "Copying $file..." + cp $file /mnt/etc/$file + echo "done." + fi + done + + echo -n "Installing timezone link..." + rm -f /mnt/etc/localtime + ln -s /usr/share/zoneinfo/$TZ /mnt/etc/localtime + echo "done." + + echo -n "Making devices..." + pid=`twiddle` + cd /mnt/dev + sh MAKEDEV all + kill $pid + echo "done." + + echo -n "Copying kernel..." + cp /netbsd /mnt/netbsd + echo "done." + + md_installboot ${ROOTDISK} +) + +# Unmount all filesystems and check their integrity. +echo -n "Syncing disks..." +pid=`twiddle` +sync; sleep 4; sync; sleep 2; sync; sleep 2 +kill $pid +echo "done." + +echo "Unmounting filesystems..." +umount -va + +echo "Checking filesystem integrity..." +fsck -pf + +# Pat on the back. +md_congrats + +# ALL DONE! +exit 0 diff --git a/distrib/notes/hp300/contents b/distrib/notes/hp300/contents index e49dfb06299..dab1af1295d 100644 --- a/distrib/notes/hp300/contents +++ b/distrib/notes/hp300/contents @@ -1,85 +1,99 @@ -The hp300-specific portion of the NetBSD 1.0 release is found in the -"hp300" subdirectory of the distribution. That subdirectory is layed +The hp300-specific portion of the NetBSD 1.1 release is found in the +"hp300" subdirectory of the distribution. That subdirectory is laid out as follows: -.../NetBSD-1.0/hp300/ +.../NetBSD-1.1/hp300/ binary/ hp300 binary distribution sets; see below. - install/ installation utilities and - bootstrap root filesystem - image; see below. + install/ a GENERIC kernel, installation + utilities and a miniroot filesystem; + see below. security/ hp300 security distribution; - see below; + see below. The NetBSD/hp300 binary distribution sets contain the binaries which -comprise the NetBSD 1.0 release for the hp300. There are seven binary +comprise the NetBSD 1.1 release for the hp300. There are seven binary distribution sets, and the "security" distribution set. The binary distribution sets can be found in the "hp300/binary" subdirectory of -the NetBSD 1.0 distribution tree, and are as follows: +the NetBSD 1.1 distribution tree, and are as follows: - base10 The NetBSD/hp300 1.0 base binary distribution. You + base11 The NetBSD/hp300 1.1 base binary distribution. You MUST install this distribution set. It contains the base NetBSD utilities that are necessary for the system to run and be minimally functional. It includes shared library support, and excludes everything described below. - [ 6.1M gzipped, 16.3M uncompressed ] - - comp10 The NetBSD/hp300 Compiler tools. All of the tools - relating to C, C++, and FORTRAN (yes, there are two!). - This set includes the system include files - (/usr/include), the linker, the compiler tool chain, - and the various system libraries (except the shared - libraries, which are included as part of the base - set). This set also includes the manual pages for all - of the utilities it contains, as well as the system + [ 7.2M gzipped, 19M uncompressed ] + + comp11 The NetBSD/hp300 Compiler tools. All of the tools + relating to C and C++. This set includes the system + include files (/usr/include), the linker, the compiler + tool chain, and the various system libraries (except + the shared libraries, which are included as part of the + base set). This set also includes the manual pages for + all of the utilities it contains, as well as the system call and library manual pages. - [ 4.1M gzipped, 12.6M uncompressed ] + [ 4.6M gzipped, 14.7M uncompressed ] - etc10 This distribution set contains the system - configuration files that reside in /etc and in several - other places. This set MUST be installed if you are - installing the system from scratch, but should NOT be - used if you are upgrading. (If you are upgrading, - it's recommended that you get a copy of this set and - CAREFULLY upgrade your configuration files by hand.) - [ 51K gzipped, 290K uncompressed ] + etc11 This distribution set contains the system configuration + files that reside in /etc and in several other places. + This set MUST be installed if you are installing the + system from scratch, but should NOT be used if you are + upgrading. (If you are upgrading, it's recommended that + you get a copy of this set and CAREFULLY upgrade your + configuration files by hand.) + [ 64K gzipped, 348K uncompressed ] - games10 This set includes the games and their manual pages. - [ 1.1M gzipped, 2.7M uncompressed ] + games11 This set includes the games and their manual pages. + [ 2.8M gzipped, 6.8M uncompressed ] - man10 This set includes all of the manual pages for the + man11 This set includes all of the manual pages for the binaries and other software contained in the base set. Note that it does not include any of the manual pages that are included in the other sets. - [ 752K gzipped, 2.9M uncompressed ] + [ 850K gzipped, 3.3M uncompressed ] - misc10 This set includes the system dictionaries (which are + misc11 This set includes the system dictionaries (which are rather large), the typesettable document set, and man pages for other architectures which happen to be installed from the source tree by default. - [ 1.6M gzipped, 5.6M uncompressed ] + [ 1.8M gzipped, 6.5M uncompressed ] - text10 This set includes NetBSD's text processing tools, + text11 This set includes NetBSD's text processing tools, including groff, all related programs, and their manual pages. - [ 782K gzipped, 2.8M uncompressed ] + [ 770K gzipped, 2.8M uncompressed ] -The hp300 security distribution set is named "secr10" and can be found -in the "hp300/security" subdirectory of the NetBSD 1.0 distribution +The hp300 security distribution set is named "secr11" and can be found +in the "hp300/security" subdirectory of the NetBSD 1.1 distribution tree. It contains crypt.c (the source file for the DES encryption algorithm) and the binaries which depend on it. It can only be found on those sites which carry the complete NetBSD distribution and that can legally obtain it. (Remember, because of United States law, this distribution set may not be exported to locations outside of the -United States and Canada.) [ 119K gzipped, 270K uncompressed ] +United States and Canada.) [ XXXK gzipped, XXXK uncompressed ] The hp300 binary distribution sets are distributed as gzipped tar files. Each hp300 binary distribution set also has its own "CKSUMS" file, just as the source distribution sets do. +The following are included in the `.../install' directory: + + SYS_INST.gz A gzipped copy of the SYS_INST miniroot + installation program. + + inst-11.fs.gz A gzipped copy of the miniroot filesystem. + + netbsd.gz A gzipped GENERIC kernel. + + rbootd.tar.gz Source code for the rbootd(8) program, required + for netbooting an HP workstation. + + HP-IB.geometry A file containing geometry for some HP-IB + disk drives. + The instructions given for extracting the source sets work equally well for the binary sets, but it is worth noting that if you use that method, the files are extracted "below" the current directory. That diff --git a/distrib/notes/hp300/hardware b/distrib/notes/hp300/hardware index 48f2ef8085c..c2601896637 100644 --- a/distrib/notes/hp300/hardware +++ b/distrib/notes/hp300/hardware @@ -1,40 +1,37 @@ -NetBSD/hp300 1.0 will run on most HP 9000/300 series machines. +NetBSD/hp300 1.1 will run on most HP 9000/300- and 400-series machines. The lowest amount of RAM that has been tested is 7.5M, though it may run with less. Certainly, if you wish to run X, more RAM is -recommended. Until you reach 16M, more RAM is more important than -a faster CPU. +recommended. Here is a table of recommended HD partition sizes for a full install: - partition: advise needed - root (/) 15M 15M (see note below) - user (/usr) 80M 45M - swap ----- 2M for every 1M of RAM ----- - local (/local) up to you + partition: advise needed + root (/) 15M 10M + user (/usr) 80M 45M + swap (2 or 3 * RAM) 6M (see note below) + Anything else is up to you! -NOTE: Because of the nature of the hp300 bootstrap procedure, the root -filesystem is a _fixed_size_! You may want to consider placing /var and -/tmp on their own partitions. This, of course is up to you and your -judgement. Also, note that the recommended size of /usr is 15M greater -than the needed size. This is to allow room for kernel source and -compile areas, as you may want to compile your own kernel. +NOTE: The hp300 installation procedure utilizes a `miniroot' filesystem +which is placed into the swap area of the disk. The swap are must be +at least large enough to hold this miniroot image. The following HP hardware is supported: CPUs: 68020-based: 318, 319, 320, 330, and 350. - 68030-based: 340, 345, 360, 370, 375, and 400. - 68040-based: 380, 425, and 433. + 68030-based: 340, 345, 360, 370, 375, and 400(*). + 68040-based: 380, 425(*), and 433(*). Disks: HP-IB/CS80: 7912, 7914, 7933, 7936, 7937, 7945, 7957, 7958, 7959, 2200, and 2203. - SCSI-I, including magneto-optical and CD-ROM. SCSI-II - drives should work if they can talk SCSI-I. + SCSI-I(**), including magneto-optical and CD-ROM. Tape drives: - Low-density CS80 cartridge: 7914, 7946, 9144. - High-density CS80 cartridge: 9145. - SCSI: HP DAT and Exabyte. + Low-density HP-IB/CS80 cartridge: 7914, 7946, and 9144. + High-density HP-IB/CS80 cartridge: 9145. + HP-IB/CS80 1/2": 7974A, 7978A/B, 7979A, 7980A, and 7980XC. + SCSI: HP DAT, Exabyte, and SCSI QIC drives such as + the Archive Viper. RS232 interfaces: 98644 built-in single port (dca). @@ -54,13 +51,23 @@ The following HP hardware is supported: Input devices: General interface supporting all HIL devices: keyboard, - 2 and 3 button mice, and ID module. + 2 and 3 button mice(***), and ID module. Miscellaneous: Battery-backed real-time clock. - 98625A and 98625B built-in HP-IB interface. - 98658A built-in SCSI interface. + 98624 built-in HP-IB interface. + 98625A and 98625B `fast' HP-IB interface. + 98658A built-in and add-on SCSI interface. Printers and plotters on RS232 and HP-IB. SCSI autochanger. -If it's not on this list, there is no support for it in this release. +(*) 400-series machines configured for Domain/OS are not fully supported, + notably, the keyboard doesn't work and the ROMs must be in `HP-UX mode'. + +(**) SCSI-II drives are known to work, though this may require changing a + jumper on some drives. See your disk's documentation for details. + +(***) Serial mice connected to a `HIL to quad' converter are also known + to work. + +If it's not on this list, there is no official support for it in this release. diff --git a/distrib/notes/hp300/install b/distrib/notes/hp300/install index 9f33d0bc7ae..0c282aa9395 100644 --- a/distrib/notes/hp300/install +++ b/distrib/notes/hp300/install @@ -1,222 +1,38 @@ -NOTE: In the following examples you will see references to -disk devices. For those not familiar with NetBSD, the following -prefixes are used to denote drive types: +The miniroot's install program is very simple to use. It will guide +you through the entire process, and is well automated. Additional +improvements are planned for future releases. - sd SCSI disk - rd HP-IB disk +The miniroot's install program will: -In the examples that follow, `rd' will be used. The steps are -exactly the same for `sd' disks. Only the names have changed -to protect the innocent. + * Allow you to place disklabels on additional disks. + Note that partition sizes and offsets are expressed + in sectors. -Assuming you have read this document thoroughly and kept good notes -about your partitions, the rest should be fairly straight forward. + * Create filesystems on target partitions. -Before you begin, you must have already prepared the target disk -as detailed in the section on preparing your system for install. + * Allow you to set up your system's network configuration. + Remember to specify host names without the domain name + appended to the end. For example use `foo' instead of + `foo.bar.org'. If, during the process of configuring + the network interfaces, you make a mistake, you will + be able to re-configure that interface by simply selecting + it for configuration again. -The following is a walk-through of the steps necessary to finish -what the preparation process has already begun. You may choose to -stop the process at any time, but if you do, it's recommended that -you start over from scratch. + * Mount target filesystems. You will be given the opportunity + to manually edit the resulting /etc/fstab. - First you need to boot off of the target disk which - you have made in the preparation process. To do this, - halt HP-UX, power-cycle your machine, and hit the space - bar during the boot ROM's probing/testing sequence. - You should eventually be presented with a list of systems - from which to boot. You want the one called `SYS_PBOOT'. + * Extract binary sets from the media of your choice. - After selecting `SYS_PBOOT', your system should load the - NetBSD boot block and ask you for a kernel to load. - Enter the following to boot NetBSD into single-user mode. - (Note: it will come into single-user anyway, as there is - not yet an fstab, but this makes it happen more gracefully.) + * Copy configuration information gathered during the + installation process to your root filesystem. - netbsd -s + * Make device nodes in your root filesystem. - The kernel will now load, and configure your hardware. - Make a note of the device it lists when mounting the - root filesystem. It should look something like this: + * Copy a new kernel onto your root partition. - Changing root device to rd0a + * Install a new boot block. - The message above is an example only. Your message may - be different. + * Check your filesystems for integrity. - Check the root filesystem. Use the raw flavor of the - device listed during the `Changing root device...' - message. Example: - - fsck -p /dev/rrd0a - - Mount the root filesystem: - - mount /dev/rd0a / - - It's now time to newfs all of the other partitions you - listed in your disk label. So, for example, if rd0e and - rd0f were to have filesystems put on them, you would - do the following: - - newfs /dev/rrd0e - newfs /dev/rrd0f - - Ensure that the mount-points for these filesystems are clean. - If these filesystems are to be /var and /usr, respectively, - just check that there are no files in those directories. - There shouldn't be. Once you've made sure, go ahead and - mount those filesystems. - - It's now time to get the distribution sets onto the root - or other filesystem. There are several programs in /ibin - to help you with this. At your disposal, you have: - - ftp - gzip - tar - extract - - Except for extract, which is just a script to help the - process along, these are statically-linked versions of - themselves, which normally appear in /usr/bin. - - If you placed the distribution sets on tape, go to the - directory where you wish to temporarily place them and - extract them from tape, using /dev/nrstX for SCSI tapes - or /dev/nrctX for HP-IB cartridge tapes, where X is the - unit number of the tape, probably 0. - - tar xvf /dev/nrst0 - - If this extracts the sets directly into your current - directory, terrific. Otherwise, go to the directory in - which they live. Skip on to extracting the sets. - - If you will be grabbing the sets off of the network somehow, - configure your network interface: - - ifconfig le0 inet - route add default - - If you will be ftp'ing the sets from one of the NetBSD ftp - sites, go to the directory where you wish to temporarily - place them and download them from the ftp site of your choice. - Since you haven't yet created a resolv.conf, you'll need to - use the IP address. - - /ibin/ftp - - If you will be getting the sets from an NFS server, mount - the filesystem on the server which has the sets, and go - to the directory that has them. Again, you'll need to use - the IP address of the server. - - mount -t nfs : - - At this point, you have everything necessary to label any - additional disks that you wish to label. If you created - additional labels in the preparation phase, and have - access to them now, go ahead and label the disks they - correspond to: - - disklabel -W rd1 - disklabel -r -R rd1 rd1.label - where: - rd1 additional disk you wish to label - rd1.label file containing disk label information - - You may check these labels once they are on the disk: - - disklabel -r rd1 - where: - rd1 additional disk you wish to label - - A problem with a partition (such as overlaps or not falling - on a cylinder boundary) will be noted with a `*'. If you see - these, re-edit your label by the method of your choice (on - another machine, perhaps, or with ed(1), for the brave), - transfer it to a place that's usable (if necessary) and - label the disk again. - - Once these disks have been labeled, you may newfs the - partitions that are to contain filesystems and mount them. - - You should now be ready to extract the filesets. The program - /ibin/extract should help you with this. For example: - - /ibin/extract base - -or- /ibin/extract base.tar.gz - - Do this for all of the filesets you wish to extract. As your disk - fills up, you may wish to remove the sets once you have extracted - them. - - You should have everything necessary to use an editor by now. - Set your TERM environment variable: - - setenv TERM hp300h (csh) - -or- export TERM=hp300h (sh) - - hp300h is the terminal type for the HP 9000/300 ITE console. - If you are using a serial console, change the TERM variable - appropriately. Now, initialize the terminal: - - tset - - You should be able to use vi now. - - Create an /etc/fstab. Example fstabs are provided in - /etc/fstab.sd and /etc/fstab.rd. - - Edit your host table, /etc/hosts. In it, place the IP - address of this host and the IP address of your default - router. - - Edit the file /etc/myname. In it, place the symbolic name - of your machine. - - Edit the file /etc/defaultdomain. In it, place the name - of your YP domain. If you will not be using YP, simply - enter the domain name of your site. - - Edit the file /etc/mygate. In it, place the name of - your default router, as your listed it in /etc/hosts. - - Edit the file /etc/hostname.le0. In it, place the following - information: - - inet - - where: - is the name corresponsing to - the IP address for that interface, as you listed in - /etc/hosts. - - is the netmask for your network. - - is the broadcast address for your network. - - Repeat this step for any additional network interfaces you - may have. - - Edit the file /etc/ttys. Make sure that the entries are - correct for whichever console type you have. /dev/console - is correct for ITE, /dev/tty0 for console on dca, and - /dev/tty00 for console on dcm. You may get more information - about /etc/ttys by doing `man ttys', providing you have - installed the system manual set. - - Ok, cross your fingers and reboot: - - sync; sync; sync; reboot - - Providing you entered all information correctly, your - machine will boot into multi-user mode. Your system - will need a few tweaks here and there (like /etc/sendmail.cf - and /etc/netstart, perhaps), but that's the easy stuff. - - CONGRATULATIONS! You have successfully installed NetBSD - onto your hp300! Pat yourself on the back. This might also - be a good time to remove /ibin, as you will no longer need - it, and it is provided solely for bootstrapping purposes. +First-time installation on a system through a method other than the +installation program is possible, but strongly discouraged. diff --git a/distrib/notes/hp300/legal b/distrib/notes/hp300/legal index 9ee96f95125..f2b01450f4a 100644 --- a/distrib/notes/hp300/legal +++ b/distrib/notes/hp300/legal @@ -1,3 +1,7 @@ - This product includes software developed by Adam Glass. + This product includes software developed by the Computer + Systems Laboratory at the University of Utah. - This product includes software developed by Jason R. Thorpe. + This product includes software developed at Ludd, University of + Lule}, Sweden and its contributors. + + This product includes software developed by Gordon W. Ross. diff --git a/distrib/notes/hp300/prep b/distrib/notes/hp300/prep index 5da019a2a6a..ada1d72e51f 100644 --- a/distrib/notes/hp300/prep +++ b/distrib/notes/hp300/prep @@ -1,125 +1,164 @@ -NOTE: These instructions are explicitly for installing NetBSD -from an HP-UX system, version 7 or later. It has not been -tested with HP-UX versions earlier than 7, and has also not -been tested with HP-UX 8, although it is presumed to work. -For the creative, similar steps may be taken from a system such -as Utah's 4.3BSD release for the hp300, although bootstrapping -from such a system has not been tested. - -Bootstrapping the hp300 is a complicated process, but it's a lot -easier than it used to be. For this process you need the -following items from the install/ directory: - - boot NetBSD/hp300 boot block for - HP-IB and SCSI disks - - rootimage.gz bootstrap root filesystem - image - - label prototype disk label - - makedisk a program for HP-UX that will - write a NetBSD disk label, - boot block, and root filesystem - image to the target disk - (NOTE: This is an HP-UX 7.x binary. - while it will work under HP-UX 9.x, - you may want to compile this yourself. - The source may be found in makedisk.tar.gz) - -VERY IMPORTANT NOTE: This procedure will destroy all data on the -target disk. Because NetBSD uses a different filesystem format than -HP-UX, your old data will be useless. If you wish to save anything, -use tar(1) instead of dump(1M), again because of filesystem differences. - -First of all, you must have a second disk on which to install NetBSD. -If possible, this disk should first be prepared with mediainit(1M). -Once this disk is spotless, you should generate a disk label for it. -Using the prototype label provided, fill in all of the necessary -information. Remember, if you derive geometry information from an -HP-UX disktab, your partition size will be off. This is because HP-UX -uses a 1024-byte sector size, while NetBSD uses a 512-byte sector size. -To avoid the problem, you may simply double the number of cylinders. -(That's what I do...works great. -- JRT) - -IMPORTANT: Partition 'a' must be offset one cylinder. Since -partition information is expressed in sectors, the offset of -partition 'a' must be the value of `sectors/cylinder'. This is -to leave room for the boot block. - -When you create your disklabel, be sure to specify whether or not -the disk is HP-IB or SCSI in the `type:' field. - -Below is an example of what a disk label should look like. This -is an example only! Do not attempt this at home! - - - -# Sample disklabel for example only. This is a comment. -type: HP-IB -disk: -label: INSTALL-1_0 -flags: -bytes/sector: 512 -sectors/track: 36 -tracks/cylinder: 7 -sectors/cylinder: 252 -cylinders: 1013 -rpm: 3600 -interleave: 1 -trackskew: 0 -cylinderskew: 0 -headswitch: 0 # milliseconds -track-to-track seek: 0 # milliseconds -drivedata: 0 - -7 partitions: -# size offset fstype [fsize bsize cpg] - a: 30744 252 4.2BSD 1024 8192 16 # (Cyl. 1 - 122) - b: 32760 30996 swap # (Cyl. 123 - 252) - c: 255276 0 boot # (Cyl. 0 - 1012) - e: 20412 63756 4.2BSD 1024 4096 16 # (Cyl. 253 - 333) - f: 40824 84168 4.2BSD 1024 8192 16 # (Cyl. 334 - 495) - g: 130284 124992 4.2BSD 1024 8192 16 # (Cyl. 496 - 1012) - -NOTE: Due to the nature of the bootstrapping procedure, your 'a' -partition must be at least 30744 sectors long. Increase the size of -your 'a' partition just enough to make it end on a cylinder boundary. -If you make it any larger, you will just be wasting space, as the -filesystem ends after 30744 sectors. - -Remember to write down the names of the partitions and what you -will be using them for (i.e. 'a - root, b - swap, e - /usr, etc.') -as you will need this information later on in the installation -process. - -Once you are satisfied with your disklabel, you can write the -root filesystem image to the target disk. Use the `makedisk' -program for this. So, under HP-UX, do: - - ./makedisk /dev/rdsk/c7d0s0 mylabel boot rootimage.gz - -where: - /dev/rdsk/c7d0s0 raw flavor of target disk device - - mylabel disk label you just wrote - - boot supplied boot block - - rootimage.gz gzipped root filesystem image - NOTE: This requires that gzip be - installed on your HP-UX system. - If it is not, a gzip binary is - provided in the install/ directory. - Source for gzip may be found in the - gsrc10 distribution set. Again, this - gzip is an HP-UX 7.x binary. - -If you wish to label any additional disks, you will have to do this -from NetBSD, although you will not have an editor at your disposal. -To do this, simply generate the labels now, and then grab them at -the same time and by the same method you use to grab the distrubtion -sets. - -Once this is done, you should be ready to boot NetBSD from the target -disk. +Currently, only installing the miniroot from the network is supported. +This may change in a future release. + +You will need information about your disk's geometry, based on 512-byte +sectors. You must have this information before proceeding. The +file `.../install/HP-IB.geometry' has geometry inforomation for several +HP-IB disks, but may be incomplete. Geometry may be calculated from an +HP-UX `/etc/disktab' entry, but note that HP-UX geometry is based on +1024 byte sectors, while NetBSD's is based on 512 byte sectors. + +QUICK NOTE ABOUT PARTITIONS: Since the target disk will become the boot +disk for your new NetBSD/hp300 installation, you will need to treat the +`a' and `c' partitions in a special manner. Due to the size of the +NetBSD/hp300 boot program (it spills into the area after the disklabel), +it is necessary to offset the `a' partition one cylinder from the beginning +of the disk. Later, the `c' partition will be marked with the type +`FS_BOOT' and may not be used for a filesystem. (For those unfamiliar +with historic BSD partition conventions, the `c' partition is defined +as `the entire disk', or the `raw partition'.) + +A QUICK NOTE ABOUT DISK NUMBERS: While in the SYS_INST program, you +may use different unit numbers for the disks than when the NetBSD +kernel is running. The unit number for a disk while in SYS_INST is +calculated with the following formula: + + unit = (controller * 8) + slave + +Controllers are numbered 0, 1, ... starting with the lowest select code. +SCSI controllers and HP-IB controllers are counted separately. Therefore, +if you had a system with an internal HP-IB interface at select code 7, +a fast HP-IB interface at select code 14, and a SCSI interface at select +code 16, unit numers might be something like the following: + + Location Unit + -------- ---- + HP-IB at 7, slave 2 2 (disk: rd2) + HP-IB at 14, slave 5 13 (disk: rd13) + SCSI at 16, slave 0 0 (disk: sd0) + + + Miniroot installation via network + --------------------------------- +NOTE: BOOTING SYS_INST VIA THE NETWORK IS ONLY POSSIBLE IF YOUR BOOTROM +IS `REV. C' OR LATER. + +In order to complete this process, you will need the following from the +`.../install' directory of the distribution: + + SYS_INST The standalone disklabel and miniroot + installation tool + + inst-11.fs.gz A gzipped miniroot filesystem image. This image + must be un-gzipped before copying to disk. + +To boot SYS_INST via the network, you will need a system capable of handling +boot requests for an HP workstation. If you will use this method, see the +special note below. + +To boot SYS_INST from tape, you need only place SYS_INST on the tape as +the first file. + +-- The following section is specific for loading SYS_INST via the network. -- + +If you wish to load the SYS_INST program via the network, you may need +the following from the `.../install' directory in addition to the items +listed above: + + rbootd.tar.gz Source code for the rbootd program included with + NetBSD. It requires that the server have a + Berkeley Packet Filter (bpf). You will need to + compile this version of rbootd if your server + system does not have this utility already. + +First of all, configure your rbootd to handle boot requests from the +client. NOTE: NetBSD's `rbootd' is slightly different from HP-UX's. +To configure NetBSD's `rbootd', create a file called `/etc/rbootd.conf' +and place in it an entry like the following: + + 08:00:09:04:AA:33 SYS_INST # thunder-egg + +The first column is the ethernet address of the client's network interface. +The second column is the program to send to the client, and anything after +the `#' is a comment. Once you have rbootd running, copy the SYS_INST +program to the /usr/mdec/rbootd directory on your server. If this +directory doesn't exist already, you will need to create it. + +For information on configuring rbootd under HP-UX, see the rbootd(1M) +manual page on your server system. + +Once `rbootd' is configured and running, you will be ready to continue. + +------------------ End of network boot-specific section ---------------------- + +Make sure that the miniroot filesystem image has been un-gzipped, and +that it resides in a filesystem what is exported to the client. See the +manual pages on your server system if you need more information about +exporting filesystems. + +You are now ready to SYS_INST. During the client's self-test cycle, press +the space bar a few times. Shortly, you should see a menu of possible boot +options appear. Select the option corresponding to SYS_INST. SYS_INST will +load and prompt you for a command. + +If this is a new NetBSD installation, you will need to place a disklabel +on the disk. + + sys_inst> disklabel + +NOTE: it may be worth selecting the `zap' option initially to ensure that +the disklabel area is clear. This may be especially important if an +HP-UX boot block had been previously installed on the disk. + +Select the `edit' option, and answer the questions about your disk. +There may be several questions which you may not be sure of the answers +to. Listed below are guidelines for SCSI and HP-IB disks: + + Bad sectoring? NO + Ecc? NO + Interleave? 1 + Trackskew? 0 + Cylinderskew? 0 + Headswitch? 0 + Track-to-track? 0 + Drivedata 0-4? 0 (for all Drivedata values) + +Next, you will be asked to fill out the partition map. You must provide +responses for all 8 partitions. Remember, you must allocate at least 6M +for the `b' partition, or else the miniroot will not fit. Set the size and +offset of any unused partition to 0. Note that sizes and offsets are +expressed in `n sectors', assuming 512 byte sectors. Care should be taken +to ensure that partitions begin and end on cylinder boundaries (i.e. size +and offset is an even multiple of the number of sectors per cylinder). +While this is not technically necessary, it is generally encouraged. Note +that you cannot enter partition types at this time. You will be given an +oppotinuty to `clean up' the disklabel later on in the installation procedure. + +Once you have edited the label, select the `show' option to verify that +it is correct. If so, select `write' and `done'. Otherwise, you may +re-edit the label. + +The next step is to copy the miniroot image onto the target disk. + + sys_inst> miniroot + +You will be prompted for the target disk and the source of the miniroot +filesytem image. + +Enter the filename of the miniroot image. Note that this file _must_ reside +in the server directory being mounted. Next you will be asked for the +client's IP address, netmask, and default router, the server's IP address, +and the directory on the server to mount. Once you have entered this +information, SYS_INST will attempt to mount the NFS server and begin copying +the miniroot filesystem to the `b' partition of the target disk. + +Is is worth noting that this copy may take a while. It might be worth +grabbing a cup of coffee at this point. + +Once the miniroot filesystem image has been copied onto the target disk, +you may boot from the miniroot filesystem. + + sys_inst> boot + +Enter the disk from which to boot. The kernel in the miniroot filesystem +will be booted into single-user mode. diff --git a/distrib/notes/hp300/upgrade b/distrib/notes/hp300/upgrade index 25bcdb9f97c..aa51832ae4e 100644 --- a/distrib/notes/hp300/upgrade +++ b/distrib/notes/hp300/upgrade @@ -1 +1,92 @@ -There is no previous release of NetBSD/hp300 to upgrade. +It is possible to easily upgrade your existing NetBSD/hp300 system +using the upgrade program in the miniroot. If you wish to upgrade +your system by this method, simply select the `upgrade' option once +the miniroot has booted. The upgrade program with then guide you +through the procedure. The upgrade program will: + + * Enable the network based on your system's current + network configuration. + + * Mount your existing filesystems. + + * Extract binary sets from the media of your choice. + + * Fixup your system's existing /etc/fstab, changing the + occurrences of `ufs' to `ffs' and let you edit the + resulting file. + + * Make new device nodes in your root filesystem. + + * Copy a new kernel onto your root partition. + NOTE: the existing kernel WILL NOT be backed up; doing + so would be pointless, since a NetBSD 1.0 kernel will + not run NetBSD 1.1 executables. + + * Install a new boot block. + + * Check your filesystems for integrity. + +While using the miniroot's upgrade program is the preferred method +of upgrading your system, it is possible to upgrade your system +manually. To do this, follow the following procedure: + + * Place _at least_ the `base' binary set in a filesystem + accessible to the target machine. A local filesystem + is preferred, since there may be incompatibilities + between the NetBSD 1.1 kernel and older route(8) + binaries. + + * Back up your pre-existing kernel and copy the 1.1 + kernel into your root partition. + + * Reboot with the 1.1 kernel into single-user mode. + + * Check all filesystems: + + /sbin/fsck -p + + * Mount all local filesystems: + + /sbin/mount -a -t nonfs + + * If you keep /usr or /usr/share on an NFS server, you + will want to mount those filesystems as well. To do + this, you will need to enable the network: + + sh /etc/netstart + + NOTE: the route(8) commands may fail due to potential + incompatibilities between route(8) and the NetBSD 1.1 + kernel. Once you have enabled the network, mount the + NFS filesystems. If you use amd(8), you may or may not + have to mount these filesystems manually. Your mileage + may vary. + + * Make sure you are in the root filesystem and extract + the `base' binary set: + + cd / + tar --unlink -zxvpf /path/to/base11.tar.gz + + NOTE: the `--unlink' option is _very_ important! + + * Install a new boot block: + + cd /usr/mdec + disklabel -B + + * Sync the filesystems: + + sync + + * At this point you may extract any other binary sets + you may have placed on local filesystems, or you may + wish to extract additional sets at a later time. + To extract these sets, use the following commands: + + cd / + tar --unlink -zxvpf + +NOTE: you SHOULD NOT extract the `etc' set if upgrading. Instead, you +should extract that set into another area and carefully merge the changes +by hand. diff --git a/distrib/notes/hp300/whatis b/distrib/notes/hp300/whatis index 7a1b6055ef7..ba2c5cba869 100644 --- a/distrib/notes/hp300/whatis +++ b/distrib/notes/hp300/whatis @@ -1,2 +1,2 @@ -This is the first public release of NetBSD for the HP 9000/300 series of +This is the second public release of NetBSD for the HP 9000/300 series of computers. diff --git a/distrib/notes/hp300/xfer b/distrib/notes/hp300/xfer index a912c45d826..799a932f52f 100644 --- a/distrib/notes/hp300/xfer +++ b/distrib/notes/hp300/xfer @@ -1,6 +1,7 @@ Installation is supported from several media types, including: Tape - NFS partitions + CD-ROM + NFS FTP The steps necessary to prepare the distribution sets @@ -9,70 +10,71 @@ you choose. The various methods are explained below. To prepare for installing via a tape: - To install NetBSD from a tape, you need to somehow - get the NetBSD filesets you wish to install on - your system on to the appropriate kind of tape, - in tar format. - - If you're making the tape on a UN*X system, the easiest - way to do so is: - - tar cvf - - where "" is the name of the tape device - that describes the tape drive you're using (possibly - something like /dev/nrst0, but we make no guarantees 8-). - Under HP-UX, this would be something like /dev/rmt/c0ed03inb. - Again, your mileage may vary. If you can't figure it out, - ask your system administrator. "" are the names - of the "set_name.nnn" files which you want to be placed - on the tape. - - Once you have done this, you can proceed to the next - step in the installation process, preparing your - system for NetBSD installation. - -To prepare for installing via an NFS partition: - - NOTE: this method of installation is recommended - only for those already familiar with using - the BSD network-manipulation commands and - interfaces. If you aren't, this documentation - should help, but is not intended to be - all-encompassing. - - Place the NetBSD software you wish to install into - a directory on an NFS server, and make that directory - mountable by the machine which you will be installing - NetBSD on. This will probably require modifying the - /etc/exports file of the NFS server and resetting - mountd, acts which will require superuser privileges. - Note the numeric IP address of the NFS server and of - the router closest to the the new NetBSD machine, - if the NFS server is not on a network which is - directly attached to the NetBSD machine. - - Once you have done this, you can proceed to the next - step in the installation process, preparing your - system for NetBSD installation. + If you wish to load SYS_INST from tape, it must + appear on the tape before any other files. To copy + this onto tape, use a command like the following: + + dd if=SYS_INST of= bs=20b + + Note that not all HP BOOTROMs support booting from + SCSI tapes. + + Copying the miniroot to disk from tape is not currently + supported. However, it is planned for a future release. + + If you wish to extract binary sets onto your disk from + tape, you must first place them on the tape. The easiest + way to do this is with the dd(1) command. Make sure you + use a `no-rewind-on-close' tape device. For example: + + for file in base11.tar.gz etc11.tar.gz; do + dd if=${file} of=/dev/nrst0 bs=20b + done + + Note that depending on your tape drive, you may need to + explicitly set the EOF marker at the end of each file. + It may also be necessary to use the `conv=osync' argument + to dd(1). Note that this argument is incompatible with the + `bs=' argument. Consult the tape-related manual pages on the + system where the tapes are created for more details. + +To prepare for installing via NFS: + + SYS_INST currently requires an NFS server from which to + copy the miniroot. + + * This filesystem must be exported with root permissions, + but may be exported read-only. + + * The miniroot image _must_ reside in the `root' of the + mounted filesystem. For example, if the client system + mounts `server:/u', then the miniroot image must reside + in /u on the server. This is due to limitations in the + file lookup code used in SYS_INST, and may be fixed in + a future release. + + * If you also wish to install the binary sets from the + NFS server, place them in a properly exported filesystem + on the server. Note that these files do not suffer from + the same placement restrictions as the miniroot. To prepare for installing via FTP: - NOTE: this method of installation is recommended - only for those already familiar with using - the BSD network-manipulation commands and - interfaces. If you aren't, this documentation - should help, but is not intended to be - all-encompassing. - - The preparations for this method of installation - are easy: all you have to do is make sure that - there's some FTP site from which you can retrieve - the NetBSD installation when it's time to do - the install. You should know the numeric IP - address of that site, the numeric IP address of - your nearest router if one is necessary - - Once you have done this, you can proceed to the next - step in the installation process, preparing your - system for NetBSD installation. + It is possible, using the `install' and `upgrade' + programs in the miniroot, to extract the binary sets + directly onto disk from an FTP server. This is by far + the easiest installation method, as you may specify to + have all sets extracted at once, providing that they + are located in the same directory on the server. + + All that is required in this case is that you have + network access to an FTP server. This may be your + account on another system, or may even be ftp.NetBSD.ORG + itself. If you wish to use ftp.NetBSD.ORG as your FTP + file server, you may want to keep the following information + handy: + + IP Address: 205.149.163.23 + Login: anonymous + Password: + Server path: /pub/NetBSD/NetBSD-1.1/hp300/binary diff --git a/distrib/notes/pc532/contents b/distrib/notes/pc532/contents index 469913d7fa6..5c9b7065e6e 100644 --- a/distrib/notes/pc532/contents +++ b/distrib/notes/pc532/contents @@ -1,19 +1,14 @@ -The pc532-specific portion of the NetBSD 1.0 release is found in the +The pc532-specific portion of the NetBSD 1.1 release is found in the "pc532" subdirectory of the distribution. That subdirectory contains the files as follows: -.../NetBSD-1.0/pc532/ +.../NetBSD-1.1/pc532/ INSTALL Installation notes; this file. CKSUM output of "cksum *.gz" - ram.root.gz Ram root disk - util.tar.gz things to help the install - netbsd.rd.9600.gz "ram disk" root kernel, 9600 baud - netbsd.rd.19200.gz "ram disk" root kernel, 19200 baud - netbsd.sd0.9600.gz sd0a root, 9600 baud console - netbsd.sd0.19200.gz sd0a root, 19200 baud console - netbsd.sd1.9600.gz sd1a root, 9600 baud console - netbsd.sd1.19200.gz sd1a root, 19200 baud console + inst-11.fs.gz Installation file system. + download.c.gz Source for a pc532 ROM compat download pgm + netbsd.default.gz Upgrade kernel base.tar.gz base distribution comp.tar.gz compiler tools & libraries etc.tar.gz files for /etc @@ -26,12 +21,12 @@ the files as follows: The binary distribution consists of the following files: base.tar.gz - The NetBSD/pc532 1.0 base binary distribution. You + The NetBSD/pc532 1.1 base binary distribution. You MUST install this distribution set. It contains the base NetBSD utilities that are necessary for the system to run and be minimally functional. It excludes everything described below. - [ 15.1M gzipped ] + [ 6.8M gzipped ] comp.tar.gz The NetBSD/pc532 Compiler tools. All of the tools @@ -41,7 +36,7 @@ The binary distribution consists of the following files: and the various system libraries. This set also includes the manual pages for all the utilities it contains, as well as the system call and library manual pages. - [ 4.2M gzipped ] + [ 4.7M gzipped ] etc.tar.gz This distribution set contains the system @@ -51,31 +46,31 @@ The binary distribution consists of the following files: used if you are upgrading. (If you are upgrading, it's recommended that you get a copy of this set and CAREFULLY upgrade your configuration files by hand.) - [ 50K gzipped ] + [ 63K gzipped ] games.tar.gz This set includes the games and their manual pages. - [ 2.4M gzipped ] + [ 2.8M gzipped ] man.tar.gz This set includes all of the manual pages for the binaries and other software contained in the base set. Note that it does not include any of the manual pages that are included in the other sets. - [ 0.7M gzipped ] + [ 0.8M gzipped ] misc.tar.gz This set includes the system dictionaries (which are rather large), the typesettable document set, and man pages for other architectures which happen to be installed from the source tree by default. - [ 1.7M gzipped, 5.6M uncompressed ] + [ 1.9M gzipped ] text.tar.gz This set includes NetBSD's text processing tools, including groff, all related programs, and their manual pages. - [ 1.1M gzipped ] + [ 0.8M gzipped ] The pc532 distribution set does not include a security distribution. If you are in the US and want the security distribution you must @@ -88,26 +83,20 @@ recompile the following programs: The initial installation process on a pc532 without NetBSD/pc532 is supported by the following files: - Initial kernels to loaded into memory and run: + Initial file system used via SCSI floppy or downloaded into + memory: - netbsd.rd.9600.gz "ram disk" root kernel, 9600 baud - netbsd.rd.19200.gz "ram disk" root kernel, 19200 baud + inst-11.fs -- file system containing boot loader + and install kernel with 2MB + ram root file system. - The initial root file system for the above kernels + download.c -- source for the program to download + inst-11.fs into memory via the + pc532 ROM monitor. - ram.root.gz Ram root disk - - Utility programs for helping with the install after a - mini-root has been built on a hard disk - - util.tar.gz things to help the install - - Bootable kernels for placement in the file system to boot - from hard disk. - - netbsd.sd0.9600.gz sd0a root, 9600 baud console - netbsd.sd0.19200.gz sd0a root, 19200 baud console - netbsd.sd1.9600.gz sd1a root, 9600 baud console - netbsd.sd1.19200.gz sd1a root, 19200 baud console +The upgrade process is supported by having a copy of a 1.1 kernel +available. This file is: + netbsd.default.gz -- a kernel produced from the DEFAULT + configuration file in pc532/conf. diff --git a/distrib/notes/pc532/install b/distrib/notes/pc532/install index fb9e521ff6e..f2b59b269c6 100644 --- a/distrib/notes/pc532/install +++ b/distrib/notes/pc532/install @@ -46,8 +46,10 @@ The Install Procedure: these settings. The monitor's baud rate can be changed with "baud d'9600". - b) Get inst-11.fs. - If you have a 1.44 meg SCSI floppy drive, you can put this + b) Get inst-11.fs and boot the kernel. + + From Floppy: (and using the autoboot monitor) + If you have a 1.44 meg SCSI floppy drive, you can put inst-11.fs onto a 3.5" floppy disk. Insert the disk into your floppy drive and use the monitor's boot command to boot the default image from the floppy. The image booted will ask you for a @@ -55,12 +57,23 @@ The Install Procedure: sdXa:/netbsd Replace X with your drive number. For KLONDIKE X would be "2". - If you don't have a floppy drive, you will have to + Tape: + You will need to load a copy of inst-11.fs into RAM. - load the inst-11.fs at 0x288000 - - run at 0x3EB820 + - run at 0x3E8820 The boot program will ask you now for a kernel to load. Answer rd0a:/netbsd + Serial line: + Provided with the distribution is source for program called + download. (download.c) This program when used as + "download file" will read the contents of the file and + output to standard output a byte sequence used by the pc532 + ROM monitor to download a binary file into RAM. Using this + program on a computer connected to the pc532, one can + load a copy of inst-11.fs into RAM at 0x288000. The boot + sequence is now the same as with tape. + c) Choose a disk geometry. For me, the reported geometry left some sectors "unallocated". That is, the autoconfig message said the disk had 2428 cylinders, 9 heads, and 93 sectors/track. @@ -87,7 +100,7 @@ The Install Procedure: steelhead[5]$ echo "2 * 997"|bc 1994 - Now I the number of tracks: + Now I need the number of tracks (or cylinders): steelhead[5]$ echo "2 * 5 * 103"|bc 1030 @@ -103,9 +116,9 @@ The Install Procedure: partitions, it will ask for a mount point. The mount point will be "relative to /" and should not include the leading "/". Also, IF you do not want the partition to have newfs run on it (that is - it might be the last one and have a copy of ram.root and your - kernels) enter "NO" to the mount point and it will not run newfs - on the partition. It will enter the partition into the disklabel. + it might be the last one and have a copy of inst-11.fs) enter "NO" + to the mount point and it will not run newfs on the partition. + It will enter the partition into the disklabel. e) look around, if you want ... and then halt NetBSD. @@ -125,6 +138,8 @@ The Install Procedure: use nfs... Plip is only an option if you have installed a centronics port in your pc532. + You do have access to vi to edit your network + files. (/etc/resolv.conf, ...) b) floppy disk @@ -132,7 +147,12 @@ The Install Procedure: d) cdrom (If you have a CD with NetBSD/532 ...) - e) using kermit. (See the notes at the end of this file.) + e) Use the ROM compatable "download" program. The program + download is included in the initial installation and + can be used as the receive end of the download by + using it as "download -r file_to_write". If the CRC is + correct, the file is retained. If the CRC is not + correct, the file is deleted. f) some other method? (Let me know about it.) @@ -149,8 +169,8 @@ The Install Procedure: - tar -xpzf /gz.files/base.tar.gz --unlink Add v to the flags if you want a verbose extract. - The --unlink is to make sure that the "ram.root" versions - of sh, init, ... are replaced by their full featured versons + The --unlink is to make sure that the install versions + of sh, init, ... are replaced by their proper versons in base.tar.gz. I think it is wise to include the --unlink for other things. @@ -179,42 +199,14 @@ The Install Procedure: gdb -w /netbsd set scndefaultrate = YOUR_BAUD_RATE quit + where YOUR_BAUD_RATE is the actual value, 19200, 38400 or + something slower than 9600. If you set scndefaultrate to something bogus, you'll probably not be able to reboot... So be carefull! + l) Reboot the machine and it should come up in multi-user mode *IF* you got it configured correctly. m) Enjoy! And help fix bugs and improve NetBSD/pc532! - -For those who choose to use kermit to help in getting NetBSD/pc532 -installed: - - The following is the Kermit copyright: - - Copyright (C) 1985, 1994, Trustees of Columbia University in the - City of New York. The C-Kermit software may not be, in whole or - in part, licensed or sold for profit as a software product - itself, nor may it be included in or distributed with commercial - products or otherwise distributed by commercial concerns to their - clients or customers without written permission of the Office of - Kermit Development and Distribution, Columbia University. This - copyright notice must not be removed, altered, or obscured. - - Due to this copyright, we can not include kermit with the standard - NetBSD/pc532 distribution. - - The Office of Kermit Development and Distribution of Columbia - University in the City of New York has given permission for - us to distribute a NetBSD/pc532 binary. It is available primarily - for bootstrapping purposes and therefore is not a complete package, - lacking source code, various supporting text files, and the user - manual. Users who wish to use C-Kermit after the bootstrapping - process should obtain the full package, including the manual - "Using C-Kermit", from Columbia University. - - The NetBSD/pc532 binary is available via ftp from - iceberg.cs.wwu.edu in the directory pub/NetBSD/pc532 as the file - kermitbin.tar.gz. - diff --git a/distrib/notes/pc532/upgrade b/distrib/notes/pc532/upgrade index 57b3b74eaef..59a47726351 100644 --- a/distrib/notes/pc532/upgrade +++ b/distrib/notes/pc532/upgrade @@ -1,10 +1,10 @@ -The upgrade to NetBSD 1.0 is a binary upgrade; it would be prohibitive -to make users upgrade by compiling and installing the 1.0 sources, and +The upgrade to NetBSD 1.1 is a binary upgrade; it would be prohibitive +to make users upgrade by compiling and installing the 1.1 sources, and it would be very difficult to even compile a set of instructions that allowed them to do so. To do the upgrade, you must have at least base.tar.gz on disk and -a copy of the proper netbsd.sdx.yyyy. It will require quite a bit +a copy of the proper netbsd.default. It will require quite a bit of disk space to do the upgrade. Since upgrading involves replacing the kernel, and most of the system @@ -31,25 +31,15 @@ To upgrade your system, follow the following instructions: work at upgrading /etc. There may be changes to file formats depending on what version of NetBSD/pc532 you are running. - BE CAREFUL IF YOU ARE RUNNING WITH SECURITY. The distribution - binaries don't support it. It would be reasonable to save a - copy of master.passwd and remove all passwords until after - you upgrade to the new security level. + BE CAREFUL IF YOU ARE NOT RUNNING WITH SECURITY. The + 1.1 distribution does contain support for password encription. + It would be reasonable to save a copy of master.passwd and + remove all passwords until after you upgrade. - Place the proper netbsd.sdX.YYYY in / as the file netbsd. + Place netbsd.default in / as the file netbsd. - Reboot. + Reboot. (Remember, detbsd.default is a 9600 console line + kernel. Read the last part of the new installation part of + these notes to find out how to change your default speed.) After reboot, you should make sure you check your new file systems. - Also, you may wish to upgrade your file systems to the new file - system format. After the install process is complete, - use "fsck -c 2" to upgrade the file systems. Read the fsck(8) - manual page for more details. - - If you upgrade your file systems, you will want to make sure - you have the most recent ufs boot program if you use the - NetBSD boot program to read the kernel off a ufs file system. - Use bim(8) to remove your old boot program and install the - newest one if you are using the autoboot monitor. - - diff --git a/distrib/notes/sparc/contents b/distrib/notes/sparc/contents index c013629d235..267dabfa6f7 100644 --- a/distrib/notes/sparc/contents +++ b/distrib/notes/sparc/contents @@ -67,7 +67,7 @@ subdirectory of the NetBSD 1.1 distribution tree, and are as follows: [ 0.8M gzipped, 3.1M uncompressed ] The sparc security distribution set is named "secr11" and can be found -in the "sparc/security" subdirectory of the NetBSD 1.0 distribution +in the "sparc/security" subdirectory of the NetBSD 1.1 distribution tree. It contains crypt.c (the source file for the DES encryption algorithm) and the binaries which depend on it. It can only be found on those sites which carry the complete NetBSD distribution and that diff --git a/distrib/notes/sparc/install b/distrib/notes/sparc/install index 422472b23bc..48297a1fd3d 100644 --- a/distrib/notes/sparc/install +++ b/distrib/notes/sparc/install @@ -11,10 +11,17 @@ skip to the section "Installing from SunOS" below. Installing using a diskless setup. -First, you must setup a diskless client configuration on a server. Consult -your server installation documents on how to proceed with this. -Put all the *.tar.gz files you want to install into the root directory -for your client on the server. +First, you must setup a diskless client configuration on a server. If +you are using a NetBSD system as the boot-server, have a look at the +diskless(8) manual page for guidelines on how to proceed with this. +If the server runs another operating system, you'll have to consult +documentation that came with it (on SunOS systems, add_client(8) is a +good start). + +As noted above in the section `Preparing your System for NetBSD Installation', +you have several options when choosing a location to store the installation +filesets. However, the easiest way is to put the *.tar.gz files you want +to install into the root directory for your client on the server. Next, unpack `base.tar.gz' and `etc.tar.gz' on the server in the root directory for your machine. If you elect to use a separately NFS-mounted @@ -94,14 +101,63 @@ have to create all partitions from scratch. If your disk is listed in a `c' partition to describe the whole disk) to put an initial label on the disk. +Here follows an example of what you'll see while in the dislabel editor. +Do not touch any of the parameters except for the `label: ' entry and +the actual partition size information at the bottom (the lines starting +with `a:', `b:', ...). + +The size and offset fields are given in sector units. Be sure to make +these numbers multiples of the of the number of sectors per cylinder: +the kernel might be picky about these things, but aside from this you'll +have the least chance of wasting disk space. +Partitions on which you intend to have a a mountable filesystem, should +be given fstype `4.2BSD'. Remember, the `c' partition should describe +the whole disk. +The `(Cyl. x - y)' info that appears after the hash (`#') character is +treated as a comment and need not be filled in when altering partitions. + +Special note: the line containing `8 partitions:' is best left alone, +even if you define less then eight partitions. If this line displays +a different number and the program complains about it (after you leave +the editor), then try setting it to `8 partitions:'. + + + +netbsd# disklabel sd2 + # /dev/rsd2c: +type: SCSI +disk: SCSI disk +label: Hold Your Breath +flags: +bytes/sector: 512 +sectors/track: 64 +tracks/cylinder: 7 +sectors/cylinder: 448 +cylinders: 1429 +rpm: 3600 +interleave: 1 +trackskew: 0 +cylinderskew: 0 +headswitch: 0 # milliseconds +track-to-track seek: 0 # milliseconds +drivedata: 0 + +8 partitions: +# size offset fstype [fsize bsize cpg] + a: 50176 0 4.2BSD 0 0 0 # (Cyl. 0 - 111) + b: 64512 50176 swap # (Cyl. 112 - 255) + c: 640192 0 unknown # (Cyl. 0 - 1428) + d: 525504 114688 4.2BSD 0 0 0 # (Cyl. 256 - 1428) + + If you are upgrading a NetBSD installation, start the upgrade script: -#netbsd ./upgrade.sh +netbsd# sh upgrade.sh -else, start the installation procedure: +else, start the installation script: -netbsd# ./install.sh +netbsd# sh install.sh These scripts will do most of the work of transferring the system from the @@ -109,7 +165,9 @@ tar files onto your disk. You will frequently be asked for confirmation before the script proceeds with each phase of the installation process. Occasionally, you'll have to provide a piece of information such as the name of the disk you want to install on or IP addresses and domain names -you want to assign. +you want to assign. If your system has more than one disk, you may want +to look at the output of the dmesg(8) command to see how your disks +have been identified by the kernel. The installation script goes through the following phases: diff --git a/distrib/notes/sparc/xfer b/distrib/notes/sparc/xfer index aed6d069e1b..837731ed8b0 100644 --- a/distrib/notes/sparc/xfer +++ b/distrib/notes/sparc/xfer @@ -11,10 +11,10 @@ To prepare for installing via an NFS partition: Since the current NetBSD/sparc installation program uses a diskless setup for your workstation, you will already - have prepared an NFS directory for use as a remote - root filesystem (see the `install' document for details). - The easiest way is to put the NetBSD filesets in this - root filesystem on the server where the install program + have to prepare an NFS directory for use as a remote + root filesystem (see the section `Installing the NetBSD System' + below for details). The easiest way is to put the NetBSD filesets + in this root filesystem on the server where the install program will find them. However, you have the option to put the filesets in diff --git a/distrib/pc532/floppies/inst/install.sh b/distrib/pc532/floppies/inst/install.sh index 9cf4a58f1a3..25a5e7141a9 100644 --- a/distrib/pc532/floppies/inst/install.sh +++ b/distrib/pc532/floppies/inst/install.sh @@ -27,7 +27,7 @@ # (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 1995/10/18 08:37:43 deraadt Exp $ +# $Id: install.sh,v 1.2 1995/11/16 14:20:06 deraadt Exp $ # NetBSD installation script. # In a perfect world, this would be a nice C program, with a reasonable @@ -440,19 +440,19 @@ $DONTDOIT gzip -d /mnt/netbsd.gz echo "" echo -n "Creating an fstab..." echo /dev/${drivename}a / ffs rw 1 1 | sed -e s,//,/, > $FSTAB -if [ "$dname" != "" ]; then +if [ "$dname" != "" -a "$dname" != "NO" ]; then echo /dev/${drivename}d /$dname ffs rw 1 2 | sed -e s,//,/, >> $FSTAB fi -if [ "$ename" != "" ]; then +if [ "$ename" != "" -a "$ename" != "NO" ]; then echo /dev/${drivename}e /$ename ffs rw 1 2 | sed -e s,//,/, >> $FSTAB fi -if [ "$fname" != "" ]; then +if [ "$fname" != "" -a "$fname" != "NO" ]; then echo /dev/${drivename}f /$fname ffs rw 1 3 | sed -e s,//,/, >> $FSTAB fi -if [ "$gname" != "" ]; then +if [ "$gname" != "" -a "$gname" != "NO" ]; then echo /dev/${drivename}g /$gname ffs rw 1 4 | sed -e s,//,/, >> $FSTAB fi -if [ "$hname" != "" ]; then +if [ "$hname" != "" -a "$hname" != "NO" ]; then echo /dev/${drivename}h /$hname ffs rw 1 5 | sed -e s,//,/, >> $FSTAB fi sync diff --git a/distrib/sets/lists/base/mi b/distrib/sets/lists/base/mi index 55c5c8d268b..980334b28cd 100644 --- a/distrib/sets/lists/base/mi +++ b/distrib/sets/lists/base/mi @@ -34,7 +34,6 @@ ./bin/test ./dev ./dev/MAKEDEV -./dev/MAKEDEV.local ./dev/fd ./etc ./etc/disklabels -- cgit v1.2.3