tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: /rescue/init for alternative (Re: CVScommit:src/share/man/man8)



apb%cequrux.com@localhost wrote:

> On Tue, 21 Oct 2008, Izumi Tsutsui wrote:
> > How about this change (taken from kern_subr.c:setroot())?
> 
> This looks useful.  As far as I can tell, you are doing two things:
> 
>   * if no usable init program can be found, set the RB_ASKNAME
>     flag and prompt for the init path;
> 
>   * when prompting for the init path, support the special strings
>     "halt", "reboot", and "ddb".

Yes, thank you for summarizing.

> At present, the RB_ASKNAME prompt for the filesystem type supports the
> special halt/reboot/ddb strings, but the prompts for the root device and
> dump device do not.  Should that also be changed?

I think it's already done in parsedisk() via getdisk()
called from setroot().

> Perhaps the code to
> parse the halt/reboot/ddb strings can be abstracted into a function.

Maybe, but I'm a bit lazy ;-)

> I can't find documentation for the current way the kernel looks for init
> (the string "oinit" does not apear in any man page).  Perhaps it should
> be added to boot(8)?

And new rescue(8)?

It seems 4.4BSD-Lite2 already had /sbin/oinit in *initpaths[],
and prompt for init(8) on lookup failure was added in rev 1.202.

Furthermore, fallback to RB_ASKNAME on lookup failure of root device
was added in rev 1.95.
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index