diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-08-27 02:18:35 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-08-27 02:18:35 +0000 |
commit | d71d3c5bf15deab4d17e12ff71c512971209f5e7 (patch) | |
tree | 4684b898cc2501f4957f411e639e199c16f0f9bf /distrib | |
parent | 328ad47a817dfc7cd096e0ee96077f0ab3d6762c (diff) |
Move general partitioning advice from machine dependant per disk
routine to install.sh so it is displayed only once.
Strongly advise /, /tmp, /var, /usr and /home have their own
disk partitions as requested by deraadt@.
Rather than rely on users not re-selecting an already initialized
disk, just allow them to choose from un-initialized disks.
Move get_root invocation into install.sub as both install.sh and
upgrade.sh did it first thing.
Remove the 'workaround' to a 'vnode aliasing bug' that came in
with the initial import of upgrade.sh from NetBSD. ok millert@.
Rework verbiage in a few places. Clean up logic around looping
through disk units by handling root disk better.
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/alpha/common/install.md | 10 | ||||
-rw-r--r-- | distrib/hp300/ramdisk/install.md | 10 | ||||
-rw-r--r-- | distrib/i386/common/install.md | 6 | ||||
-rw-r--r-- | distrib/mac68k/ramdisk/install.md | 9 | ||||
-rw-r--r-- | distrib/miniroot/install.sh | 50 | ||||
-rw-r--r-- | distrib/miniroot/upgrade.sh | 8 | ||||
-rw-r--r-- | distrib/sparc/install.md | 9 | ||||
-rw-r--r-- | distrib/sparc64/common/install.md | 9 | ||||
-rw-r--r-- | distrib/sun3/install.md | 9 | ||||
-rw-r--r-- | distrib/vax/install.md | 9 |
10 files changed, 40 insertions, 89 deletions
diff --git a/distrib/alpha/common/install.md b/distrib/alpha/common/install.md index ff7f6b721d8..878fd1e8fb6 100644 --- a/distrib/alpha/common/install.md +++ b/distrib/alpha/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.13 2002/08/25 19:33:45 krw Exp $ +# $OpenBSD: install.md,v 1.14 2002/08/27 02:18:34 krw Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. @@ -99,14 +99,6 @@ md_prep_disklabel() ;; esac - # display example - cat << __EOT - -If you are unsure of how to use multiple partitions properly -(ie. separating /, /usr, /tmp, /var, /usr/local, and other things) -just split the space into a root and swap partition for now. -__EOT - disklabel -W ${_disk} disklabel -f /tmp/fstab.${_disk} -E ${_disk} } diff --git a/distrib/hp300/ramdisk/install.md b/distrib/hp300/ramdisk/install.md index 1aa3232fd67..d9817523198 100644 --- a/distrib/hp300/ramdisk/install.md +++ b/distrib/hp300/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.33 2002/05/22 01:48:38 krw Exp $ +# $OpenBSD: install.md,v 1.34 2002/08/27 02:18:34 krw Exp $ # $NetBSD: install.md,v 1.1.2.4 1996/08/26 15:45:14 gwr Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -91,14 +91,6 @@ md_prep_disklabel() ;; esac - # display example - cat << __EOT - -If you are unsure of how to use multiple partitions properly -(ie. separating /, /usr, /tmp, /var, /usr/local, and other things) -just split the space into a root and swap partition for now. -__EOT - disklabel -W ${_disk} disklabel -f /tmp/fstab.${_disk} -E ${_disk} } diff --git a/distrib/i386/common/install.md b/distrib/i386/common/install.md index 504aaf1b002..a85bfcdcd00 100644 --- a/distrib/i386/common/install.md +++ b/distrib/i386/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.8 2002/05/20 16:53:57 krw Exp $ +# $OpenBSD: install.md,v 1.9 2002/08/27 02:18:34 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -198,9 +198,7 @@ If this disk is shared with other operating systems, those operating systems should have a BIOS partition entry that spans the space they occupy completely. For safety, also make sure all OpenBSD file systems are within the offset and size specified in the 'A6' BIOS partition table. (By default, the disklabel -editor will try to enforce this). If you are unsure of how to use multiple -partitions properly (ie. separating /, /usr, /tmp, /var, /usr/local, and other -things) just split the space into a root and swap partition for now. +editor will try to enforce this). __EOT disklabel -f /tmp/fstab.${_disk} -E ${_disk} diff --git a/distrib/mac68k/ramdisk/install.md b/distrib/mac68k/ramdisk/install.md index e4573669fda..38590e54db6 100644 --- a/distrib/mac68k/ramdisk/install.md +++ b/distrib/mac68k/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.15 2002/06/09 05:53:53 todd Exp $ +# $OpenBSD: install.md,v 1.16 2002/08/27 02:18:34 krw Exp $ # # Copyright (c) 2002, Miodrag Vallat. # All rights reserved. @@ -114,13 +114,6 @@ md_prep_disklabel() { ;; esac - # display example - cat << __EOT -If you are unsure of how to use multiple partitions properly -(ie. separating /, /usr, /tmp, /var, /usr/local, and other things) -just split the space into a root and swap partition for now. - -__EOT disklabel ${_wflag} ${_disk} disklabel -f /tmp/fstab.${_disk} -E ${_disk} } diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index acea93e652c..c7e56c62146 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sh,v 1.112 2002/08/25 02:13:09 krw Exp $ +# $OpenBSD: install.sh,v 1.113 2002/08/27 02:18:34 krw Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback @@ -83,31 +83,41 @@ MODE=install # include common subroutines and initialization code . install.sub -# If /etc/fstab already exists we skip disk initialization, but we still -# need to know the root disk. -if [ -f /etc/fstab ]; then - get_rootdisk -else +# If /etc/fstab already exists we skip disk initialization +if [ ! -f /etc/fstab ]; then # Install the shadowed disktab file; lets us write to it for temporary # purposes without mounting the miniroot read-write. [ -f /etc/disktab.shadow ] && cp /etc/disktab.shadow /tmp/disktab.shadow - while : ; do - if [ -z "$ROOTDISK" ]; then - # Get ROOTDISK and default ROOTDEV - get_rootdisk - DISK=$ROOTDISK - echo "${ROOTDEV} /" > $FILESYSTEMS - else - cat << __EOT + cat << __EOT + + +You must now initialize the disks you want to use for OpenBSD. During this +initialization process it is strongly recommended that you create disk +parititions for the following filesystems: + + /, /tmp, /var, /usr, /home -Now you can select another disk to initialize. (Do not re-select a disk -you have already entered information for). +Some of the security features of OpenBSD rely on these filesystems being +mounted on separate partitions. __EOT - ask_fordev "Which disk do you wish to initialize?" "$DKDEVS" - [ "$resp" = "done" ] && break - DISK=$resp - fi + + # Prevent the user from choosing anything but the default as the + # root device. Any attempt to mount '/' anywhere else will + # trigger a duplicate mount error. + echo "${ROOTDEV} /" > $FILESYSTEMS + + DISK= + _DKDEVS=$DKDEVS + + while : ; do + _DKDEVS=`rmel "$DISK" $_DKDEVS` + [ "$_DKDEVS" ] || break + + ask_fordev "Which disk do you wish to initialize?" "$_DKDEVS" + [ "$resp" = "done" ] && break + + DISK=$resp # Deal with disklabels, including editing the root disklabel # and labeling additional disks. This is machine-dependent since diff --git a/distrib/miniroot/upgrade.sh b/distrib/miniroot/upgrade.sh index 2736acde3c2..f7966745aef 100644 --- a/distrib/miniroot/upgrade.sh +++ b/distrib/miniroot/upgrade.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: upgrade.sh,v 1.40 2002/07/27 04:05:09 krw Exp $ +# $OpenBSD: upgrade.sh,v 1.41 2002/08/27 02:18:34 krw Exp $ # $NetBSD: upgrade.sh,v 1.2.4.5 1996/08/27 18:15:08 gwr Exp $ # # Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback @@ -56,12 +56,6 @@ MODE=upgrade # work! THESETS=`echo $THESETS | sed -e 's/ etc / /'` -# XXX Work around vnode aliasing bug (thanks for the tip, Chris...) -ls -l /dev > /dev/null 2>&1 - -# Get ROOTDISK and default ROOTDEV -get_rootdisk - # Assume $ROOTDEV is the root filesystem. Confirm # this with the user. Check and mount the root filesystem. resp= diff --git a/distrib/sparc/install.md b/distrib/sparc/install.md index fbf6d4ebb55..fceeff67659 100644 --- a/distrib/sparc/install.md +++ b/distrib/sparc/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.44 2002/05/22 01:48:38 krw Exp $ +# $OpenBSD: install.md,v 1.45 2002/08/27 02:18:34 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -106,13 +106,6 @@ md_prep_disklabel() ;; esac - # display example - cat << __EOT -If you are unsure of how to use multiple partitions properly -(ie. separating /, /usr, /tmp, /var, /usr/local, and other things) -just split the space into a root and swap partition for now. - -__EOT disklabel -W ${_disk} disklabel -f /tmp/fstab.${_disk} -E ${_disk} } diff --git a/distrib/sparc64/common/install.md b/distrib/sparc64/common/install.md index 8cd823baf46..d35f7a7009f 100644 --- a/distrib/sparc64/common/install.md +++ b/distrib/sparc64/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.12 2002/05/20 16:53:57 krw Exp $ +# $OpenBSD: install.md,v 1.13 2002/08/27 02:18:34 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -116,13 +116,6 @@ md_prep_disklabel() ;; esac - # display example - cat << __EOT -If you are unsure of how to use multiple partitions properly -(ie. separating /, /usr, /tmp, /var, /usr/local, and other things) -just split the space into a root and swap partition for now. - -__EOT disklabel -W ${_disk} disklabel -f /tmp/fstab.${_disk} -E ${_disk} } diff --git a/distrib/sun3/install.md b/distrib/sun3/install.md index ef8ca9bb2c2..0ed91e332a9 100644 --- a/distrib/sun3/install.md +++ b/distrib/sun3/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.12 2002/05/22 01:48:38 krw Exp $ +# $OpenBSD: install.md,v 1.13 2002/08/27 02:18:34 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -105,13 +105,6 @@ md_prep_disklabel() ;; esac - # display example - cat << __EOT -If you are unsure of how to use multiple partitions properly -(ie. separating /, /usr, /tmp, /var, /usr/local, and other things) -just split the space into a root and swap partition for now. - -__EOT disklabel -W ${_disk} disklabel -f /tmp/fstab.${_disk} -E ${_disk} } diff --git a/distrib/vax/install.md b/distrib/vax/install.md index e9de9093432..6fdaabbef1e 100644 --- a/distrib/vax/install.md +++ b/distrib/vax/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.17 2002/05/22 01:48:38 krw Exp $ +# $OpenBSD: install.md,v 1.18 2002/08/27 02:18:34 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -88,13 +88,6 @@ md_prep_disklabel() ;; esac - # display example - cat << __EOT -If you are unsure of how to use multiple partitions properly -(ie. separating /, /usr, /tmp, /var, /usr/local, and other things) -just split the space into a root and swap partition for now. - -__EOT disklabel -W ${_disk} disklabel -f /tmp/fstab.${_disk} -E ${_disk} } |