Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Apr 2026 23:01:41 +0000
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: a4a3825d3e1d - stable/14 - loader(8): embedded MD should be the most preferred currdev
Message-ID:  <69cda3d5.47f21.60ce5976@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/14 has been updated by np:

URL: https://cgit.FreeBSD.org/src/commit/?id=a4a3825d3e1dff1fea1d81443e0d92af6671a0c3

commit a4a3825d3e1dff1fea1d81443e0d92af6671a0c3
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2026-03-20 00:39:17 +0000
Commit:     Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2026-04-01 19:04:38 +0000

    loader(8): embedded MD should be the most preferred currdev
    
    A loader built with MD_IMAGE_SIZE is almost always meant for use with
    its embedded image and should try that as currdev before anything else.
    Recent changes (d69fc3a9dc71, 784150fd2535) seem to have relaxed the ZFS
    code's search for a rootfs and exposed this problem.
    
    Reviewed by:    imp, tsoome
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D55979
    
    (cherry picked from commit 0661997cea165e951e4e215e6aed41596d8b1d52)
---
 stand/efi/loader/main.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
index 1df1547f23b8..d6a42c0241fc 100644
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -555,6 +555,15 @@ find_currdev(bool do_bootmgr, bool is_last,
 		} /* Nothing specified, try normal match */
 	}
 
+#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 */
+
 #ifdef EFI_ZFS_BOOT
 	/*
 	 * Did efi_zfs_probe() detect the boot pool? If so, use the zpool
@@ -570,15 +579,6 @@ find_currdev(bool do_bootmgr, bool is_last,
 	}
 #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,


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69cda3d5.47f21.60ce5976>