From: kn Date: Sun, 19 Feb 2023 23:46:22 +0000 (+0000) Subject: Improve media disk question default X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a764052d3bba9866cb0b79d83a539dc876d2c7be;p=openbsd Improve media disk question default Sets on an unmounted disk partition are most likely to be on install media, e.g. CD or USB stick. Default 'Which disk contains the install media?' to the first disk that is a) not the root disk and b) not a disk with softraid chunks (hosting the root disk, for example). This makes it point at the right disk in most setups. All disks remain valid answers, this is only about the default. OK afresh1 --- diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 7d445b75e79..5a48299c249 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1228 2023/02/16 18:10:28 kn Exp $ +# $OpenBSD: install.sub,v 1.1229 2023/02/19 23:46:22 kn Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -2034,7 +2034,7 @@ install_disk() { if ! ask_yn "Is the disk partition already mounted?" yes; then ask_which "disk" "contains the $MODE media" \ '$(bsort $(get_dkdevs))' \ - '$(bsort $(rmel $ROOTDISK $(get_dkdevs)))' + '$(get_dkdevs_uninitialized)' [[ $resp == done ]] && return 1 # Ensure the device file exists and mount the fs on /mnt2.