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
This commit is contained in:
Warner Losh 2024-05-19 11:05:48 -06:00
parent 68344c9c6c
commit 0111f09ca6

View File

@ -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) {
/*