diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2023-04-27 10:03:50 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2023-04-27 10:03:50 +0000 |
commit | 53098260e9101603bd572bb84ec9f58b9758a629 (patch) | |
tree | 786f9a29bbdc4e3cffaaf76acea17076bb53d1cc /distrib/arm64/ramdisk | |
parent | e5882f4333ddc6a920c1c04ceb97e69932d87f8e (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 account for existing EFI Sys partitions, whether it modifies an existing
GPT (Apple APFS ISC) or writing a new one.
With 'Encrypt the root disk?' answered postively, the crypto disk instead of
the root disk becomes the boot disk.
Extend the logic to both crypto and root disk, really asking
"is this a boot disk?".
with caspar
Diffstat (limited to 'distrib/arm64/ramdisk')
-rw-r--r-- | distrib/arm64/ramdisk/install.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/distrib/arm64/ramdisk/install.md b/distrib/arm64/ramdisk/install.md index 4be04259a86..a790c867ac0 100644 --- a/distrib/arm64/ramdisk/install.md +++ b/distrib/arm64/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.45 2023/04/14 15:00:40 robert Exp $ +# $OpenBSD: install.md,v 1.46 2023/04/27 10:03:49 kn Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -109,13 +109,15 @@ md_prep_fdisk() { [wW]*) echo -n "Creating a ${bootfstype} partition and an OpenBSD partition for rest of $_disk..." if disk_has $_disk gpt apfsisc; then - if [[ $_disk == $ROOTDISK ]]; then + # Is this a boot disk? + if [[ $_disk == @($ROOTDISK|$CRYPTOCHUNK) ]]; then fdisk -Ay -b "${bootsectorsize}" ${_disk} >/dev/null else fdisk -Ay ${_disk} >/dev/null fi elif disk_has $_disk gpt; then - if [[ $_disk == $ROOTDISK ]]; then + # Is this a boot disk? + if [[ $_disk == @($ROOTDISK|$CRYPTOCHUNK) ]]; then fdisk -gy -b "${bootsectorsize}" ${_disk} >/dev/null installboot -p $_disk else |