From 0b18df416c37ca388f2a3bf07d84ad810f33c857 Mon Sep 17 00:00:00 2001 From: kn Date: Thu, 9 Feb 2023 10:38:41 +0000 Subject: [PATCH] Do not ask to initialize disks with softraid chunks Skip chunk devices in the 'Which disk do you wish to initialize?' question. Touching sd0, e.g. after a root on softraid sd1 install on sd0, will fail. get_dkdevs_uninitialized() is used once, in interactive installs, right after root disk setup, iff multiple disks exist. Tested as part of a bigger diff by a few OK cheloha --- distrib/miniroot/install.sub | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 2fd2adff296..a0858392115 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1226 2023/02/03 15:28:04 kn Exp $ +# $OpenBSD: install.sub,v 1.1227 2023/02/09 10:38:41 kn Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -332,10 +332,12 @@ get_cddevs() { # Return sorted list of disks not in DISKS_DONE which contains disks already # initialized during installation. +# Ignore softraid chunks, they either auto-assembled at boot or were created +# manually in an installer shell. get_dkdevs_uninitialized() { local _disks=$(get_dkdevs) _d - for _d in $DISKS_DONE; do + for _d in $DISKS_DONE $(get_softraid_disks); do _disks=$(rmel "$_d" $_disks) done bsort $_disks -- 2.20.1