summaryrefslogtreecommitdiff
path: root/distrib/landisk/ramdisk/install.md
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-04-10 23:11:18 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-04-10 23:11:18 +0000
commit664b5db5ab97bf86e785bf264ffbb25ce4e39488 (patch)
treeb4add2cf99648fb8a6bbcb784ad539ea86cff3b0 /distrib/landisk/ramdisk/install.md
parent02f596d16fd8670c56e195ef0393b82a09b3e9dc (diff)
Where appropriate display the auto-allocation layout of the root
disk and ask if the installee wants to use it, edit it, or create their own custom disklabel. Most one-disk installs will not need to see fdisk or disklabel. i386 and macppc by me, adapted for others by deraadt@. ok deraadt@
Diffstat (limited to 'distrib/landisk/ramdisk/install.md')
-rw-r--r--distrib/landisk/ramdisk/install.md25
1 files changed, 21 insertions, 4 deletions
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() {