geli taste: allow GELIBOOT tagged providers as well

Currently the installer will tag geliboot partitions with both BOOT and
GELIBOOT; the former allows the kernel to taste it at boot, while the latter
is what loaders keys off of.

However, it seems reasonable to assume that if a provider's been tagged with
GELIBOOT that the kernel should also take that as a hint to taste/attach at
boot. This would allow us to stop tagging GELIBOOT partitions with BOOT in
bsdinstall, but I'm not sure that there's a compelling reason to do so any
time soon.

Reviewed by:	oshogbo
Differential Revision:	https://reviews.freebsd.org/D23387
This commit is contained in:
Kyle Evans 2020-02-07 21:36:14 +00:00
parent 5aa0576b33
commit c81929d343

View File

@ -1169,7 +1169,8 @@ g_eli_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
if (md.md_provsize != pp->mediasize)
return (NULL);
/* Should we attach it on boot? */
if (!(md.md_flags & G_ELI_FLAG_BOOT))
if (!(md.md_flags & G_ELI_FLAG_BOOT) &&
!(md.md_flags & G_ELI_FLAG_GELIBOOT))
return (NULL);
if (md.md_keys == 0x00) {
G_ELI_DEBUG(0, "No valid keys on %s.", pp->name);