Page MenuHomeFreeBSD

release: Add /boot/efi to METALOG
AbandonedPublic

Authored by cperciva on Sat, Oct 4, 10:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 2:59 AM
Unknown Object (File)
Fri, Oct 10, 6:28 PM
Unknown Object (File)
Thu, Oct 9, 6:56 PM
Unknown Object (File)
Thu, Oct 9, 4:33 PM
Unknown Object (File)
Thu, Oct 9, 3:59 PM
Unknown Object (File)
Thu, Oct 9, 2:54 PM
Unknown Object (File)
Tue, Oct 7, 4:56 PM
Unknown Object (File)
Tue, Oct 7, 3:35 AM
Subscribers

Details

Reviewers
markj
imp
Summary

Without this, VM images built with NO_ROOT=YES fail to boot when they
can't mount /dev/gpt/efiboot0 on a non-existent /boot/efi.

MFC after: 3 days
Sponsored by: https://www.patreon.com/cperciva

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67562
Build 64445: arc lint + arc unit

Event Timeline

imp added inline comments.
release/tools/vmimage.subr
407

I have to do this as well in my scripting. I'm surprised that we don't have it in an mtree that gets picked up.

This revision is now accepted and ready to land.Sat, Oct 4, 11:04 PM
release/tools/vmimage.subr
407

Probably it's not in mtree simply because not all platforms have it. (To be specific, powerpc doesn't use EFI.)

I only tripped over it now because I didn't turn on no-root release building until 15.0-ALPHA5.

release/tools/vmimage.subr
407

We should just add it everywhere.
Powerpc is an outlier, but can cope with an extra directory.

Except it is in BSD.root.dist:

...
    boot
...
       efi
...

So why aren't we using this mtree in the process? It should have added to the metalog in make distribute since that's what uses this...

distributeworld installworld stageworld: _installcheck_world .PHONY

uses this file. I suspect understanding why is important.

In D52911#1208992, @imp wrote:

So why aren't we using this mtree in the process? It should have added to the metalog in make distribute since that's what uses this...

We're now building cloudware from pkgbase, so we don't run make distribute. So I guess the real question is why /boot/efi didn't end up in any of the pkgbase packages.

In D52911#1208992, @imp wrote:

So why aren't we using this mtree in the process? It should have added to the metalog in make distribute since that's what uses this...

We're now building cloudware from pkgbase, so we don't run make distribute. So I guess the real question is why /boot/efi didn't end up in any of the pkgbase packages.

I thought we did with stagedistribute...

Where do all the other bits come from for that? Or why isn't this in whater package the loader is in?

release/tools/vmimage.subr
407

Hmmm, it already was everywhere

We're now building cloudware from pkgbase, so we don't run make distribute. So I guess the real question is why /boot/efi didn't end up in any of the pkgbase packages.

Ok, it looks like directories created by mtree aren't ending up in packages unless they're annotated as such in the mtree file, e.g. under /boot/ we have

loader.conf.d             tags=package=bootloader

and that directory is created as part of the bootloader package, but under /etc/ we have

sysctl.kld.d

and that directory is not created as part of any package. In worldstage/METALOG these show up as lines without any package= field.

@bapt @ivy Can you help here? One possible option is simply to put a tags=package= field on every line of the mtree files, but I feel like there should probably be some sort of default handling for untagged entries in METALOG?

One possible option is simply to put a tags=package= field on every line of the mtree files, but I feel like there should probably be some sort of default handling for untagged entries in METALOG?

i tried to do this in D50636 and there was significant resistance, so i dropped it. you are welcome to try again if you like :-)

but that won't fix this specific issue, because anything under /boot should be in the bootloader package.

i think this is no longer required since we fixed the mtree, and can be closed?