summaryrefslogtreecommitdiff
path: root/distrib/amd64
diff options
context:
space:
mode:
authorPaul Irofti <pirofti@cvs.openbsd.org>2016-09-02 12:22:10 +0000
committerPaul Irofti <pirofti@cvs.openbsd.org>2016-09-02 12:22:10 +0000
commit94cdb9e2c682e368f6af6f5a91007764422f011a (patch)
tree7a09a4f3151b8a55fbd665216d919d6efec12047 /distrib/amd64
parentbffebfec3e3525ac90c2952178c3590097f0f8cd (diff)
Fix misleading 'No valid MBR or GPT' message when no OpenBSD area is found.
The current code is too strict and checks for an OpenBSD area inside an MBR or GPT and if it fails to find one reports that there's no valid MBR or GPT (which is misleading because the MBR/GPT is valid). Instead, do two checks (similar to i386): first see if there's an MBR or GPT present on the disk and if there is then check for the OpenBSD area. OK krw@, halex@.
Diffstat (limited to 'distrib/amd64')
-rw-r--r--distrib/amd64/common/install.md11
1 files changed, 7 insertions, 4 deletions
diff --git a/distrib/amd64/common/install.md b/distrib/amd64/common/install.md
index 2a1174e8952..5a1d626a302 100644
--- a/distrib/amd64/common/install.md
+++ b/distrib/amd64/common/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.51 2016/02/08 17:28:08 krw Exp $
+# $OpenBSD: install.md,v 1.52 2016/09/02 12:22:09 pirofti Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -59,10 +59,13 @@ md_prep_fdisk() {
[[ $MDEFI == y ]] && _d=gpt
- if disk_has $_disk mbr openbsd || disk_has $_disk gpt openbsd; then
- _q="$_q, (O)penBSD area"
- _d=OpenBSD
+ if disk_has $_disk mbr || disk_has $_disk gpt; then
fdisk $_disk
+ if disk_has $_disk mbr openbsd ||
+ disk_has $_disk gpt openbsd; then
+ _q="$_q, (O)penBSD area"
+ _d=OpenBSD
+ fi
else
echo "No valid MBR or GPT."
fi