Subject: Re: Lack of error message with /sbin/init and missing /dev
To: None <current-users@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: current-users
Date: 11/15/2005 23:52:29
> This is what it does anyway on my WRAP board. And then it gets silent
> when there's no /dev present.

According to src/sbin/init.c, it checks if /dev/MAKEDEV presents,
but it doesn't check /dev dir itself. Maybe because if there is no
/dev dir init(8) can't do mount_mfs nor create files anyway.

> > Anyway, I think init(8) can't print any messages without device node.
> 
> That'd explain the behaviour.

Hmm, with a quick test, once after init(8) mount mfs /dev,
it creates /dev/console and complains "Unable to run MAKEDEV"
if there is /dev but no /dev/{MAKEDEV,console}:
---
 :
root device: sd0
dump device (default sd0b): 
file system (default generic): 
root on sd0a dumps on sd0b
root file system type: ffs
WARNING: clock lost 13102 days -- CHECK AND RESET THE DATE!
warning: no /dev/console
init path (default /sbin/init): 
init: trying /sbin/init
init: Creating mfs /dev (364 blocks, 1024 inodes)
sh: Can't open /etc/MAKEDEV
init: Unable to run MAKEDEV: Invalid argument
Enter pathname of shell or RETURN for /bin/sh: 
# ls -l /dev
total 0
crw-r--r--  1 root  wheel  17, 0 Jan  1 00:00 console
# 
---