Index: stand/efi/loader/conf.c =================================================================== --- stand/efi/loader/conf.c +++ stand/efi/loader/conf.c @@ -35,6 +35,10 @@ extern struct devsw vdisk_dev; +#ifdef MD_IMAGE_SIZE +extern struct devsw md_dev; +#endif + struct devsw *devsw[] = { &efipart_fddev, &efipart_cddev, @@ -47,6 +51,9 @@ #ifdef EFI_ZFS_BOOT &zfs_dev, #endif +#ifdef MD_IMAGE_SIZE + &md_dev, +#endif NULL }; Index: stand/efi/loader/main.c =================================================================== --- stand/efi/loader/main.c +++ stand/efi/loader/main.c @@ -296,6 +296,21 @@ } #endif +#ifdef MD_IMAGE_SIZE +static bool +probe_md_currdev(void) +{ + extern struct devsw md_dev; + bool rv; + + set_currdev_devsw(&md_dev, 0); + rv = sanity_check_currdev(); + if (!rv) + printf("MD not present\n"); + return (rv); +} +#endif + static bool try_as_currdev(pdinfo_t *hd, pdinfo_t *pp) { @@ -569,6 +584,15 @@ } #endif /* EFI_ZFS_BOOT */ +#ifdef MD_IMAGE_SIZE + /* + * If there is an embedded MD, try to use that. + */ + printf("Trying MD\n"); + if (probe_md_currdev()) + return (0); +#endif /* MD_IMAGE_SIZE */ + /* * Try to find the block device by its handle based on the * image we're booting. If we can't find a sane partition,