dev/console catch 22

Mike Frysinger vapier at gentoo.org
Tue Jun 19 14:32:46 UTC 2007


On Tuesday 19 June 2007, Michael Cashwell wrote:
> My solution was to note in inittab's documentation that sysinit is
> synchronous (eg: each completes in order before any other inittab line
> is executed). That made be realize that my "::sysinit:/etc/rc" would
> have created the needed console dev node (in a /dev tmpfs mount) by the
> time anything else happened.

will do

> My confusion was in thinking that init itself had to have that node open
> as the console in order to log in. That proved to not be the case.

sorry, i thought you wanted everything to be outputting to the console, not 
just the login shell

> The key insight was that the next inittab line needed to be
> "console::askfirst:-/bin/ash". Without the "console" it wouldn't work. I
> did not expect this since the documentation (downloads/BusyBox.html in
> the example inittab section) says that "::askfirst:-/bin/ash" (which is
> what I had) starts "an askfirst shell on the console (whatever that may
> be)".

might be worthwhile to change the default as well so it opens console

> I interpreted this to mean that a missing ID was replaced with "console"
> but that otherwise the behavior of the two cases would be identical.
>
> They are not. Without an explicit ID, init seems to use whatever FD 0 it
> inherited from the kernel. While conceptually that is "the console",
> it's pretty different behavior from the explicit case where init
> actually opens a path "/dev/<id>" and gets a new FD.

correct
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070619/6ef5b6b3/attachment-0002.pgp 


More information about the busybox mailing list