From owner-freebsd-current@FreeBSD.ORG Wed Nov 19 13:35:53 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1798B16A4CE for ; Wed, 19 Nov 2003 13:35:53 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64ABC43FBF for ; Wed, 19 Nov 2003 13:35:51 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id IAA24003; Thu, 20 Nov 2003 08:35:38 +1100 Date: Thu, 20 Nov 2003 08:35:37 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Ken Smith In-Reply-To: <20031119194319.GB5566@electra.cse.Buffalo.EDU> Message-ID: <20031120083218.H9412@gamplex.bde.org> References: <200311182307.hAIN7Wpm000717@dyson.jdyson.com> <20031119141059.GA14308@madman.celabo.org> <20031119142535.GA27610@electra.cse.Buffalo.EDU> <20031120061110.P8759@gamplex.bde.org> <20031119194319.GB5566@electra.cse.Buffalo.EDU> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org cc: Marcel Moolenaar Subject: Re: Unfortunate dynamic linking for everything X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2003 21:35:53 -0000 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