Chosing [W]hole on a GPT disk means it needs non-default `-b' fdisk(8)
to boot and preserve any existing BIOS boot partition.
With 'Encrypt the root disk?' answered postively, the crypto disk instead of
the root disk becomes the boot disk.
Extend the sanity check to both crypto and root disk, really asking
"is this a boot disk?".
This preserves existing boot partitions when using guided disk encryption.
-# $OpenBSD: install.md,v 1.8 2023/03/07 17:29:42 kn Exp $
+# $OpenBSD: install.md,v 1.9 2023/04/26 23:12:31 kn Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
while :; do
_d=whole
if disk_has $_disk gpt; then
- [[ $_disk == $ROOTDISK ]] && bootpart="-b ${bootsectorsize}"
+ # Is this a boot disk?
+ [[ $_disk == @($ROOTDISK|$CRYPTOCHUNK) ]] && bootpart="-b ${bootsectorsize}"
_type=GPT
fdisk $_disk
elif disk_has $_disk mbr; then