At Mon, 6 Oct 2025 20:12:10 -0700, Chris Hanson <[email protected]> wrote: Subject: Re: Shared-root diskless netboot, critical local/remote mounts, and rc.conf > > It’s certainly simpler to change bootparams to add an additional > mount or to change imit to invoke an /etc/rc.boot first, but I > want to do something that I might have a chance of > contributing. :)
It's not only simpler to fix the NFS boot code to optionally ask for an
/etc mount, it's the only way to avoid going down a rabbit hole. I went
down that rabbit hole once before -- it's a long climb back out and
nobody really wanted to hear all my trials and tribulations, so I looked
for an easier solution, and of course mounting /etc before starting init
was the answer.
I've got diffs for sys/nfs/nfs_bootdhcp.c too (I called it "option
NetBSD.etc-path", i.e. using a separate "vendor-option-space NetBSD"),
along with all the related common glue bits for sys/nfs/nfs_boot*. It's
about 1000 lines, including lots of comments and some fixes to error
reporting and such.
I don't know why I never posted them -- I had them all the way back to
NetBSD-4.0. I guess when my last big monochrome monitor died and I
stopped using a sparc-20 as my main workstation I never had any more
reasons to run diskless systems.
It's all very straight forward and I think it's the only right way to
fix the problem properly, once and for all, without going down a rabbit
hole full of magic incantations and hidden twists.
It's really not a stretch to mount two filesystems at boot instead of
just the one, thus allowing the root filesystem itself to be read-only
while still keeping host-specific configurations all in the natural /etc
spot.
In the old days I think the idea was the root filesystem was small
enough (i.e. without /usr, /var, /tmp, /home, ...) that it could be
replicated entirely for each client, but with the trend today to merge /
and /usr (especially given the "everything's a vax, er, x86_64" mantra
resurfacing), well that's getting wasteful again, so having a separate
boot parameter for /etc is ideal and it completely avoids the issue of
whether / and /usr should be on the same filesystem or not.
--
Greg A. Woods <[email protected]>
Kelowna, BC +1 250 762-7675 RoboHack <[email protected]>
Planix, Inc. <[email protected]> Avoncote Farms <[email protected]>
pgphs2iBo7AMU.pgp
Description: OpenPGP Digital Signature
