Subject: Re: PR 7170 -- init and /dev/console
To: Charles M. Hannum <abuse@spamalicious.com>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-kern
Date: 04/30/2001 13:56:08
On Sun, 29 Apr 2001, Charles M. Hannum wrote:

: > > Plus, in anything other than a diskless environment, if your /dev is
: > > toast you can't upgrade / to r/w to fix it.
: >
: > Huh?  That's only true if *all* of your /dev is toast.
:
: Have you EVER seen a case where /dev/console was missing but disk
: devices were present?  I have no doubt that you'll say `yes', but *I*
: haven't, ever, under any circumstance.  The only case in which it's
: even really plausible is file system corruption.

The original situation which prompted me to write this PR in the first place
were my netbooted machines, where "disk" is present but almost all of /dev
is missing.  I *don't* like putting foreign device nodes on NFS, whatsoever;
mainly for security reasons, along with others that are not relevant here.
The fact that the major/minor for /dev/console (among other devices) is not
consistent across NetBSD architectures, let alone across OS's, only makes
this more annoying.

At current, my netboot roots have only a dev/console entry to make init
happy, and the first rc.d script which runs overlays a mfs and extracts a
tarfile with all the real nodes.  Since /dev/console would be available at
any time init would need it after rc runs, I suggested following the C
comment's suggestion in the kernel and handing init prepopulated fd's--thus
eliminating the need for any remote /dev content at all.

So now you know why handing fd's to init is useful.

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi NetBSD:  Run with it.
-- NetBSD 1.5 now available on CD-ROM  --  http://www.wasabisystems.com/