Modifying init to create /dev/console ?

Denis Vlasenko vda.linux at googlemail.com
Sun Mar 11 21:55:26 UTC 2007


On Sunday 11 March 2007 23:06, Robert Schwebel wrote:
> On Wed, Feb 28, 2007 at 08:26:05PM -0500, Mike Frysinger wrote:
> > you should add redirects so that /sbin/init opens /dev/console for its
> > stdin and stdout ...
> 
> I tried it like this:
> 
> ----------8<----------
> #!/bin/sh
> 
> mount -t tmpfs none /dev -o mode=755
> 
> mknod /dev/console c 5 1
> chmod 600 /dev/console
> mknod /dev/null c 1 3
> chmod 666 /dev/null
> 
> exec /bin/busybox init $@ 1> /dev/console 2> /dev/console < /dev/console
> ----------8<----------
> 
> but still get:
> 
> VFS: Mounted root (nfs filesystem).
> Freeing init memory: 88K
> Warning: unable to open an initial console.
> init started:  BusyBox v1.1.3 (2007.03.11-10:31+0000) multi-call binary
> 
> Does anybody have an idea how to get rid of the warning?

So it works! The warning is a cosmetic issue.

You can delete relevant printk from kernel source, I guess...
--
vda



More information about the busybox mailing list