From 0111f09ca67070271e43655db2e4989cf2d64f88 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 19 May 2024 11:05:48 -0600 Subject: [PATCH] kboot: Initialize hostfs_root sooner (and remove kboot.conf) Move the initialization of hostfs_root to be a bit sooner. While it doesn't matter for the default case, we may want to use hostfs files sooner. Also, while we're here, remove kboot.conf. It duplicates the command line and has proven difficult to use. It will be replaced by an early script that can influence the state of the boot loader before we select a device to boot from (including strongly suggesting which one to boot from). Sponsored by: Netflix --- stand/kboot/kboot/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/kboot/kboot/main.c b/stand/kboot/kboot/main.c index ed5cad450000..994df1ec9fa1 100644 --- a/stand/kboot/kboot/main.c +++ b/stand/kboot/kboot/main.c @@ -357,17 +357,17 @@ main(int argc, const char **argv) /* Parse the command line args -- ignoring for now the console selection */ parse_args(argc, argv); - parse_file("host:/kboot.conf"); + hostfs_root = getenv("hostfs_root"); + if (hostfs_root == NULL) + hostfs_root = "/"; /* Initialize all the devices */ devinit(); + /* Figure out where we're booting from */ bootdev = getenv("bootdev"); if (bootdev == NULL) bootdev = hostdisk_gen_probe(); - hostfs_root = getenv("hostfs_root"); - if (hostfs_root == NULL) - hostfs_root = "/"; #if defined(LOADER_ZFS_SUPPORT) if (bootdev == NULL || strcmp(bootdev, "zfs:") == 0) { /*