Modifying init to create /dev/console ?
David Daney
ddaney at avtrex.com
Wed Feb 28 09:33:54 PST 2007
Terry Barnaby wrote:
> Mike Frysinger wrote:
>> On Tuesday 27 February 2007, Terry Barnaby wrote:
>>> However, init and other programs obviously require /dev/console (and
>>> other /dev entries).
>> they dont require /dev/console
>>
>>> I was wondering about adding an option to init where it would create a
>>> tmpfs file system, mount it on /dev and create a /dev/console node if no
>>> /dev/console was found. I guess it could do a bit more and function as
>>> udev as well.
>> it wouldnt work ... the kernel opens up /dev/console before executing init, so
>> even if /sbin/init created the device node, it wouldnt matter
>>
>> also, this is what init scripts are for ... such / policy handling does not
>> belong hardcoded in the C code
>> -mike
>
> No, they don't require /dev/console just to operate, but if you want
> debug printout they do :)
>
> Init could easily reopen its controlling terminal to the created
> /dev/console and continue ...
>
> The reason I was looking at getting init to create /dev/console was so
> that I could debug my init scripts that are not working when
> /dev/console does not exist ...
>
Why do you think what Make says is false? All your posts on this
subject are premised on that false belief.
I think it is time that you change your assumption that you can boot a
system that does not contain /dev/console in its root file system. You
cannot do it with a standard Linux kernel.
As I see it you have two choices:
1) Put /dev/console in your root filesystem.
2) Hack up your kernel so that /dev/console is not needed.
David Daney
More information about the busybox
mailing list