Re: devfs patch v21 available

Richard Guenther (zxmpm11@student.uni-tuebingen.de)
Tue, 31 Mar 1998 10:51:38 +0200 (METDST)


On Tue, 31 Mar 1998, Richard Gooch wrote:

> Richard Guenther writes:
> > - SysVInit (v2.65f) seems to try to open /dev/console. So I see
> > 'unable to open an initial console' on bootup until I mknod
> > the console device into /dev (ext2)
> > - SysVInit opens /dev/initctl on shutdown.... (pipe)
>
> This problem is similar to init versions which need
> /dev/telinit. There is a userspace solution to this:
>
> # cd /sbin
> # mv init init.real
> # echo '#! /bin/sh\nmount -n -t devfs none /dev\n/sbin/init.real' > init
> # chmod a+x init

Yes, I just have done a 'mknod initctl p' somwhere in the startup
scripts.

> I've toyed with the idea of adding a config option to have devfs
> automatically mounted straight after the root filesystem is
> mounted. This would also help where the kernel init code opens up
> /dev/console prior to exec'ing /sbin/init (i.e. before we jump to
> userland for the first time). I could solve this problem by having the
> kernel init code open via devfs instead of through the root
> filesystem, in which case the above userspace solution for the init
> programme would be needed.
> So, I'd like to get some feedback from some kernel gurus.

This would be _really_ nice! (esp. if using NFS-root, which uses
other /dev/ files, too (if I correctly remember))

> BTW: I consider the opening of /dev/console from within the kernel
> init code flawed, as it makes an assumption that /dev is populated
> correctly. It should really have used <chrdev_open> or something.
Um, yes...

> > - Autoloading the ide-cdrom module does not work!? Perhaps
> > kerneld <-> kmod related? (modprobe ide-cd works)
>
> What about autoloading other modules? Can someone else please test
> this too? (Patches would be nice: I don't use kerneld/kmod).
Autoloading the floppy code works. I see request_module calls and
#ifdef KERNELD stuff in kmod.c - I think these have gone now...

> > - mknod does not actually create a special device in /dev ?
> > So /dev/video et al could not be simply mknodded.
>
> Really? I just did:
>
> # mknod zzz c 100 200
> # ll zzz
> crw-r--r-- 1 root root 100, 200 Mar 31 12:45 zzz
>
> Looks OK to me. Does this work for you?

Of course, I get
crw-r--r-- 1 root root 64, 0 ... video0
But actually using this character device with the bttv driver does
not work (No such file or directory !????). Yes I have loaded
the bttv module et al.. (btw. they use register_chr_dev (or similar),
how difficult would it be to add devfs support for them?)

Richard.

--
Richard Guenther <richard.guenther@student.uni-tuebingen.de>
PGP: 2E829319 - 2F 83 FC 93 E9 E4 19 E2 93 7A 32 42 45 37 23 57
WWW: http://www.anatom.uni-tuebingen.de/~richi/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu