On Sat, Apr 01, 2023 at 04:33:39PM +0300, Mikhail wrote: > Currently default answer for the question is 'yes', which is not true > for install case, but correct for upgrade one. > > Changing default answer depending on the mode of the installer looks > like a good approach. Idea by Christian (naddy@), implementation and > testing are mine.
In conversation with Klemens (kn@) new iteration has been born, it follows to what Omar (op@) has suggested - we're not trying to change the default answer for all cases, since no one complained for all these years, but just flip default for installation mode, which should save some keystrokes and back-and-forth movement for novice users. Next attempt (with input from kn@): diff /usr/src commit - 3f266bdacd577948d2ae789cfe31cc2939a83cf9 path + /usr/src blob - 5919eeece326bed27a65b43e96be50e7c72471e1 file + distrib/miniroot/install.sub --- distrib/miniroot/install.sub +++ distrib/miniroot/install.sub @@ -2043,7 +2043,12 @@ install_disk() { # Install sets from disk. # Ask for the disk device containing the set files. install_disk() { - if ! ask_yn "Is the disk partition already mounted?" yes; then + local _ismounted=yes + + # No partitions are mounted prior to regular installation. + [[ $MODE == install ]] && _ismounted=no + + if ! ask_yn "Is the disk partition already mounted?" $_ismounted; then ask_which "disk" "contains the $MODE media" \ '$(bsort $(get_dkdevs))' \ '$(get_dkdevs_uninitialized)'