From a61ea7305e003810ae54bf1066bc073a054c02a7 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 11 Jun 2009 04:28:52 +0000 Subject: Do not show MBRs without the correct signature, instead say they are bogus and provide less options to the user ok krw --- distrib/i386/common/install.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'distrib/i386') diff --git a/distrib/i386/common/install.md b/distrib/i386/common/install.md index 7aaf3a3f63a..1ef30336269 100644 --- a/distrib/i386/common/install.md +++ b/distrib/i386/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.45 2009/06/04 00:44:46 krw Exp $ +# $OpenBSD: install.md,v 1.46 2009/06/11 04:28:50 deraadt Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -56,15 +56,17 @@ md_prep_fdisk() { local _disk=$1 _q _d while :; do - fdisk $_disk - if [[ -n $(fdisk $_disk | grep ' A6 ') ]]; then - _q=" use the (O)penBSD area," - _d=OpenBSD + _d=whole + if [[ -n $(fdisk $_disk | grep 'Signature: 0xAA55') ]]; then + fdisk $_disk + if [[ -n $(fdisk $_disk | grep '^..: A6 ') ]]; then + _q=", use the (O)penBSD area," + _d=OpenBSD + fi else - _q= - _d=whole + echo "MBR has invalid signature; not showing it." fi - ask "Use (W)hole disk,$_q or (E)dit the MBR?" "$_d" + 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..." -- cgit v1.2.3