diff options
Diffstat (limited to 'distrib/socppc/ramdisk/install.md')
-rw-r--r-- | distrib/socppc/ramdisk/install.md | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/distrib/socppc/ramdisk/install.md b/distrib/socppc/ramdisk/install.md index e2337b8fec6..70adf158098 100644 --- a/distrib/socppc/ramdisk/install.md +++ b/distrib/socppc/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.6 2009/04/12 12:56:02 krw Exp $ +# $OpenBSD: install.md,v 1.7 2009/04/30 00:03:08 deraadt Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -38,39 +38,46 @@ md_installboot() { } md_prep_fdisk() { - local _disk=$1 - - ask_yn "Do you want to use *all* of $_disk for OpenBSD?" - if [[ $resp == y ]]; then - echo -n "Putting all of $_disk into an active OpenBSD MBR partition (type 'A6')..." - fdisk -e ${_disk} <<__EOT >/dev/null + local _disk=$1 _q _d + + while :; do + fdisk $_disk + if [[ -n $(fdisk $_disk | grep ' A6 ') ]]; then + _q=" use the (O)penBSD area," + _d=OpenBSD + else + _q= + _d=whole + fi + ask "Use (W)hole disk,$_q or (E)dit the MBR?" "$_d" + case $resp in + w*|W*) + echo -n "Setting OpenBSD MBR partition to whole $_disk..." + fdisk -e ${_disk} <<__EOT >/dev/null reinit update write quit __EOT - echo "done." - return - fi - - # Manually configure the MBR. - cat <<__EOT + echo "done." + return ;; + e*|E*) + # Manually configure the MBR. + cat <<__EOT You will now create a single MBR partition to contain your OpenBSD data. This partition must have an id of 'A6'; must *NOT* overlap other partitions; and -must be marked as the only active partition. - -The 'manual' command describes all the fdisk commands in detail. - -$(fdisk ${_disk}) -__EOT - fdisk -e ${_disk} - - cat <<__EOT -Here is the partition information you chose: +must be marked as the only active partition. Inside the fdisk command, the +'manual' command describes all the fdisk commands in detail. $(fdisk ${_disk}) __EOT + fdisk -e ${_disk} + [[ -n $(fdisk $_disk | grep ' A6 ') ]] && return + echo No OpenBSD partition in MBR, try again. ;; + o*|O*) return ;; + esac + done } md_prep_disklabel() { |