creating devices under a regular file system

Will Parsons varro at nodomain.invalid
Thu Oct 15 19:10:40 UTC 2015


On Wednesday, 14 Oct 2015 10:05 PM -0400, kpneal at pobox.com wrote:
> On Wed, Oct 14, 2015 at 11:29:50PM +0000, Will Parsons wrote:
>> I would like to know how to create a few selected devices
>> (viz. dev/null and dev/urandom) under a regular directory tree using
>> devfs.
>
> Did you see the devfs man page? "man 8 devfs"

Yes, but I'm still puzzled.

> You need to create a /etc/devfs.rules file creating a new ruleset that
> lists what you want available. You need to add that new ruleset to devfs,
> and then mount a new devfs in the appropriate place (~/FOSSIL/dev).

OK, but where's that done?  There's no devfs entry in /etc/fstab.

> I have a devfs.rules file I cobbled together below. Note that I don't
> know devfs very well _at all_, so if I've made any errors I hope someone
> will chime in.
>
> [devfsrules_unhide_bind=5]
> add hide
> add path log unhide
> add path null unhide
> #add path zero unhide
> #add path crypto unhide
> add path random unhide
> add path urandom unhide

But those get created under /dev, so I guess I need another devfs to
create devices under ~/FOSSIL/dev?

-- 
Will



More information about the freebsd-questions mailing list