NetBSD-Users archive

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

Re: EFI amd64: boot.cfg goes where?



On Tue, 4 Aug 2026, Robert Elz wrote:

 | On Sun, 2 Aug 2026, DTB wrote:
 |
 | > My boot.cfg is just
 | >>>  root NAME=NETBSD
 | >>>  boot NAME=NETBSD:netbsd
 | >
 |
 | That syntax isn't right. See boot.cfg(5) for examples.

The syntax is OK, boot.cfg just shows a more complex example
using a menu so the user can select what to boot.   If that's
not desired it doesn't need to be used.


Isn't that the interactive boot-loader command-line syntax? The boot.cfg(5)
man-page says:

```
   FILE FORMAT
     The format of the file is a series of lines containing keyword/value
     pairs separated by an equals sign (`=').  There should be no whitespace
     surrounding the equals sign.  Lines beginning with a hash (`#') are
     comments and will be ignored.
```

So, `boot=...' and `root=...' in boot.cfg -- if on their own lines ie. not
as part of a `menu=...' line.

 | How did you manage to create a disklabel on a GPT partitioned
 | (and UEFI booted) system?

That is a good question.   The easy way would be to pass the wedge
as a disk to some virtual host environment (qemu, XEN, ...) and then
install onto that using a BIOS type install (a UEFI install would make
an even bigger mess).   That method is OK, but only if the intent is to
keep running the installed system via the same hosting method.   An install
like that is not intended to be booted standalone.


Yeah. I did this as a challenge a few years ago: multiple disklabels on the
same disk. I used a CCD overlay over a slice/wedge if I recall correctly.

 | PS. if any of the GPT partitions have a `bootme' attribute,
 | just get rid of it.

No, don't just do that, it is needed if the root partition isn't the
NetBSD ffs partition with the lowest GPT index, and you want to be able
to boot without explicitly choosing a root/boot partition (ie: just
"boot netbsd", which is the default when there is no boot.cfg - and since
that needs to be (currently) in the root partition, there has to be a way
to find it.    If the partition name is always explicit, or if the
desired boot (root normally) partition is the one with the lowest index,
(among NetBSD ffs partitions - ESP, linux, wintrash etc, don't count)
then bootme doesn't add any value.


True, but, `bootme' also causes problems if attached to the wrong partition:

https://www.unitedbsd.com/d/1301-efi-installation-latitude-e4310

Not really needed for the simple use-cases. And, I don't what's going on here
--from the data presented so far.

-RVP


Home | Main Index | Thread Index | Old Index