xref: /netbsd-src/sbin/mount_kernfs/mount_kernfs.8 (revision ae9172d6cd9432a6a1a56760d86b32c57a66c39c)
1.\"
2.\" Copyright (c) 1992, 1993, 1994
3.\"	The Regents of the University of California.  All rights reserved.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software donated to Berkeley by
7.\" Jan-Simon Pendry.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\" 3. All advertising materials mentioning features or use of this software
18.\"    must display the following acknowledgement:
19.\"	This product includes software developed by the University of
20.\"	California, Berkeley and its contributors.
21.\" 4. Neither the name of the University nor the names of its contributors
22.\"    may be used to endorse or promote products derived from this software
23.\"    without specific prior written permission.
24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35.\" SUCH DAMAGE.
36.\"
37.\"	from: @(#)mount_kernfs.8	8.2 (Berkeley) 3/27/94
38.\"	$Id: mount_kernfs.8,v 1.5 1994/07/25 08:23:29 mycroft Exp $
39.\"
40.Dd March 27, 1994
41.Dt MOUNT_KERNFS 8
42.Os BSD 4.4
43.Sh NAME
44.Nm mount_kernfs
45.Nd mount the /kern file system
46.Sh SYNOPSIS
47.Nm mount_kernfs
48.Op Fl o Ar options
49.Ar /kern
50.Ar mount_point
51.Sh DESCRIPTION
52The
53.Nm mount_kern
54command attaches an instance of the kernel parameter
55namespace to the global filesystem namespace.
56The conventional mount point is
57.Pa /kern .
58This command is normally executed by
59.Xr mount 8
60at boot time.
61.Pp
62The filesystem includes several regular files which can be read,
63some of which can also be written.
64The contents of the files is in a machine-independent format,
65either a string, or an integer in decimal ASCII.
66Where numbers are returned, a trailing newline character is also added.
67.Pp
68The options are as follows:
69.Bl -tag -width indent
70.It Fl o
71Options are specified with a
72.Fl o
73flag followed by a comma separated string of options.
74See the
75.Xr mount 8
76man page for possible options and their meanings.
77.El
78.Sh FILES
79.Bl -tag -width copyright -compact
80.It Pa boottime
81the time at which the system was last booted (decimal ASCII).
82.It Pa copyright
83kernel copyright message.
84.It Pa hostname
85the hostname, with a trailing newline.
86The hostname can be changed by writing to this file.
87A trailing newline will be stripped from the hostname being written.
88.It Pa hz
89the frequency of the system clock (decimal ASCII).
90.It Pa loadavg
91the 1, 5 and 15 minute load average in kernel fixed-point format.
92The final integer is the fix-point scaling factor.
93All numbers are in decimal ASCII.
94.It Pa msgbuf
95the kernel message buffer, also read by
96.Xr syslogd 8 ,
97through the
98.Pa log
99device, and by
100.Xr dmesg 8 .
101.It Pa pagesize
102the machine pagesize (decimal ASCII).
103.It Pa physmem
104the number of pages of physical memory in the machine (decimal ASCII).
105.\" .It Pa root
106.\" the system root directory.
107.\" In a chroot'ed environment,
108.\" .Nm
109.\" can be used to create a new
110.\" .Pa /kern
111.\" mount point.
112.\" .Pa /kern/root
113.\" will then refer to the system global root, not the current process root.
114.It Pa rootdev
115the root device.
116.It Pa rrootdev
117the raw root device.
118.It Pa time
119the second and microsecond value of the system clock.
120Both numbers are in decimal ASCII.
121.It Pa version
122the kernel version string.
123The head line for
124.Pa /etc/motd
125can be generated by running:
126.Dq Ic "sed 1q /kern/version"
127.El
128.Sh SEE ALSO
129.Xr mount 2 ,
130.Xr unmount 2 ,
131.Xr fstab 5 ,
132.Xr dmesg 8 ,
133.Xr mount 8 ,
134.Xr syslogd 8
135.Sh CAVEATS
136This filesystem may not be NFS-exported.
137.Sh HISTORY
138The
139.Nm mount_kernfs
140utility first appeared in 4.4BSD.
141