Re: Proposal to enhance boot path selections

Paul Goyette <[email protected]> Sun, 11 May 2025 06:48:43 -0700 (PDT)
Newsgroups gmane.os.netbsd.ports.x86-64,gmane.os.netbsd.devel.kernel,gmane.os.netbsd.ports.i386
Message-ID <[email protected]>
On Sun, 11 May 2025, Paul Goyette wrote:

> On Sun, 11 May 2025, Greg Troxel wrote:
>
>> Paul Goyette <[email protected]> writes:
>> 
>>> With the recent changes, specifying /onetbsd will only look for a
>>> kernel in /onetbsd and /onetbsd.gz (both being regular files);  it
>>> will not look in /onetbsd/kernel or /onetbsd/kernel.gz as might be
>>> expected.
>>> 
>>> If one is accustomed to booting with the leading slash it could be
>>> disconcerting (or worse) to not having ingrained muscle-memory boot
>>> the old kernel as expected.
>> 
>> My $0.02 is that I had no idea that 'boot foo' would try to load
>> foo/kernel, and that I find this unintuitive and not really helpful.
>> 
>> Reading boot(8) on current amd64, I see that boot is specified to take
>> "filename" and there is no mention of directories.  The man page kind of
>> implies that filename must be the name of a file in the root directory.
>> There's no suggestion that it makes sense to have leading slash.
>> There's no suggestion that one can give a pathname rather than a
>> filename.
>> 
>> Thus I suspect I am missing something.
>
> Yup, I think you're missing the fact that all of this relates to the
> ratther new-ish KERNEL_DIR option, support for which was only recently
> completed (by myself).  KERNEL_DIR is described briefly in options(4),
> and it is noted in both CHANGES and UPDATING.

Correction, KERNEL_DIR is described in mk.conf(5).  It is a build.sh
option.

> In short, KERNEL_DIR provides a mechanism to keep a kernel and its
> associated modules together, addressing one of the most common
> complaints about modules.
>
> Sorry for not making this more clear.
>
>
> +---------------------+--------------------------+----------------------+
> | Paul Goyette (.sig) | PGP Key fingerprint:     | E-mail addresses:    |
> | (Retired)           | 1B11 1849 721C 56C8 F63A | [email protected]    |
> | Software Developer  | 6E2E 05FD 15CE 9F2D 5102 | [email protected]  |
> | & Network Engineer  |                          | [email protected] |
> +---------------------+--------------------------+----------------------+
>
> !DSPAM:6820a8b814628299513459!
>
>

+---------------------+--------------------------+----------------------+
| Paul Goyette (.sig) | PGP Key fingerprint:     | E-mail addresses:    |
| (Retired)           | 1B11 1849 721C 56C8 F63A | [email protected]    |
| Software Developer  | 6E2E 05FD 15CE 9F2D 5102 | [email protected]  |
| & Network Engineer  |                          | [email protected] |
+---------------------+--------------------------+----------------------+