Unfortunate dynamic linking for everything

Bruce Evans bde at zeta.org.au
Wed Nov 19 13:35:53 PST 2003


On Wed, 19 Nov 2003, Ken Smith wrote:

> On Thu, Nov 20, 2003 at 06:27:31AM +1100, Bruce Evans wrote:
>
> > > set init_path=/rescue/init
> >
> > If dynamic root were ready to be turned on, then /rescue/init would be
> > in the default init_path.
>
> I had that explained to me too. :-)
>
> There is a loop in sys/kern/init_main.c that "probes" for an init
> to run.  But it only does what you want for cases of the files
> not existing or otherwise just totally not executable.  It won't
> handle the "started but then dumped core" case the way it would
> need to if /sbin/init were to fail because of shared library
> problems.  So if just relying on this mechanism it would either
> not work right (/sbin/init in the path before /rescue/init) or
> it would always start /rescue/init (/rescue/init before /sbin/init
> in the path).

Oops, better add "... and error handling for init_path would be fixed" -).

I should have remembered this since I got bitten by it recently.  I was
trying to boot RELENG_3 and had a backup init that worked but that didn't
help because there was an execable init earlier in the path.

Bruce


More information about the freebsd-current mailing list