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.\" %sccs.include.redist.roff%
10.\"
11.\"	@(#)mount_kernfs.8	8.2 (Berkeley) 03/27/94
12.\"
13.\"
14.Dd
15.Dt MOUNT_KERNFS 8
16.Os BSD 4.4
17.Sh NAME
18.Nm mount_kernfs
19.Nd mount the /kern file system
20.Sh SYNOPSIS
21.Nm mount_kernfs
22.Op Fl o Ar options
23.Ar /kern
24.Ar mount_point
25.Sh DESCRIPTION
26The
27.Nm mount_kern
28command attaches an instance of the kernel parameter
29namespace to the global filesystem namespace.
30The conventional mount point is
31.Pa /kern .
32This command is normally executed by
33.Xr mount 8
34at boot time.
35.Pp
36The filesystem includes several regular files which can be read,
37some of which can also be written.
38The contents of the files is in a machine-independent format,
39either a string, or an integer in decimal ASCII.
40Where numbers are returned, a trailing newline character is also added.
41.Pp
42The options are as follows:
43.Bl -tag -width indent
44.It Fl o
45Options are specified with a
46.Fl o
47flag followed by a comma separated string of options.
48See the
49.Xr mount 8
50man page for possible options and their meanings.
51.El
52.Sh FILES
53.Bl -tag -width copyright -compact
54.It Pa boottime
55the time at which the system was last booted (decimal ASCII).
56.It Pa copyright
57kernel copyright message.
58.It Pa hostname
59the hostname, with a trailing newline.
60The hostname can be changed by writing to this file.
61A trailing newline will be stripped from the hostname being written.
62.It Pa hz
63the frequency of the system clock (decimal ASCII).
64.It Pa loadavg
65the 1, 5 and 15 minute load average in kernel fixed-point format.
66The final integer is the fix-point scaling factor.
67All numbers are in decimal ASCII.
68.It Pa pagesize
69the machine pagesize (decimal ASCII).
70.It Pa physmem
71the number of pages of physical memory in the machine (decimal ASCII).
72.It Pa root
73the system root directory.
74In a chroot'ed environment,
75.Nm
76can be used to create a new
77.Pa /kern
78mount point.
79.Pa /kern/root
80will then refer to the system global root, not the current process root.
81.It Pa rootdev
82the root device.
83.It Pa rrootdev
84the raw root device.
85.It Pa time
86the second and microsecond value of the system clock.
87Both numbers are in decimal ASCII.
88.It Pa version
89the kernel version string.
90The head line for
91.Pa /etc/motd
92can be generated by running:
93.Dq Ic "sed 1q /kern/version"
94.El
95.Sh SEE ALSO
96.Xr mount 2 ,
97.Xr unmount 2 ,
98.Xr fstab 5 ,
99.Xr mount 8
100.Sh CAVEATS
101This filesystem may not be NFS-exported.
102.Sh HISTORY
103The
104.Nm mount_kernfs
105utility first appeared in 4.4BSD.
106