Subject: Re: Tests of mdsetimage -s
To: Marcin Jessa <>
From: Hubert Feyrer <>
List: tech-embed
Date: 04/02/2005 20:55:58
On Sat, 2 Apr 2005, Marcin Jessa wrote:
> I took it for granted init will build all the entries automatically as I seen it happen on the boot floppy.
> I read the /.profile of it and there is nothing there mentioned about creating the devices.
> The dev/ dir of /usr/obj/distrib/i386/floppies/ramdisk-big/work has only 
> MAKEDEV in it too.

The calling of that MAKEDEV script (with mounting /dev as mfs before, 
etc.) is done by init(8) itself. See src/init/init.c. It runs "MAKEDEV 

> Any idea how the floppy ramdisk can generate all the dev files on the 
> fly ?

Put (only)  a MAKEDEV into dev/, and NetBSD's init(8) will DTRT.

I've seen other hacks in the past, like creating a dev/ directory 
including entries on your build box, then create a .tar.gz file, put that 
on the disk and extract it early. But I think letting init(8) do the work 
is pretty ok (IIRC g4u uses that too, after trying out several other 
approaches at first :).

Just make sure everything needed by MAKEDEV is there (mknod, chown, chmod, 
chgrp, ...).

  - Hubert

NetBSD - Free AND Open!      (And of course secure, portable, yadda yadda)