[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: init requires /dev/vc devices

On Saturday 28 January 2006 19:11, Martin Michlmayr wrote:
> 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.

You're using devfs names, so I'm guessing you have CONFIG_FEATURE_DEVFS 

Which version of busybox are you using?

> 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.

What inittab are you feeding it?  (Or are you leaving it to the default one?)

> 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.

The "::sysinit:/etc/init.d/rcS" line should get run first.  You can 
populate /dev from there.  There is actually decent documentation on busybox 
init's inittab format, but you have to know it's in the "init" entry of 

(I mention here for completeness that busybox has a new mini-udev called mdev, 
but you probably already knew that, and it produces traditional names rather 
than devfs names.  Basically it just copies whatever directory names it finds 
in /sys.  I _really_ need to do a properly release announcement, after we get 
1.1.1 out the door...)

> 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.

Re-reading inittab is unfortunately flakier than it should be, but it should 
minimally work.  You mentioned a floppy, do you have an image we could try to 
reproduce the failure?

I'd still try calling udev from the sysinit script, which should be before it 
tries to spawn the consoles.

> > 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_.

Not a lot busybox init can do about your vcs device nodes pointing to 
nonexistent devices.

If you're using busybox "mdev -s" to populate your /dev, you might want to try 
the svn version which has had some bugfixes.  But that seems unlikely if 
you're using devfs names...

Steve Ballmer: Innovation!  Inigo Montoya: You keep using that word.
I do not think it means what you think it means.

Reply to: