xref: /dragonfly/sbin/mount_devfs/mount_devfs.8 (revision 2b3f93ea)
1.\"
2.\" Copyright (c) 2009
3.\"	The DragonFly Project.  All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\"
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in
13.\"    the documentation and/or other materials provided with the
14.\"    distribution.
15.\" 3. Neither the name of The DragonFly Project nor the names of its
16.\"    contributors may be used to endorse or promote products derived
17.\"    from this software without specific, prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
23.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
25.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
29.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.Dd December 4, 2019
33.Dt MOUNT_DEVFS 8
34.Os
35.Sh NAME
36.Nm mount_devfs
37.Nd mount a device file system
38.Sh SYNOPSIS
39.Nm
40.Op Fl o Ar options
41.Ar node
42.Sh DESCRIPTION
43The
44.Nm
45command attaches an instance of the device file system (or
46.Xr devfs 5 )
47to the global file system namespace.
48This command is automatically executed for
49.Pa /dev
50at boot time.
51.Pp
52The options are as follows:
53.Bl -tag -width indent
54.It Fl o
55Specify mount options, which are a comma delimited set of options (see
56.Xr mount 8 ) .
57Supported mount options are:
58.Bl -tag -width indent
59.It Ar jail
60Mount
61.Xr devfs 5
62for a jail.
63Only rules between
64.Ic jail Ar yes
65and
66.Ic jail Ar no
67are applied.
68.It Ar ruleset=rule_file
69When mounting, apply the rules from the specified
70.Ar rule_file ,
71which can be either an absolute path or one relative to
72.Pa /etc/devfs/ .
73.El
74.El
75.Pp
76Mounting an already mounted
77.Ar node
78clears and resets all rules that are in effect for it and (if a
79.Ar ruleset
80option is present) applies the rules from
81.Ar rule_file .
82It is equal to
83.Nm devfsctl Fl cr
84followed by an optional
85.Nm devfsctl Fl af .
86.Sh EXAMPLES
87Mount a
88.Xr devfs 5 ,
89marked as
90.Ar jail ,
91with a ruleset file named
92.Pa default.rules
93onto
94.Pa /var/jail/dev .
95.Bd -literal -offset indent
96mount_devfs -o jail,ruleset=default.rules /var/jail/dev
97.Ed
98.Pp
99A corresponding
100.Xr fstab 5
101entry is:
102.Bd -literal -offset indent
103devfs /var/jail/dev devfs ro,jail,ruleset=default.rules
104.Ed
105.Sh SEE ALSO
106.Xr mount 2 ,
107.Xr unmount 2 ,
108.Xr devfs 5 ,
109.Xr fstab 5 ,
110.Xr devfsctl 8 ,
111.Xr mount 8
112.Sh HISTORY
113The
114.Nm
115utility first appeared in
116.Dx 2.3 .
117