From 95bf5225b52882c13331df80ede32b391a937d8e Mon Sep 17 00:00:00 2001 From: kn Date: Wed, 14 Sep 2022 08:52:47 +0000 Subject: [PATCH] Format softraid keydisk to make regress pass without installboot fix Treat keydisks like real chunks until installboot properly skips it and does not touch/install to them anymore. --- regress/usr.sbin/installboot/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/regress/usr.sbin/installboot/Makefile b/regress/usr.sbin/installboot/Makefile index 83c477a7784..4af6080b76e 100644 --- a/regress/usr.sbin/installboot/Makefile +++ b/regress/usr.sbin/installboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.27 2022/09/12 13:10:04 kn Exp $ +# $OpenBSD: Makefile,v 1.28 2022/09/14 08:52:47 kn Exp $ INSTALLBOOT ?= /usr/sbin/installboot DRY_RUN = ${INSTALLBOOT} -n @@ -83,6 +83,14 @@ format-disks: create-disks . endif .endfor .if ${USE_SOFTRAID:L} == "yes" + # XXX installboot(8) does not skip keydisks yet, so ensure the expected + # MBR/GPT to avoid failing with + # "installboot: invalid boot record signature (0x0000) @ sector 0" + # + # bioctl(8) and softraid(4) don't care about partition tables, they + # just require a disklabel(5); remove the next command or merge this + # block into above DISKDEVFILES loop once installboot skips keydisks. + ${SUDO} ${FORMAT_DISK} -- "$$(<${KEYDEVFILE})" 1>/dev/null echo 'RAID 1M' | \ ${SUDO} disklabel -wAT/dev/stdin -- "$$(<${KEYDEVFILE})" 1>/dev/null .endif -- 2.20.1