Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: How do I update the boot banner?
Date: Sat, 18 Oct 2025 06:06:21 -0000 (UTC)
From: mlelstv%serpens.de@localhost (Michael van Elst)
Message-ID: <10cvaot$1mu$1%serpens.de@localhost>
| esp:/EFI/NetBSD/boot.cfg
| - that is the EFI system partition (where the bootloader is).
Actually it isn't "(where the bootloader is)" necessarily.
"esp:" is the EFI system partition (ESP) with the lowest GPT table index
on the drive which contains the ESP where the bootloader is.
So, for example, if you have (and this is from one of my drives):
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 2014 Unused
2048 204800 1 GPT part - EFI system partition
206848 32768 2 GPT part - Microsoft reserved partition
239616 1292924928 3 GPT part - Basic data partition
1293164544 1378304 4 GPT part - Windows Recovery
1294542848 2048 Unused
1294544896 204800 5 GPT part - NetBSD_ESP
1294749696 1048576 6 GPT part - NBSD_Root
1295798272 8388608 7 GPT part - NBSD_usr
[...] more irrelevant stuff (incl the secondary headers) for this deleted here
And the version of bootx64.efi that is used to boot the system comes from
NetBSD_ESP (ie: the partition with index 5), then esp: will be the
"EFI system partition" (index 1) on that drive, and that's where boot.cfg
is expected to be found.
The order in which gpt(8) lists the partitions (which is based upon the
starting block number of the partition) is irrelevant for this, just the
partitition table index.
I have been meaning to see if I can find an elegant way to change that,
and actually do as Michael indicated (load boot.cfg from the same partition
as the boot program was loaded from) which is much more flexible if there
are several different ESPs for NetBSD on the drive (say one each for -10
-11 and HEAD) so each could easily have a boot.cfg of its own, and so
that one never needs to mount 2 different ESPs in order to update the
boot config.
Even better, would be (in -11 and later, now we have efi(8) and can do
this kind of thing) would be to create a new set of EFI variables,
BOOTCONFnnnn (where the same nnnn as the BOOTnnnn variable actually
used to boot would be used) which would contain the name (in the same
syntax as is used in the BOOTnnnn variables) of the config file to use.
(If the variable doesn't exist, is unparsable, or perhaps other errors,
then it would fall back to the current strategy, whatever that happens
to be at the time).
I have seen no evidence whatever that the x86 efi boot loader will
ever load a boot.cfg from the kernel boot partition.
kre
ps: the Wintrash that is there (partition indexes 1..4) was installed by
the people who built and tested the hardware for me - it isn't activated,
and never gets touched in practice, I leave it there just in case the system
needs to get sent back for repair (which it actually did once).
Home |
Main Index |
Thread Index |
Old Index