init requires /dev/vc devices

Martin Michlmayr tbm at cyrius.com
Sun Jan 29 01:11:19 UTC 2006


I'm taking this discussion to the busybox list in the hope that they
can help.  In debian-installer, we use buxybox.  For the 2.6 images,
we're not using udev to create devices.  However, busybox's init is
started before udev and it require some devices, so among others, we
create /dev/vc/0 to 4.

While this works well on most machines, I get error messages later on
because the devices /dev/vc/2..4 don't exist - my device doesn't
actually have any virtual terminal, just a serial console.  vc 2-3
(if available) are used in the installer to display debugging
information.

I was wondering whether we could only create /dev/vc/0 and 1, start
init and then udev create the rest.  But this is too late for init.
Even running init -q doesn't help to bring those debugging messages on
vc 2-3.

Below is some more background information.  I was wondering if you
have any ideas how to handle this situation.  IMHO, it should be
possible to run "init -q" later on.  i.e. we could have an inittab
file which'll only reference the first terminal, create that device,
start init, have udev create the rest, then add more inittab entries
(if the machine has the virtual terminals) and then run init again to
re-read inittab.  Unfortunately, this doesn't work at the moment.

* Colin Watson <cjwatson at debian.org> [2006-01-18 21:32]:
> On Fri, Jan 13, 2006 at 02:01:47PM +0000, Martin Michlmayr wrote:
> > When I boot d-i with an 2.6 image via serial on a device which only
> > has a serial console (and no graphics card), the following three
> > messages are constantly repeated:
> > 
> > | device '/dev/vc/2' does not exist.
> > | device '/dev/vc/3' does not exist.
> > | device '/dev/vc/4' does not exist.
> > 
> > This is because /lib/debian-installer/init-udev-devices
> > unconditionally makes /dev/vc/0 to 4.  I don't know anything about how
> > udev support is done in d-i, but would it be possible to only create
> > /dev/vc/0 here and let the rest be created by udev if they exist?
> 
> I tried this and it resulted in those console devices never being
> created, although I think that's mostly because we don't have udev rules
> that cover the devfs names of those devices. I'm also not sure that
> creating them later will work; I have a feeling that they have to be
> there when init starts up.

(Colin tried that later but it didn't work.)

> Having looked into it a bit, I don't see how this can be caused by the
> devices existing. After all, the objection from init is that the devices
> *don't* exist! Why is stat() failing on them?

The device nodes are there but my device doesn't actually have those
_devices_.
-- 
Martin Michlmayr
http://www.cyrius.com/



More information about the busybox mailing list