From 02cff72a7bfbf676f168a2799418affb33547d0e Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 17 Jun 2018 01:26:57 +0000 Subject: [PATCH] Many netboot scenarios don't have /boot/defaults/loader.conf. As a fallback, also check /boot/kernel/kernel existing as well, since that's the fallback behavior of the loader. --- stand/efi/loader/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 222457f3f6d7..a8d07dbec4d6 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -220,7 +220,8 @@ sanity_check_currdev(void) { struct stat st; - return (stat("/boot/defaults/loader.conf", &st) == 0); + return (stat("/boot/defaults/loader.conf", &st) == 0 || + stat("/boot/kernel/kernel", &st) == 0); } #ifdef EFI_ZFS_BOOT