Re: question why need open /dev/console in init() when startingkernel

From: Richard B. Johnson
Date: Fri Jun 03 2005 - 09:43:21 EST


On Fri, 3 Jun 2005, Wakko Warner wrote:

Richard B. Johnson wrote:
For error messages (as well as it's the law)! Init needs a terminal.
Init is the 'father' of all future tasks and they need a default terminal
too.

Is it at all possible that if /dev/console does not exist that the kernel
can mknod it?


Yes. Your initial console can be NULL, set as a kernel command-line
parameter. You should really be using an initial RAM disk (initrd).
That gets mounted for boot, containing whatever is necessary to
properly start the system, then change to the file root (or not).
This is how hundreds of different embeded systems are started.

Execute-in-place, which I think you are trying with 'cpio' will
continue to give you problems because you can't test it except
by throwing it off-the-cliff to see if it flies. RAM-disk systems
can be tested, booting on any media (even a floppy).

Would the code to do this be larger than 2 entries in a cpio archive (one
for /dev directory and one for /dev/console char dev)?

--
Lab tests show that use of micro$oft causes cancer in lab animals

Cheers,
Dick Johnson
Penguin : Linux version 2.6.11.9 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/