Subject: Re: HEADS UP: migration to fully dynamic linked "base" system
To: Bill Studenmund <wrstuden@netbsd.org>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 08/26/2002 11:18:24
On Mon, 26 Aug 2002, Bill Studenmund wrote:

# > If I recall correctly, there was quite a bit of debate on this, and I
# > didn't see any clear rationale nor consensus.  Admittedly the rationale
# > seems a bit more clear...
#
# dlopen().

What does dlopen() buy us?  [addendum:  never mind; i misread dlopen() as
dynamic lib open, not dynamic load open...]

# That way setting LDSTATIC_BIN=-static turns it on ONLY for /bin and /sbin,
# but setting LDSTATIC=-static covers everything.

That would be acceptable.

# > By introducing shared libraries as a static root, to my perception,
# > this introduces one more point of failure.
#
# Yes, that's why we now have /rescue, and why you can tell the kernel to
# look for /rescue/init. We talked about auto-failover (if /sbin/init fails
# try /rescue/init or some such) but the problem is how to tell when
# "loading" is finished; we panic if init exists, so when do we know to
# panic or look at /rescue/init...

But do you see what a kludge that is?  From the viewpoint of a casual
observer (which I am most definitely NOT), it would be very easy to
construe this as looking for solutions which need problems.

Besides, booting from an alternate init is a capability which should have
been there from the beginning *any*way.  I can't tell how many times I've
hosed init.

(SunOS even had a way of getting around /sbin/init!)

# > In single-user mode, I'd say that only init really stands to benefit from
# > this, really.  I don't see a single reason to rebuild the entire rest of
# > the tree dynamically-linked.
#
# Two problems (I see) with that. 1) From running large systems back at NAS,
# I can envision cases where you need things from nsswitch in single-user
# mode. Like you're ls'ing files and want to know who user 12943 is, and
# you have to go to the net, with an auth plugin that needs nsswtich, to
# find out. Yes, that means you have to ifconfg stuff, but I'm assuming a
# savy admin focused on solving a problem. :-)

Moot example since getpw*() use nsswitch anyway, but I think I see
what you're driving at.

# 2) All the programs in /bin and /sbin are not used ONLY in single-user
# mode. So keeping them static means that we say can't add new ways of
# finding users (can't dload a module) at all. Also, a lot of the locale
# stuff (which admittedly you and I being roman-alphabet-users won't need as
# much) needs dynamic loading.

Hard to refute, which is frustrating.

# > The concept isn't completely horrid, but the mechanism appears to be
# > brute-force, all-or-nothing.  This seems much less elegant than NetBSD
# > has been thus reknowned.
#
# Agreed. What do you think of the suggestion above?

That is more or less what I would have investigated doing had it not been
suggested, so yes, I find it acceptable.

My question is:  Will this actually be implemented, or shall I attempt
to produce patches once the initial release of this code is done?

				--*greywolf;
--
"Windows/NT - From the people who brought you EDLIN".