Re: EFI amd64: boot.cfg goes where?

RVP <[email protected]>
Newsgroups gmane.os.netbsd.general
Message-ID <[email protected]>
On Wed, 5 Aug 2026, DTB wrote:

> I went back over everything and made it a little further. I liked the
> sound of having a menu to be able to break into the boot prompt and boot
> single user and such, so I tweaked the example in boot.cfg(5) to work
> with my system:
>
> root=hd0d
> menu=Boot:rndseed /etc/entropy-file; boot hd0d:netbsd
> menu=Boot single-user:rndseed /etc/entropy-file; boot hd0d:netbsd -s
> menu=Boot prompt:prompt
> default=1
> timeout=3
> clear=1
>

For your simple layout (EFI with only 1 NetBSD FFS partition) you just need
something like:

```
#
# 1st NetBSD partition (index-wise) on disk--no label needed.
#
menu=Boot normally:gop 0;boot
menu=Boot single user:boot -s
#
# 2nd NetBSD system w/ label `NB_test'
#
menu=Boot TEST:gop 0;boot NAME=NB_test:
menu=Boot TEST single user:boot NAME=NB_test: -s
menu=Drop to boot prompt:prompt
rndseed=/var/db/entropy-file
default=1
timeout=10
clear=1
# userconf=disable i915drmkms*
```

That's an actual `boot.cfg' (on the 1st NetBSD / partn.--the other one isn't
read--w/o a `bootme') from when I had 2 NetBSD installs (10.x and 9.x).

> [...] I am a little curious as to how my NetBSD rootfs at GPT partition 4 is
> called hd0d by the booter as I thought hd0d would be the third partition; it
> goes hd0a, hd0b, and then hd0c is the whole drive, right?
>

You wouldn't use that `hdN[a-z]' syntax at all with an EFI partitioned disk.
You would use, here, `NAME=some_label' for device names. See `help' for the
device spec. syntax; also `2.2.2. Partitions' in the Guide.

EFI partitions show up as wedges (not slices--as in a disklabel): dk0, dk1, etc.,
and that's what you would use in `fstab' or when mounting:

```
mount /dev/rdk1 /mnt
mount NAME=msdos /mnt		# label -> devname using getfsspecname(3)
fsck -nf NAME=NB_Root		#             "
```

Just make sure the EFI label + the `NAME=' tag is < 16 bytes total.

HTH,

-RVP
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.