If there is a CD during install, it is picked as default set location:

        Let's install the sets!
        Location of sets? (cd0 disk http nfs or 'done') [cd0] 

(Only netboot or existing installurl(5) on the root disk take priority and
defaul it to "http".)

For install72.iso the "cd0" default makes sense as it contains sets,
but cd72.iso is like miniroot72.img, so you need another location.

Skip "cd0" if it is cd72.iso such that the next default kicks in: "http".

Match for the exact CD label and skip "boot-only" aka. cd72.iso.
This seems better than limiting the default to "Install" aka. install72.iso
as it will keep picking "cd0" for custom user CDs.


Feedback? Objection? OK?

Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1230
diff -u -p -r1.1230 install.sub
--- install.sub 21 Feb 2023 12:56:50 -0000      1.1230
+++ install.sub 21 Feb 2023 17:09:40 -0000
@@ -2771,7 +2771,11 @@ install_sets() {
        [[ -s /mnt/etc/installurl ]] && _d=http
 
        # Set default location to the first cdrom device if any are found.
-       [[ -n $_cddevs ]] && : ${_d:=cd0}
+       # Skip official cd*.iso without sets.
+       if [[ -n $_cddevs ]] &&
+           disklabel cd0 | ! grep -qxF "label: $VNAME boot-only CD"; then
+               : ${_d:=cd0}
+       fi
 
        # Add NFS to set locations if the boot kernel supports it.
        [[ -x /sbin/mount_nfs ]] && _locs="$_locs nfs"

Reply via email to