summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--distrib/alpha/common/install.md22
-rw-r--r--distrib/amd64/common/install.md25
-rw-r--r--distrib/armish/ramdisk/install.md25
-rw-r--r--distrib/hp300/ramdisk/install.md22
-rw-r--r--distrib/hppa/install.md22
-rw-r--r--distrib/i386/common/install.md25
-rw-r--r--distrib/landisk/ramdisk/install.md25
-rw-r--r--distrib/luna88k/ramdisk/install.md22
-rw-r--r--distrib/mac68k/ramdisk/install.md33
-rw-r--r--distrib/macppc/ramdisk/install.md35
-rw-r--r--distrib/mvme68k/ramdisk/install.md22
-rw-r--r--distrib/mvme88k/ramdisk/install.md22
-rw-r--r--distrib/sgi/ramdisk/install.md24
-rw-r--r--distrib/socppc/ramdisk/install.md25
-rw-r--r--distrib/sparc/install.md22
-rw-r--r--distrib/sparc64/common/install.md22
-rw-r--r--distrib/vax/install.md22
-rw-r--r--distrib/zaurus/ramdisk/install.md25
18 files changed, 368 insertions, 72 deletions
diff --git a/distrib/alpha/common/install.md b/distrib/alpha/common/install.md
index 432090715d9..a730d0aea0c 100644
--- a/distrib/alpha/common/install.md
+++ b/distrib/alpha/common/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.24 2008/06/26 05:42:03 ray Exp $
+# $OpenBSD: install.md,v 1.25 2009/04/10 23:11:17 krw Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -50,10 +50,26 @@ md_installboot() {
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/amd64/common/install.md b/distrib/amd64/common/install.md
index 3c6b573a4da..bdab1b27299 100644
--- a/distrib/amd64/common/install.md
+++ b/distrib/amd64/common/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.10 2008/06/26 05:42:03 ray Exp $
+# $OpenBSD: install.md,v 1.11 2009/04/10 23:11:17 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -79,10 +79,28 @@ __EOT
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
md_prep_fdisk $_disk
+ disklabel -W $_disk >/dev/null 2>&1
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | grep "^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+
cat <<__EOT
You will now create an OpenBSD disklabel inside the OpenBSD MBR
@@ -94,8 +112,7 @@ start of the disk, NOT the start of the OpenBSD MBR partition.
__EOT
- disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/armish/ramdisk/install.md b/distrib/armish/ramdisk/install.md
index 622ae8ffda4..67e89164673 100644
--- a/distrib/armish/ramdisk/install.md
+++ b/distrib/armish/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.5 2008/06/26 05:42:03 ray Exp $
+# $OpenBSD: install.md,v 1.6 2009/04/10 23:11:17 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -74,10 +74,28 @@ __EOT
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
md_prep_fdisk $_disk
+ disklabel -W $_disk >/dev/null 2>&1
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | grep "^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+
cat <<__EOT
You will now create an OpenBSD disklabel inside the OpenBSD MBR
@@ -89,8 +107,7 @@ start of the disk, NOT the start of the OpenBSD MBR partition.
__EOT
- disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/hp300/ramdisk/install.md b/distrib/hp300/ramdisk/install.md
index 8be434e8116..4da0ace7e15 100644
--- a/distrib/hp300/ramdisk/install.md
+++ b/distrib/hp300/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.46 2008/06/26 05:42:03 ray Exp $
+# $OpenBSD: install.md,v 1.47 2009/04/10 23:11:17 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.
@@ -44,10 +44,26 @@ md_installboot() {
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/hppa/install.md b/distrib/hppa/install.md
index c24e0a0a033..153d7ad30cf 100644
--- a/distrib/hppa/install.md
+++ b/distrib/hppa/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.8 2008/03/22 23:28:10 krw Exp $
+# $OpenBSD: install.md,v 1.9 2009/04/10 23:11:17 krw Exp $
#
# machine dependent section of installation/upgrade script.
#
@@ -13,10 +13,26 @@ md_installboot() {
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/i386/common/install.md b/distrib/i386/common/install.md
index 7202c2241ff..3e0cb24bfa4 100644
--- a/distrib/i386/common/install.md
+++ b/distrib/i386/common/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.33 2008/06/26 05:42:03 ray Exp $
+# $OpenBSD: install.md,v 1.34 2009/04/10 23:11:17 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -81,10 +81,28 @@ __EOT
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
md_prep_fdisk $_disk
+ disklabel -W $_disk >/dev/null 2>&1
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | grep "^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+
cat <<__EOT
You will now create an OpenBSD disklabel inside the OpenBSD MBR
@@ -96,8 +114,7 @@ start of the disk, NOT the start of the OpenBSD MBR partition.
__EOT
- disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/landisk/ramdisk/install.md b/distrib/landisk/ramdisk/install.md
index 08f86b44e17..4028a7c455c 100644
--- a/distrib/landisk/ramdisk/install.md
+++ b/distrib/landisk/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.15 2008/06/26 05:42:03 ray Exp $
+# $OpenBSD: install.md,v 1.16 2009/04/10 23:11:17 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -87,10 +87,28 @@ __EOT
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
md_prep_fdisk $_disk
+ disklabel -W $_disk >/dev/null 2>&1
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | grep "^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+
cat <<__EOT
You will now create an OpenBSD disklabel inside the OpenBSD MBR
@@ -102,8 +120,7 @@ start of the disk, NOT the start of the OpenBSD MBR partition.
__EOT
- disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/luna88k/ramdisk/install.md b/distrib/luna88k/ramdisk/install.md
index 0ee3e6be96c..9ae15724c0e 100644
--- a/distrib/luna88k/ramdisk/install.md
+++ b/distrib/luna88k/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.6 2008/06/26 05:42:03 ray Exp $
+# $OpenBSD: install.md,v 1.7 2009/04/10 23:11:17 krw Exp $
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
#
@@ -39,10 +39,26 @@ md_installboot() {
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/mac68k/ramdisk/install.md b/distrib/mac68k/ramdisk/install.md
index d756fe6011f..232cdd95442 100644
--- a/distrib/mac68k/ramdisk/install.md
+++ b/distrib/mac68k/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.29 2008/06/26 05:42:03 ray Exp $
+# $OpenBSD: install.md,v 1.30 2009/04/10 23:11:17 krw Exp $
#
# Copyright (c) 2002, Miodrag Vallat.
# All rights reserved.
@@ -63,22 +63,41 @@ md_installboot() {
}
md_prep_disklabel() {
- local _disk=$1
-
+ local _disk=$1 _f _op
+
+ disklabel -W $_disk >/dev/null 2>&1
if [[ -n $(disklabel -c $_disk 2>/dev/null | grep ' HFS ') ]]; then
cat <<__EOT
This disk has been setup under MacOS. You will now edit a MacOS partition
table. Be careful not to remove the MacOS partitions in use.
__EOT
pdisk /dev/${_disk}c
- else
- cat <<__EOT
+ return
+ fi
+
+ cat <<__EOT
This disk is not shared with MacOS. You will now edit a regular OpenBSD
disklabel.
__EOT
- disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
fi
+
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/macppc/ramdisk/install.md b/distrib/macppc/ramdisk/install.md
index 1c55eff41a5..d93f7b3a8eb 100644
--- a/distrib/macppc/ramdisk/install.md
+++ b/distrib/macppc/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.35 2009/01/15 17:53:57 todd Exp $
+# $OpenBSD: install.md,v 1.36 2009/04/10 23:11:17 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -138,13 +138,17 @@ __EOT
}
md_prep_disklabel() {
- local _disk=$1 _q
+ local _disk=$1 _f _op
md_prep_disk $_disk
case $disklabeltype in
- HFS) ;;
- MBR) cat <<__EOT
+ HFS) return ;;
+ MBR) ;;
+ *) echo "$_disk has no HFS or MBR partition table." ; exit ;;
+ esac
+
+ cat <<__EOT
You *MUST* setup the OpenBSD disklabel to include the MSDOS-formatted boot
partition as the 'i' partition. If the 'i' partition is missing or not the
@@ -152,14 +156,25 @@ MSDOS-formatted boot partition, then the 'ofwboot' file required to boot
OpenBSD cannot be installed.
__EOT
- ;;
- *) echo "Disk label type ('$disklabeltype') is not 'HFS' or 'MBR'."
- exit
- ;;
- esac
disklabel -W $_disk >/dev/null 2>&1
- disklabel -c -f /tmp/fstab.$_disk -E $_disk
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/mvme68k/ramdisk/install.md b/distrib/mvme68k/ramdisk/install.md
index f772bdd163e..4a4307c576d 100644
--- a/distrib/mvme68k/ramdisk/install.md
+++ b/distrib/mvme68k/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.31 2008/06/26 05:42:04 ray Exp $
+# $OpenBSD: install.md,v 1.32 2009/04/10 23:11:17 krw Exp $
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
#
@@ -41,10 +41,26 @@ md_installboot() {
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/mvme88k/ramdisk/install.md b/distrib/mvme88k/ramdisk/install.md
index 48f90ad9603..3b40185459a 100644
--- a/distrib/mvme88k/ramdisk/install.md
+++ b/distrib/mvme88k/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.27 2008/06/26 05:42:04 ray Exp $
+# $OpenBSD: install.md,v 1.28 2009/04/10 23:11:17 krw Exp $
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
#
@@ -41,10 +41,26 @@ md_installboot() {
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/sgi/ramdisk/install.md b/distrib/sgi/ramdisk/install.md
index f6d73213392..32199d638f4 100644
--- a/distrib/sgi/ramdisk/install.md
+++ b/distrib/sgi/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.12 2009/03/01 06:27:28 jsing Exp $
+# $OpenBSD: install.md,v 1.13 2009/04/10 23:11:17 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,9 +39,8 @@ md_installboot() {
md_prep_disklabel()
{
- local _disk
+ local _disk=$1 _f _op
- _disk=$1
echo
echo "Checking SGI Volume Header:"
/usr/mdec/sgivol -q $_disk >/dev/null 2>/dev/null
@@ -122,6 +121,24 @@ __EOT
;;
esac
+ disklabel -W $_disk >/dev/null 2>&1
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | grep "^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+
cat <<__EOT
You will now create an OpenBSD disklabel. The disklabel must have an
@@ -139,7 +156,6 @@ boot loader will not be able to locate and load the kernel.
Do not change any parameters except the partition layout and the label name.
__EOT
- disklabel -W $_disk
disklabel -c -f /tmp/fstab.$_disk -E $_disk
}
diff --git a/distrib/socppc/ramdisk/install.md b/distrib/socppc/ramdisk/install.md
index 419bf9ea57b..4a84ce1aa87 100644
--- a/distrib/socppc/ramdisk/install.md
+++ b/distrib/socppc/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.3 2008/06/26 05:42:04 ray Exp $
+# $OpenBSD: install.md,v 1.4 2009/04/10 23:11:17 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -74,10 +74,28 @@ __EOT
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
md_prep_fdisk $_disk
+ disklabel -W $_disk >/dev/null 2>&1
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+
cat <<__EOT
You will now create an OpenBSD disklabel inside the OpenBSD MBR
@@ -89,8 +107,7 @@ start of the disk, NOT the start of the OpenBSD MBR partition.
__EOT
- disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/sparc/install.md b/distrib/sparc/install.md
index 91a0ca1f018..2ea252c8b93 100644
--- a/distrib/sparc/install.md
+++ b/distrib/sparc/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.55 2008/06/26 05:42:04 ray Exp $
+# $OpenBSD: install.md,v 1.56 2009/04/10 23:11:17 krw Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
@@ -57,10 +57,26 @@ md_installboot() {
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/sparc64/common/install.md b/distrib/sparc64/common/install.md
index cc977d321a3..7bc23d2f026 100644
--- a/distrib/sparc64/common/install.md
+++ b/distrib/sparc64/common/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.22 2008/06/26 05:42:04 ray Exp $
+# $OpenBSD: install.md,v 1.23 2009/04/10 23:11:17 krw Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
@@ -67,10 +67,26 @@ md_installboot() {
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/vax/install.md b/distrib/vax/install.md
index aacf0b3021e..3a7ea30f293 100644
--- a/distrib/vax/install.md
+++ b/distrib/vax/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.28 2008/06/26 05:42:04 ray Exp $
+# $OpenBSD: install.md,v 1.29 2009/04/10 23:11:17 krw Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
@@ -46,10 +46,26 @@ md_installboot() {
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | egrep "^#|^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+ disklabel -f $_f -E $_disk
}
md_congrats() {
diff --git a/distrib/zaurus/ramdisk/install.md b/distrib/zaurus/ramdisk/install.md
index 79875832800..c86a2942479 100644
--- a/distrib/zaurus/ramdisk/install.md
+++ b/distrib/zaurus/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.16 2008/06/26 05:42:04 ray Exp $
+# $OpenBSD: install.md,v 1.17 2009/04/10 23:11:17 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -74,10 +74,28 @@ __EOT
}
md_prep_disklabel() {
- local _disk=$1
+ local _disk=$1 _f _op
md_prep_fdisk $_disk
+ disklabel -W $_disk >/dev/null 2>&1
+ _f=/tmp/fstab.$_disk
+ if [[ $_disk == $ROOTDISK ]]; then
+ while :; do
+ echo "The auto-allocated layout for $_disk is:"
+ disklabel -f $_f -p g -A $_disk | grep "^ [a-p]:"
+ ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a
+ case $resp in
+ a*|A*) _op=-w ; AUTOROOT=y ;;
+ e*|E*) _op=-E ;;
+ c*|C*) break ;;
+ *) continue ;;
+ esac
+ disklabel -f $_f $_op -A $_disk
+ return
+ done
+ fi
+
cat <<__EOT
You will now create an OpenBSD disklabel inside the OpenBSD MBR
@@ -89,8 +107,7 @@ start of the disk, NOT the start of the OpenBSD MBR partition.
__EOT
- disklabel -W $_disk >/dev/null 2>&1
- disklabel -f /tmp/fstab.$_disk -E $_disk
+ disklabel -f $_f -E $_disk
}
md_congrats() {