Subject: Re: devices in /dev
To: Ben Collver <collver@peak.org>
From: Roberto <roberto.trovo@redix.it>
List: current-users
Date: 03/30/2005 10:08:52
> On Wed, Mar 30, 2005 at 10:45:51AM +0700, Ian Zagorskih wrote:
>> Of course you need to create [/dev special files] manually :)
>> /sbin/init does not create any devices.
>
> From NetBSD-2.0 src/sbin/init.c
>
>         /* Run the makedev script to create devices */
>         switch ((pid = fork())) {
>         case 0:
>                 dup2(2, 1);     /* Give the script stdout */
>                 if (chdir("/dev") == 0)
>                         (void)execl(INIT_BSHELL, "sh",
>                             mfile[0].len ? "./MAKEDEV" : "/etc/MAKEDEV",
>                             "init", NULL);
>
> What is going on here?
>
> Ben
>

On NetBSD 1.6.x, if init will not find /dev/console it will create a
memory fs and populate it with device file (using MAKEDEV).
On 2.0 and Current I've not tried yet.

Roberto