summaryrefslogtreecommitdiff
path: root/distrib/riscv64
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2023-04-26 23:12:32 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2023-04-26 23:12:32 +0000
commitf35ebbc778ef53ee378b2a1d813afd5f9b9e84e4 (patch)
tree9e697d01f457c07a2266ddb5debe0ec4d12dbee6 /distrib/riscv64
parent16127395811adb1438680e2db505e81350ccf7c2 (diff)
Treat crypto disk like the root disk, both are boot disks
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.
Diffstat (limited to 'distrib/riscv64')
-rw-r--r--distrib/riscv64/ramdisk/install.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/distrib/riscv64/ramdisk/install.md b/distrib/riscv64/ramdisk/install.md
index fbd8516a253..cd7266cc5ae 100644
--- a/distrib/riscv64/ramdisk/install.md
+++ b/distrib/riscv64/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $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.
@@ -55,7 +55,8 @@ md_prep_fdisk() {
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