source: chapter07/usage.xml@ 3d2cea9

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 3d2cea9 was 3d2cea9, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Update to man-pages-3.67.
Reformatted version check script to fit pdf pages properly.
Added a note about adding the parent directory to the es and pt
keymaps for proper keymap loading.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10569 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 30.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 <!ENTITY site SYSTEM "../appendices/rc.site.script">
6 %general-entities;
7]>
8
9<sect1 id="ch-scripts-usage">
10 <?dbhtml filename="usage.html"?>
11
12 <title>System V Bootscript Usage and Configuration</title>
13
14 <indexterm zone="ch-scripts-usage">
15 <primary sortas="a-Bootscripts">Bootscripts</primary>
16 <secondary>usage</secondary>
17 </indexterm>
18
19 <sect2>
20 <title>How Do the System V Bootscripts Work?</title>
21
22 <para>Linux uses a special booting facility named SysVinit that is based on a
23 concept of <emphasis>run-levels</emphasis>. It can be quite different from one
24 system to another, so it cannot be assumed that because things worked in one
25 particular Linux distribution, they should work the same in LFS too. LFS has its
26 own way of doing things, but it respects generally accepted standards.</para>
27
28 <para>SysVinit (which will be referred to as <quote>init</quote> from now on)
29 works using a run-levels scheme. There are seven (numbered 0 to 6) run-levels
30 (actually, there are more run-levels, but they are for special cases and are
31 generally not used. See <filename>init(8)</filename> for more details), and
32 each one of those corresponds to the actions the computer is supposed to
33 perform when it starts up. The default run-level is 3. Here are the
34 descriptions of the different run-levels as they are implemented:</para>
35
36<literallayout>0: halt the computer
371: single-user mode
382: multi-user mode without networking
393: multi-user mode with networking
404: reserved for customization, otherwise does the same as 3
415: same as 4, it is usually used for GUI login (like X's <command>xdm</command> or KDE's <command>kdm</command>)
426: reboot the computer</literallayout>
43
44 </sect2>
45
46 <sect2 id="conf-sysvinit" role="configuration">
47 <title>Configuring Sysvinit</title>
48
49 <indexterm zone="conf-sysvinit">
50 <primary sortas="a-Sysvinit">Sysvinit</primary>
51 <secondary>configuring</secondary>
52 </indexterm>
53
54 <indexterm zone="conf-sysvinit">
55 <primary sortas="e-/etc/inittab">/etc/inittab</primary>
56 </indexterm>
57
58 <para>During the kernel initialization, the first program that is run
59 is either specified on the command line or, by default
60 <command>init</command>. This program reads the initialization file
61 <filename>/etc/inittab</filename>. Create this file with:</para>
62
63<screen><userinput>cat &gt; /etc/inittab &lt;&lt; "EOF"
64<literal># Begin /etc/inittab
65
66id:3:initdefault:
67
68si::sysinit:/etc/rc.d/init.d/rc S
69
70l0:0:wait:/etc/rc.d/init.d/rc 0
71l1:S1:wait:/etc/rc.d/init.d/rc 1
72l2:2:wait:/etc/rc.d/init.d/rc 2
73l3:3:wait:/etc/rc.d/init.d/rc 3
74l4:4:wait:/etc/rc.d/init.d/rc 4
75l5:5:wait:/etc/rc.d/init.d/rc 5
76l6:6:wait:/etc/rc.d/init.d/rc 6
77
78ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
79
80su:S016:once:/sbin/sulogin
81
821:2345:respawn:/sbin/agetty --noclear tty1 9600
832:2345:respawn:/sbin/agetty tty2 9600
843:2345:respawn:/sbin/agetty tty3 9600
854:2345:respawn:/sbin/agetty tty4 9600
865:2345:respawn:/sbin/agetty tty5 9600
876:2345:respawn:/sbin/agetty tty6 9600
88
89# End /etc/inittab</literal>
90EOF</userinput></screen>
91
92 <para>An explanation of this initialization file is in the man page for
93 <emphasis>inittab</emphasis>. For LFS, the key command that is run is
94 <command>rc</command>. The intialization file above will instruct
95 <command>rc</command> to run all the scripts starting with an S in the
96 <filename class="directory">/etc/rc.d/rcS.d</filename> directory
97 followed by all the scripts starting with an S in the <filename
98 class="directory">/etc/rc.d/rc?.d</filename> directory where the question
99 mark is specified by the initdefault value.</para>
100
101 <para>As a convenience, the <command>rc</command> script reads a library of
102 functions in <filename class="directory">/lib/lsb/init-functions</filename>.
103 This library also reads an optional configuration file,
104 <filename>/etc/sysconfig/rc.site</filename>. Any of the system
105 configuration file parameters described in subsequent sections can be
106 alternatively placed in this file allowing consolidation of all system
107 parameters in this one file.</para>
108
109 <para>As a debugging convenience, the functions script also logs all output
110 to <filename>/run/var/bootlog</filename>. Since the <filename
111 class="directory">/run</filename> directory is a tmpfs, this file is not
112 persistent across boots, however it is appended to the more permanent file
113 <filename>/var/log/boot.log</filename> at the end of the boot process.</para>
114
115 <sect3 id="init-levels" >
116 <title>Changing Run Levels</title>
117
118 <para>Changing run-levels is done with <command>init
119 <replaceable>&lt;runlevel&gt;</replaceable></command>, where
120 <replaceable>&lt;runlevel&gt;</replaceable> is the target run-level. For example, to
121 reboot the computer, a user could issue the <command>init 6</command> command,
122 which is an alias for the <command>reboot</command> command. Likewise,
123 <command>init 0</command> is an alias for the <command>halt</command>
124 command.</para>
125
126 <para>There are a number of directories under <filename
127 class="directory">/etc/rc.d</filename> that look like <filename
128 class="directory">rc?.d</filename> (where ? is the number of the run-level) and
129 <filename class="directory">rcsysinit.d</filename>, all containing a number of
130 symbolic links. Some begin with a <emphasis>K</emphasis>, the others begin with
131 an <emphasis>S</emphasis>, and all of them have two numbers following the
132 initial letter. The K means to stop (kill) a service and the S means to start a
133 service. The numbers determine the order in which the scripts are run, from 00
134 to 99&mdash;the lower the number the earlier it gets executed. When
135 <command>init</command> switches to another run-level, the appropriate services
136 are either started or stopped, depending on the runlevel chosen.</para>
137
138 <para>The real scripts are in <filename
139 class="directory">/etc/rc.d/init.d</filename>. They do the actual work, and
140 the symlinks all point to them. K links and S links point to
141 the same script in <filename class="directory">/etc/rc.d/init.d</filename>.
142 This is because the scripts can be called with different parameters like
143 <parameter>start</parameter>, <parameter>stop</parameter>,
144 <parameter>restart</parameter>, <parameter>reload</parameter>, and
145 <parameter>status</parameter>. When a K link is encountered, the appropriate
146 script is run with the <parameter>stop</parameter> argument. When an S link
147 is encountered, the appropriate script is run with the
148 <parameter>start</parameter> argument.</para>
149
150 <para>There is one exception to this explanation. Links that start
151 with an <emphasis>S</emphasis> in the <filename
152 class="directory">rc0.d</filename> and <filename
153 class="directory">rc6.d</filename> directories will not cause anything
154 to be started. They will be called with the parameter
155 <parameter>stop</parameter> to stop something. The logic behind this
156 is that when a user is going to reboot or halt the system, nothing
157 needs to be started. The system only needs to be stopped.</para>
158
159 <para>These are descriptions of what the arguments make the scripts
160 do:</para>
161
162 <variablelist>
163
164 <varlistentry>
165 <term><parameter>start</parameter></term>
166 <listitem>
167 <para>The service is started.</para>
168 </listitem>
169 </varlistentry>
170
171 <varlistentry>
172 <term><parameter>stop</parameter></term>
173 <listitem>
174 <para>The service is stopped.</para>
175 </listitem>
176 </varlistentry>
177
178 <varlistentry>
179 <term><parameter>restart</parameter></term>
180 <listitem>
181 <para>The service is stopped and then started again.</para>
182 </listitem>
183 </varlistentry>
184
185 <varlistentry>
186 <term><parameter>reload</parameter></term>
187 <listitem>
188 <para>The configuration of the service is updated.
189 This is used after the configuration file of a service was modified, when
190 the service does not need to be restarted.</para>
191 </listitem>
192 </varlistentry>
193
194 <varlistentry>
195 <term><parameter>status</parameter></term>
196 <listitem>
197 <para>Tells if the service is running and with which PIDs.</para>
198 </listitem>
199 </varlistentry>
200
201 </variablelist>
202
203 <para>Feel free to modify the way the boot process works (after all,
204 it is your own LFS system). The files given here are an example of how
205 it can be done.</para>
206
207 </sect3>
208 </sect2>
209
210 <sect2>
211 <title>Udev Bootscripts</title>
212
213 <para>The first LFS bootscript,
214 <filename>/etc/init.d/mountvirtfs</filename> will copy any devices
215 located in <filename class="directory">/lib/udev/devices</filename> to
216 <filename class="directory">/dev</filename>. This is necessary because
217 some devices, directories, and symlinks are needed before the dynamic
218 device handling processes are available during the early stages of
219 booting a system, or are required by <command>udevd</command> itself.
220 Creating static device nodes in <filename
221 class="directory">/lib/udev/devices</filename> also provides an easy
222 workaround for devices that are not supported by the dynamic device
223 handling infrastructure.</para>
224
225 <para>The <filename>/etc/rc.d/init.d/udev</filename> initscript starts
226 <command>udevd</command>, triggers any "coldplug" devices that have
227 already been created by the kernel and waits for any rules to complete.
228 The script also unsets the uevent handler from the default of
229 <filename>/sbin/hotplug </filename>. This is done because the kernel no
230 longer needs to call out to an external binary. Instead
231 <command>udevd</command> will listen on a netlink socket for uevents that
232 the kernel raises.</para>
233
234 <para>The <command>/etc/rc.d/init.d/udev_retry</command> initscript takes
235 care of re-triggering events for subsystems whose rules may rely on
236 filesystems that are not mounted until the <command>mountfs</command>
237 script is run (in particular, <filename class="directory">/usr</filename>
238 and <filename class="directory">/var</filename> may cause this). This
239 script runs after the <command>mountfs</command> script, so those rules
240 (if re-triggered) should succeed the second time around. It is
241 configured from the <filename>/etc/sysconfig/udev_retry</filename> file;
242 any words in this file other than comments are considered subsystem names
243 to trigger at retry time. To find the subsystem of a device, use
244 <command>udevadm info --attribute-walk &lt;device&gt;</command> where
245 &lt;device&gt; is an absolute path in /dev or /sys such as /dev/sr0 or
246 /sys/class/rtc.</para>
247
248 <sect3>
249 <title>Module Loading</title>
250
251 <para>Device drivers compiled as modules may have aliases built into them.
252 Aliases are visible in the output of the <command>modinfo</command>
253 program and are usually related to the bus-specific identifiers of devices
254 supported by a module. For example, the <emphasis>snd-fm801</emphasis>
255 driver supports PCI devices with vendor ID 0x1319 and device ID 0x0801,
256 and has an alias of <quote>pci:v00001319d00000801sv*sd*bc04sc01i*</quote>.
257 For most devices, the bus driver exports the alias of the driver that
258 would handle the device via <systemitem
259 class="filesystem">sysfs</systemitem>. E.g., the
260 <filename>/sys/bus/pci/devices/0000:00:0d.0/modalias</filename> file
261 might contain the string
262 <quote>pci:v00001319d00000801sv00001319sd00001319bc04sc01i00</quote>.
263 The default rules provided with Udev will cause <command>udevd</command>
264 to call out to <command>/sbin/modprobe</command> with the contents of the
265 <envar>MODALIAS</envar> uevent environment variable (which should be the
266 same as the contents of the <filename>modalias</filename> file in sysfs),
267 thus loading all modules whose aliases match this string after wildcard
268 expansion.</para>
269
270 <para>In this example, this means that, in addition to
271 <emphasis>snd-fm801</emphasis>, the obsolete (and unwanted)
272 <emphasis>forte</emphasis> driver will be loaded if it is
273 available. See below for ways in which the loading of unwanted drivers can
274 be prevented.</para>
275
276 <para>The kernel itself is also able to load modules for network
277 protocols, filesystems and NLS support on demand.</para>
278
279 </sect3>
280
281 <sect3>
282 <title>Handling Hotpluggable/Dynamic Devices</title>
283
284 <para>When you plug in a device, such as a Universal Serial Bus (USB) MP3
285 player, the kernel recognizes that the device is now connected and
286 generates a uevent. This uevent is then handled by
287 <command>udevd</command> as described above.</para>
288
289 </sect3>
290 </sect2>
291
292 <sect2 id="ch-scripts-clock">
293 <title>Configuring the System Clock</title>
294
295 <indexterm zone="ch-scripts-clock">
296 <primary sortas="d-scripts-setclock">setclock</primary>
297 <secondary>configuring</secondary></indexterm>
298
299 <para>The <command>setclock</command> script reads the time from the hardware
300 clock, also known as the BIOS or the Complementary Metal Oxide Semiconductor
301 (CMOS) clock. If the hardware clock is set to UTC, this script will convert the
302 hardware clock's time to the local time using the
303 <filename>/etc/localtime</filename> file (which tells the
304 <command>hwclock</command> program which timezone the user is in). There is no
305 way to detect whether or not the hardware clock is set to UTC, so this
306 needs to be configured manually.</para>
307
308 <para>The <command>setclock</command> is run via
309 <application>udev</application> when the kernel detects the hardware
310 capability upon boot. It can also be run manually with the stop parameter to
311 store the system time to the CMOS clock.</para>
312
313 <para>If you cannot remember whether or not the hardware clock is set to UTC,
314 find out by running the <userinput>hwclock --localtime --show</userinput>
315 command. This will display what the current time is according to the hardware
316 clock. If this time matches whatever your watch says, then the hardware clock is
317 set to local time. If the output from <command>hwclock</command> is not local
318 time, chances are it is set to UTC time. Verify this by adding or subtracting
319 the proper amount of hours for the timezone to the time shown by
320 <command>hwclock</command>. For example, if you are currently in the MST
321 timezone, which is also known as GMT -0700, add seven hours to the local
322 time.</para>
323
324 <para>Change the value of the <envar>UTC</envar> variable below
325 to a value of <parameter>0</parameter> (zero) if the hardware clock
326 is <emphasis>not</emphasis> set to UTC time.</para>
327
328 <para>Create a new file <filename>/etc/sysconfig/clock</filename> by running
329 the following:</para>
330
331<screen><userinput>cat &gt; /etc/sysconfig/clock &lt;&lt; "EOF"
332<literal># Begin /etc/sysconfig/clock
333
334UTC=1
335
336# Set this to any options you might need to give to hwclock,
337# such as machine hardware clock type for Alphas.
338CLOCKPARAMS=
339
340# End /etc/sysconfig/clock</literal>
341EOF</userinput></screen>
342
343 <para>A good hint explaining how to deal with time on LFS is available
344 at <ulink url="&hints-root;time.txt"/>. It explains issues such as
345 time zones, UTC, and the <envar>TZ</envar> environment variable.</para>
346
347 <note><para>The CLOCKPARAMS and UTC paramaters may be alternatively set
348 in the <filename>/etc/sysconfig/rc.site</filename> file.</para></note>
349
350 </sect2>
351
352 <sect2 id="ch-scripts-console">
353 <?dbhtml filename="console.html"?>
354
355 <title>Configuring the Linux Console</title>
356
357 <indexterm zone="ch-scripts-console">
358 <primary sortas="d-console">console</primary>
359 <secondary>configuring</secondary>
360 </indexterm>
361
362 <para>This section discusses how to configure the <command>console</command>
363 bootscript that sets up the keyboard map, console font and console kernel log
364 level. If non-ASCII characters (e.g., the copyright sign, the British pound
365 sign and Euro symbol) will not be used and the keyboard is a U.S. one, much
366 of this section can be skipped. Without the configuration file, (or
367 equivalent settings in <filename>rc.site</filename>), the
368 <command>console</command> bootscript will do nothing.</para>
369
370 <para>The <command>console</command> script reads the
371 <filename>/etc/sysconfig/console</filename> file for configuration
372 information. Decide which keymap and screen font will be used. Various
373 language-specific HOWTOs can also help with this, see <ulink
374 url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. If still in
375 doubt, look in the <filename class="directory">/usr/share/keymaps</filename>
376 and <filename class="directory">/usr/share/consolefonts</filename> directories
377 for valid keymaps and screen fonts. Read <filename>loadkeys(1)</filename> and
378 <filename>setfont(8)</filename> manual pages to determine the correct
379 arguments for these programs.</para>
380
381 <para>The <filename>/etc/sysconfig/console</filename> file should contain lines
382 of the form: VARIABLE="value". The following variables are recognized:</para>
383 <variablelist>
384
385 <varlistentry>
386 <term>LOGLEVEL</term>
387 <listitem>
388 <para>This variable specifies the log level for kernel messages sent
389 to the console as set by <command>dmesg</command>. Valid levels are
390 from "1" (no messages) to "8". The default level is "7".</para>
391 </listitem>
392 </varlistentry>
393
394 <varlistentry>
395 <term>KEYMAP</term>
396 <listitem>
397 <para>This variable specifies the arguments for the
398 <command>loadkeys</command> program, typically, the name of keymap
399 to load, e.g., <quote>it</quote>. If this variable is not set, the
400 bootscript will not run the <command>loadkeys</command> program,
401 and the default kernel keymap will be used. Note that for the
402 keymaps es and pt, the parent directory should also be specified
403 (e.g. qwerty/es or query/pt) to ensure the proper keymap is
404 loaded.
405 </para>
406 </listitem>
407 </varlistentry>
408
409 <varlistentry>
410 <term>KEYMAP_CORRECTIONS</term>
411 <listitem>
412 <para>This (rarely used) variable
413 specifies the arguments for the second call to the
414 <command>loadkeys</command> program. This is useful if the stock keymap
415 is not completely satisfactory and a small adjustment has to be made. E.g.,
416 to include the Euro sign into a keymap that normally doesn't have it,
417 set this variable to <quote>euro2</quote>.</para>
418 </listitem>
419 </varlistentry>
420
421 <varlistentry>
422 <term>FONT</term>
423 <listitem>
424 <para>This variable specifies the arguments for the
425 <command>setfont</command> program. Typically, this includes the font
426 name, <quote>-m</quote>, and the name of the application character
427 map to load. E.g., in order to load the <quote>lat1-16</quote> font
428 together with the <quote>8859-1</quote> application character map
429 (as it is appropriate in the USA),
430 <!-- because of the copyright sign -->
431 set this variable to <quote>lat1-16 -m 8859-1</quote>.
432 In UTF-8 mode, the kernel uses the application character map for
433 conversion of composed 8-bit key codes in the keymap to UTF-8, and thus
434 the argument of the "-m" parameter should be set to the encoding of the
435 composed key codes in the keymap.</para>
436
437 </listitem>
438 </varlistentry>
439
440 <varlistentry>
441 <term>UNICODE</term>
442 <listitem>
443 <para>Set this variable to <quote>1</quote>, <quote>yes</quote> or
444 <quote>true</quote> in order to put the
445 console into UTF-8 mode. This is useful in UTF-8 based locales and
446 harmful otherwise.</para>
447 </listitem>
448 </varlistentry>
449
450 <varlistentry>
451 <term>LEGACY_CHARSET</term>
452 <listitem>
453 <para>For many keyboard layouts, there is no stock Unicode keymap in
454 the Kbd package. The <command>console</command> bootscript will
455 convert an available keymap to UTF-8 on the fly if this variable is
456 set to the encoding of the available non-UTF-8 keymap.</para>
457 </listitem>
458 </varlistentry>
459
460 </variablelist>
461
462 <para>Some examples:</para>
463
464 <itemizedlist>
465
466 <listitem>
467 <para>For a non-Unicode setup, only the KEYMAP and FONT variables are
468 generally needed. E.g., for a Polish setup, one would use:</para>
469<screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
470<literal># Begin /etc/sysconfig/console
471
472KEYMAP="pl2"
473FONT="lat2a-16 -m 8859-2"
474
475# End /etc/sysconfig/console</literal>
476EOF</userinput></screen>
477 </listitem>
478
479 <listitem>
480 <para>As mentioned above, it is sometimes necessary to adjust a
481 stock keymap slightly. The following example adds the Euro symbol to the
482 German keymap:</para>
483
484<screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
485<literal># Begin /etc/sysconfig/console
486
487KEYMAP="de-latin1"
488KEYMAP_CORRECTIONS="euro2"
489FONT="lat0-16 -m 8859-15"
490
491# End /etc/sysconfig/console</literal>
492EOF</userinput></screen>
493 </listitem>
494
495 <listitem>
496 <para>The following is a Unicode-enabled example for Bulgarian, where a
497 stock UTF-8 keymap exists:</para>
498
499<screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
500<literal># Begin /etc/sysconfig/console
501
502UNICODE="1"
503KEYMAP="bg_bds-utf8"
504FONT="LatArCyrHeb-16"
505
506# End /etc/sysconfig/console</literal>
507EOF</userinput></screen>
508 </listitem>
509
510 <listitem>
511 <para>Due to the use of a 512-glyph LatArCyrHeb-16 font in the previous
512 example, bright colors are no longer available on the Linux console unless
513 a framebuffer is used. If one wants to have bright colors without
514 framebuffer and can live without characters not belonging to his language,
515 it is still possible to use a language-specific 256-glyph font, as
516 illustrated below:</para>
517
518<screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
519<literal># Begin /etc/sysconfig/console
520
521UNICODE="1"
522KEYMAP="bg_bds-utf8"
523FONT="cyr-sun16"
524
525# End /etc/sysconfig/console</literal>
526EOF</userinput></screen>
527 </listitem>
528
529 <listitem>
530 <para>The following example illustrates keymap autoconversion from
531 ISO-8859-15 to UTF-8 and enabling dead keys in Unicode mode:</para>
532
533<screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
534<literal># Begin /etc/sysconfig/console
535
536UNICODE="1"
537KEYMAP="de-latin1"
538KEYMAP_CORRECTIONS="euro2"
539LEGACY_CHARSET="iso-8859-15"
540FONT="LatArCyrHeb-16 -m 8859-15"
541
542# End /etc/sysconfig/console</literal>
543EOF</userinput></screen>
544 </listitem>
545
546 <listitem>
547 <para>Some keymaps have dead keys (i.e., keys that don't produce a
548 character by themselves, but put an accent on the character produced
549 by the next key) or define composition rules (such as: <quote>press
550 Ctrl+. A E to get &AElig;</quote> in the default keymap).
551 Linux-&linux-version; interprets dead keys and composition rules in the
552 keymap correctly only when the source characters to be composed together
553 are not multibyte. This deficiency doesn't affect keymaps for European
554 languages, because there accents are added to unaccented ASCII
555 characters, or two ASCII characters are composed together. However, in
556 UTF-8 mode it is a problem, e.g., for the Greek language, where one
557 sometimes needs to put an accent on the letter <quote>alpha</quote>.
558 The solution is either to avoid the use of UTF-8, or to install the
559 X window system that doesn't have this limitation in its input
560 handling.</para>
561 </listitem>
562
563 <listitem>
564 <para>For Chinese, Japanese, Korean and some other languages, the Linux
565 console cannot be configured to display the needed characters. Users
566 who need such languages should install the X Window System, fonts that
567 cover the necessary character ranges, and the proper input method (e.g.,
568 SCIM, it supports a wide variety of languages).</para>
569 </listitem>
570
571 </itemizedlist>
572
573 <!-- Added because folks keep posting their console file with X questions
574 to blfs-support list -->
575 <note>
576 <para>The <filename>/etc/sysconfig/console</filename> file only controls
577 the Linux text console localization. It has nothing to do with setting
578 the proper keyboard layout and terminal fonts in the X Window System, with
579 ssh sessions or with a serial console. In such situations, limitations
580 mentioned in the last two list items above do not apply.</para>
581 </note>
582
583 </sect2>
584
585 <sect2 id="ch-scripts-createfiles">
586 <title>Creating Files at Boot</title>
587
588 <indexterm zone="ch-scripts-createfiles">
589 <primary sortas="d-createfiles">File creation at boot</primary>
590 <secondary>configuring</secondary>
591 </indexterm>
592
593 <para>At times, it is desired to create files at boot time. For instance,
594 the <filename class="directory">/tmp/.ICE-unix</filename> directory
595 may be desired. This can be done by creating an entry in the
596 <filename>/etc/sysconfig/createfiles</filename> configuration script.
597 The format of this file is embedded in the comments of the default
598 configuration file.</para>
599 </sect2>
600
601 <sect2 id="ch-scripts-sysklogd">
602 <title>Configuring the sysklogd Script</title>
603
604 <indexterm zone="ch-scripts-sysklogd">
605 <primary sortas="d-sysklogd">sysklogd</primary>
606 <secondary>configuring</secondary>
607 </indexterm>
608
609 <para>The <filename>sysklogd</filename> script invokes the
610 <command>syslogd</command> program as a part of System V initialization. The
611 <parameter>-m 0</parameter> option turns off the periodic timestamp mark that
612 <command>syslogd</command> writes to the log files every 20 minutes by
613 default. If you want to turn on this periodic timestamp mark, edit
614 <filename>/etc/sysconfig/rc.site</filename> and define the variable
615 SYSKLOGD_PARMS to the desired value. For instance, to remove all parameters,
616 set the variable to a null value:</para>
617
618<screen role="nodump">SYSKLOGD_PARMS=</screen>
619
620 <para>See <userinput>man syslogd</userinput> for more options.</para>
621
622 </sect2>
623
624 <sect2 id="ch-scripts-site">
625 <title>The rc.site File</title>
626
627 <indexterm zone="ch-scripts-site">
628 <primary sortas="a-rc.site">rc.site</primary>
629 </indexterm>
630
631 <para>The optional <filename>/etc/sysconfig/rc.site</filename> file contains
632 settings that are automatically set for each SystemV boot script. It can
633 alternatively set the values specified in the <filename>hostname</filename>,
634 <filename>console</filename>, and <filename>clock</filename> files in the
635 <filename class='directory'>/etc/sysconfig/</filename> directory. If the
636 associated variables are present in both these separate files and
637 <filename>rc.site</filename>, the values in the script specific files have
638 precedence. </para>
639
640 <para><filename>rc.site</filename> also contains parameters that can
641 customize other aspects of the boot process. Setting the IPROMPT variable
642 will enable selective running of bootscripts. Other options are described
643 in the file comments. The default version of the file is as follows:</para>
644
645 <!-- Use role to fix a pdf generation problem -->
646 <screen role="auto">&site;</screen>
647
648 <sect3>
649 <title>Customizing the Boot and Shutdown Scripts</title>
650
651 <para>The LFS boot scripts boot and shut down a system in a fairly
652 efficient manner, but there are a few tweaks that you can make in the
653 rc.site file to improve speed even more and to adjust messages according
654 to your preferences. To do this, adjust the settings in
655 the <filename>/etc/sysconfig/rc.site</filename> file above.</para>
656
657 <itemizedlist>
658
659 <listitem><para>During the boot script <filename>udev</filename>, there is
660 a call to <command>udev settle</command> that requires some time to
661 complete. This time may or may not be required depending on devices present
662 in the system. If you only have simple partitions and a single ethernet
663 card, the boot process will probably not need to wait for this command. To
664 skip it, set the variable OMIT_UDEV_SETTLE=y.</para></listitem>
665
666 <listitem><para>The boot script <filename>udev_retry</filename> also runs
667 <command>udev settle</command> by default. This command is only needed by
668 default if the <filename class='directory'>/var</filename> directory is
669 separately mounted. This is because the clock needs the file
670 <filename>/var/lib/hwclock/adjtime</filename>. Other customizations may
671 also need to wait for udev to complete, but in many installations it is not
672 needed. Skip the command by setting the variable OMIT_UDEV_RETRY_SETTLE=y.
673 </para></listitem>
674
675 <listitem><para>By default, the file system checks are silent. This can
676 appear to be a delay during the bootup process. To turn on the
677 <command>fsck</command> output, set the variable VERBOSE_FSCK=y.
678 </para></listitem>
679
680 <listitem><para>When rebooting, you may want to skip the filesystem check,
681 <command>fsck</command>, completely. To do this, either create the file
682 <filename>/fastboot</filename> or reboot the system with the command
683 <command>/sbin/shutdown -f -r now</command>. On the other hand, you can
684 force all file systems to be checked by creating
685 <filename>/forcefsck</filename> or running <command>shutdown</command> with
686 the <parameter>-F</parameter> parameter instead of <parameter>-f</parameter>.
687 </para>
688
689 <para>Setting the variable FASTBOOT=y will disable <command>fsck</command>
690 during the boot process until it is removed. This is not recommended
691 on a permanent basis.</para></listitem>
692
693 <listitem><para>Normally, all files in the <filename
694 class='directory'>/tmp</filename> directory are deleted at boot time.
695 Depending on the number of files or directories present, this can cause a
696 noticeable delay in the boot process. To skip removing these files set the
697 variable SKIPTMPCLEAN=y.</para></listitem>
698
699 <listitem><para>During shutdown, the <command>init</command> program sends
700 a TERM signal to each program it has started (e.g. agetty), waits for a set
701 time (default 3 seconds), and sends each process a KILL signal and waits
702 again. This process is repeated in the <command>sendsignals</command>
703 script for any processes that are not shut down by their own scripts. The
704 delay for <command>init</command> can be set by passing a parameter. For
705 example to remove the delay in <command>init</command>, pass the -t0
706 parameter when shutting down or rebooting (e.g. <command>/sbin/shutdown
707 -t0 -r now</command>). The delay for the <command>sendsignals</command>
708 script can be skipped by setting the parameter
709 KILLDELAY=0.</para></listitem>
710
711 </itemizedlist>
712
713 </sect3>
714 </sect2>
715</sect1>
Note: See TracBrowser for help on using the repository browser.