diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-11 04:28:52 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-11 04:28:52 +0000 |
commit | a61ea7305e003810ae54bf1066bc073a054c02a7 (patch) | |
tree | b93dcf1c1df7f79e12d990e92207304157035d13 /distrib/amd64/common | |
parent | 7a1f7ce0c39fcad6bf32847efcc53c5c36c8c99b (diff) |
Do not show MBRs without the correct signature, instead say they are
bogus and provide less options to the user
ok krw
Diffstat (limited to 'distrib/amd64/common')
-rw-r--r-- | distrib/amd64/common/install.md | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/distrib/amd64/common/install.md b/distrib/amd64/common/install.md index 7b00769c99f..1966ef404cb 100644 --- a/distrib/amd64/common/install.md +++ b/distrib/amd64/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.22 2009/06/04 00:44:46 krw Exp $ +# $OpenBSD: install.md,v 1.23 2009/06/11 04:28:49 deraadt Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -54,15 +54,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..." |