Weird loader.efi issue on fresh 13.1 upgrade

From: David E. Cross <david_at_crossfamilyweb.com>
Date: Sun, 19 Jun 2022 05:02:54 UTC
So I just hit a weird issue with loader.efi on a fresh upgrade from 13.0 
to 13.1.  The system comes up, asks me for my GELI password, accepts it, 
displays an error about Boot19 having only one DP, then iterates through 
all of the partitions on the disk... and then displays an error message 
about not being able to find a boot partition and displays a reboot counter.


If I then interrupt the countdown at this point, get to a loader prompt 
and set rootdev and curdev to disk0p3: (the right value, and actually 
one of the values that it looped through!) I can then load 
/boot/kernel/kernel and boot everything successfully (including having 
the root disk unencrypted).


This worked before the 13.0 upgrade.  This worked with the 13.1 kernel 
running against 13.0 loader.  It only stopped working with 13.1 loader 
with 13.1 kernel.


Getting an *EXACT* copy of the error messages is a bit of a challenge 
given where this is in the boot sequence.


I think I am about to start code diving about what makes loader give up 
on a partition.