Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Feb 2005 23:32:30 +0800
From:      r p <freebsd99@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   jail /dev
Message-ID:  <eae9dad805020807328e7899c@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

I've set up a jail and am getting confused about setting up the
devices. The name of the jail is "jail" and it's directory is
"/usr/jail". I am using 5.3-Release. I have tried three methods, one
that works, two that don't.

At the moment what I'm doing is "mount_devfs devfs /usr/jail/dev" then
going into the jail and deleting the devices that I (think) I don't
need/shouldn't have available. This works, but brings up the problem
that I don't know what devices I should leave in and which I
shouldn't.

I tried adding the line "jail_jail_devfs_ruleset=4" along with other
suggested lines relating to jails to /etc/rc.conf, but this resulted
in an error message at bootup; "WARNING: devfs_set_ruleset: you must
specify a ruleset number". I am getting the number ("4") from the
"/etc/defaults/devfs.rules" file.

I have also read "man 8 dev" and tried the line " devfs -m
/usr/jail/dev rule -s 4 applyset", which results in the error "devfs
rule: ioctl DEVFSIO_SAPPLY: Inappropriate ioctl for device". I'm
pretty sure in this case I'm just mistaken about how to use the
command properly.

So my questions are; 
1) If I use my current method, the first, which devices should I leave
in the jails /dev directory, and which should I delete?
2) Is the entry I tried in /etc/rc.conf in the second method correct,
and if not, what should it be?
3) Is the command i tried in method three correct, and if not, what
should it be?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eae9dad805020807328e7899c>