summaryrefslogtreecommitdiff
path: root/distrib/socppc/ramdisk
diff options
context:
space:
mode:
Diffstat (limited to 'distrib/socppc/ramdisk')
-rw-r--r--distrib/socppc/ramdisk/install.md25
1 files changed, 21 insertions, 4 deletions
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() {