-
Notifications
You must be signed in to change notification settings - Fork 4
/
os.xml
290 lines (216 loc) · 9.15 KB
/
os.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<chapter id='operatingSystemSpecificAnnex'>
<title>Operating System Specific Annex</title>
<para>This section is for additional requirements and recommendations
that only apply to a specific operating system. The material in this
section should never conflict with the base standard.</para>
<section id='linux'><title>Linux</title>
<para>This is the annex for the Linux operating system.</para>
<section id='rootDirectory'><title>/ : Root directory</title>
<para>On Linux systems, if the kernel is located in
<filename class="directory">/</filename>, we recommend using the names
<filename>vmlinux</filename> or <filename>vmlinuz</filename>, which
have been used in recent Linux kernel source packages.</para>
</section>
<section id='binEssentialUserCommandBinaries2'>
<title>/bin : Essential user command binaries (for use by all users)</title>
<para>Linux systems which require them place these additional files into
<filename class="directory">/bin</filename>:</para>
<itemizedlist>
<listitem><para><command>setserial</command></para>
</listitem>
</itemizedlist>
</section>
<section id='devDevicesAndSpecialFiles'>
<title>/dev : Devices and special files</title>
<para>The following devices must exist under
<filename class="directory">/dev</filename>.
<variablelist>
<varlistentry><term><filename class="devicefile">/dev/null</filename></term>
<listitem>
<para>
All data written to this device is discarded. A read from this device
will return an EOF condition.
</para>
</listitem>
</varlistentry>
<varlistentry><term><filename class="devicefile">/dev/zero</filename></term>
<listitem>
<para>
This device is a source of zeroed out data. All data written to this
device is discarded. A read from this device will return as many bytes
containing the value zero as was requested.
</para>
</listitem>
</varlistentry>
<varlistentry><term><filename class="devicefile">/dev/tty</filename></term>
<listitem>
<para>
This device is a synonym for the controlling terminal of a
process. Once this device is opened, all reads and writes will behave
as if the actual controlling terminal device had been opened.
</para>
</listitem>
</varlistentry>
</variablelist>
<tip><title>Rationale</title>
<para>Previous versions of the FHS had stricter requirements for
<filename class="directory">/dev</filename>.
Other devices may also exist in <filename class="directory">/dev</filename>.
Device names may exist as symbolic links to other device nodes
located in <filename class="directory">/dev</filename>
or subdirectories of <filename class="directory">/dev</filename>.
There is no requirement
concerning major/minor number values.</para>
</tip>
</para>
</section>
<section id='etcHostspecificSystemConfiguration2'>
<title>/etc : Host-specific system configuration</title>
<para>Linux systems which require them place these additional files into
<filename class="directory">/etc</filename>.</para>
<itemizedlist>
<listitem><para><filename>lilo.conf</filename></para>
</listitem>
</itemizedlist>
</section>
<section id='procKernelAndProcessInformationVir'>
<title>/proc : Kernel and process information virtual filesystem</title>
<para>The <systemitem class="filesystem">proc</systemitem> filesystem
is the de-facto
standard Linux method for handling process and system information,
rather than <filename class="devicefile">/dev/kmem</filename>
and other similar methods.
We strongly encourage this for the storage and retrieval of process
information as well as other kernel and memory information.</para>
</section>
<section id='sbinEssentialSystemBinaries'>
<title>/sbin : Essential system binaries</title>
<para>Linux systems place commands relating to filesystem maintenance and
boot loader management into <filename class="directory">/sbin</filename>.
</para>
<para>Optional files for <filename class="directory">/sbin</filename>:</para>
<itemizedlist spacing="normal" mark="bullet">
<listitem>
<para>Static binaries:</para>
<itemizedlist>
<listitem><para><command>ldconfig</command></para>
</listitem>
<listitem><para><command>sln</command></para>
</listitem>
<listitem><para><command>ssync</command></para>
</listitem>
</itemizedlist>
<para>Static <command>ln</command> (<command>sln</command>) and
static <command>sync</command> (<command>ssync</command>) are
useful when things go wrong. The primary use of
<command>sln</command> (to repair incorrect symlinks in
<filename>/lib</filename> after a poorly orchestrated upgrade) is no
longer a major concern now that the <command>ldconfig</command>
program (usually located in <filename class="directory">/usr/sbin</filename>)
exists and
can act as a guiding hand in upgrading the dynamic libraries. Static
<command>sync</command> is useful in some emergency situations.
Note that these need not be statically linked versions of the standard
<command>ln</command> and <command>sync</command>, but may
be.</para>
<para>The <command>ldconfig</command> binary is optional for
<filename class="directory">/sbin</filename> since a site may choose to run
<command>ldconfig</command> at boot time, rather than only when
upgrading the shared libraries. (It's not clear whether or not it is
advantageous to run <command>ldconfig</command> on each boot.) Even
so, some people like <command>ldconfig</command> around for the
following (all too common) situation:</para>
<orderedlist numeration='arabic'>
<listitem>
<para>I've just removed <filename>/lib/<file></filename>.</para>
</listitem>
<listitem>
<para>I can't find out the name of the library because <command>ls</command> is
dynamically linked, I'm using a shell that doesn't have <command>ls</command>
built-in, and I don't know about using "<command>echo *</command>" as a
replacement.</para>
</listitem>
<listitem>
<para>I have a static <command>sln</command>, but I don't know what to call the link.</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>Miscellaneous:</para>
<itemizedlist>
<listitem><para><command>ctrlaltdel</command></para>
</listitem>
<listitem><para><command>kbdrate</command></para>
</listitem>
</itemizedlist>
<para>So as to cope with the fact that some keyboards come up with
such a high repeat rate as to be unusable,
<command>kbdrate</command> may be installed in
<filename class="directory">/sbin</filename> on some systems.</para>
<para>Since the default action in the kernel for the Ctrl-Alt-Del key
combination is an instant hard reboot, it is generally advisable to
disable the behavior before mounting the root filesystem in read-write
mode. Some <command>init</command> suites are able to disable
Ctrl-Alt-Del, but others may require the
<command>ctrlaltdel</command> program, which may be installed in
<filename class="directory">/sbin</filename> on those systems.</para>
</listitem>
</itemizedlist>
</section>
<section id='sysKernelAndSystemInformation'>
<title>/sys : Kernel and system information virtual filesystem</title>
<para>The <systemitem class="filesystem">sys</systemitem> filesystem
is the location where
information about devices, drivers, and some kernel features is
exposed. Its underlying structure is determined by the particular
Linux kernel being used at the moment, and is otherwise
unspecified.</para>
</section>
<section id='usrincludeHeaderFilesIncludedByCP'>
<title>/usr/include : Header files included by C programs</title>
<para>These symbolic links are required if a C or C++ compiler is
installed and only for systems not based on glibc.</para>
<screen>
/usr/include/asm -> /usr/src/linux/include/asm-<arch>
/usr/include/linux -> /usr/src/linux/include/linux
</screen>
</section>
<section id='usrsrcSourceCode2'>
<title>/usr/src : Source code</title>
<para>For systems based on
<systemitem class="library">glibc</systemitem>,
there are no specific guidelines for
this directory. For systems based on Linux
<systemitem class="library">libc</systemitem> revisions prior to
<systemitem class="library">glibc</systemitem>,
the following guidelines and rationale apply:</para>
<para>The only source code that should be placed in a specific
location is the Linux kernel source code. It is located in
<filename class="directory">/usr/src/linux</filename>.</para>
<para>If a C or C++ compiler is installed, but the complete Linux
kernel source code is not installed, then the include files from the
kernel source code must be located in these directories:</para>
<screen>
/usr/src/linux/include/asm-<arch>
/usr/src/linux/include/linux
</screen>
<para><filename><arch></filename> is the name of the system
architecture.</para>
<note><title>Note</title>
<para><filename class="directory">/usr/src/linux</filename>
may be a symbolic link to a kernel source code tree.</para></note>
<tip><title>Rationale</title>
<para>It is important that the kernel include files be located in
<filename class="directory">/usr/src/linux</filename> and not in
<filename class="directory">/usr/include</filename>
so there are no problems when system
administrators upgrade their kernel version for the first time.</para>
</tip>
</section>
<section id='varspoolcronCronAndAtJobs'>
<title>/var/spool/cron : cron and at jobs</title>
<para>This directory contains the variable data for the
<command>cron</command> and <command>at</command> programs.</para>
</section>
</section>
</chapter>