tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GPT attributes in dkwedge [PATCH]



> Date: Mon, 18 Sep 2023 19:21:09 +0200
> From: Martin Husemann <martin%duskware.de@localhost>
> 
> On Mon, Sep 18, 2023 at 06:14:58PM +0100, David Brownlee wrote:
> > Specifically in the absence of any other information (empty devname?
> > etc), would it not be reasonable to fall back to the bootme marked
> > filesystem as a root filesystem candidate? I'm thinking about
> > minimally configured disks moving between machines
> 
> No, the bootme is usually on the EFI system partion, which is also
> usually not set up as a root partition for NetBSD :-)

Why would bootme be usually set on the EFI system partition?

The documentation in gpt(8) needs to be clarified -- and I'm not sure
there's any other canonical reference about it in any of our
documentation -- but it sounds to me like it is supposed to be:

(a) where NetBSD's efiboot finds the kernel, and/or
(b) what root partition the kernel will use.

It's not clear what else the bootme flag would be for, and it seems
that unless boot.cfg instructs the bootloader to pass a different root
device to the kernel with the `root' command, the same partition that
was used to find the kernel is a reasonable default choice of root
device.

The bootme flag certainly not used to tell the machine firmware where
to find efiboot -- it's is vendor-specific, a BSDism.

It's not obviously where efiboot finds boot.cfg, since that's in
esp:/EFI/NetBSD/boot.cfg or, if not there, whatever parsebootconf
resolves unqualified `boot.cfg' into -- which may be the
bootme-flagged partition but it's not clear to me in a cursory search
that it has even looked for a bootme-flagged partition at the point it
needs to resolve boot.cfg.

Whatever the purpose is, we need to have it documented clearly; right
now I can't share kre's certainty about what it is _not_ to be used
for.


Home | Main Index | Thread Index | Old Index