From c97559daa71b764cf8b480885cb09f546b3b8128 Mon Sep 17 00:00:00 2001 From: kettenis Date: Mon, 7 Jun 2021 07:38:55 +0000 Subject: [PATCH] Changing the default from (W)hole disk to (E)dit MBR wasn't enough to prevent folks from shooting themselves in the foot. Make sure (W) can't be used if an "APFS ISC" is found on the disk. This is the most essential partition that is required for Apple M1 machines to boot. ok krw@, deraadt@ --- distrib/arm64/ramdisk/install.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/distrib/arm64/ramdisk/install.md b/distrib/arm64/ramdisk/install.md index f444ea7c90b..8fb671b4bb1 100644 --- a/distrib/arm64/ramdisk/install.md +++ b/distrib/arm64/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.18 2021/06/06 18:58:14 kettenis Exp $ +# $OpenBSD: install.md,v 1.19 2021/06/07 07:38:55 kettenis Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -103,6 +103,10 @@ md_prep_fdisk() { ask "Use (W)hole disk or (E)dit the MBR?" "$_d" case $resp in [wW]*) + if disk_has $_disk gpt apfsisc; then + echo "(W)hole disk can not be used on Apple NVMe storage!" + continue + fi echo -n "Creating a ${bootfstype} partition and an OpenBSD partition for rest of $_disk..." fdisk -e ${_disk} <<__EOT >/dev/null reinit -- 2.20.1