Changeset 676d923 in clfs-sysroot for BOOK/bootscripts/common
- Timestamp:
- Mar 15, 2009, 2:42:22 PM (16 years ago)
- Branches:
- master
- Children:
- 10658db
- Parents:
- 1970967
- Location:
- BOOK/bootscripts/common
- Files:
-
- 1 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/bootscripts/common/bootscripts.xml
r1970967 r676d923 9 9 <?dbhtml filename="bootscripts.html"?> 10 10 11 <title> CLFS-Bootscripts-&clfs-bootscripts-version;</title>11 <title>Bootscripts for CLFS &bootscripts-clfs-version;</title> 12 12 13 13 <indexterm zone="ch-scripts-bootscripts"> … … 18 18 <title/> 19 19 20 <para>The CLFS-Bootscripts package contains a set of scripts to20 <para>The Bootscripts package contains a set of scripts to 21 21 start/stop the CLFS system at bootup/shutdown.</para> 22 22 … … 24 24 25 25 <sect2 role="installation"> 26 <title>Installation of CLFS-Bootscripts</title> 27 28 <para>Install the package:</para> 29 30 <screen><userinput>make DESTDIR=${CLFS} install-bootscripts</userinput></screen> 26 <title>Installation of Bootscripts</title> 27 28 <para os="a">Install the package:</para> 29 30 <screen os="b"><userinput>make DESTDIR="${CLFS}" install-bootscripts</userinput></screen> 31 32 <para os="c">You can will need to run the following command to install support for Networking:</para> 33 34 <screen os="d"><userinput>make DESTDIR="${CLFS}" install-network</userinput></screen> 31 35 32 36 </sect2> 33 37 34 38 <sect2 id="contents-bootscripts" role="content"> 35 <title>Contents of CLFS-Bootscripts</title>39 <title>Contents of Bootscripts</title> 36 40 37 41 <segmentedlist> … … 41 45 <seg>checkfs, cleanfs, console, functions, halt, ifdown, 42 46 ifup, localnet, mountfs, mountkernfs, network, rc, reboot, sendsignals, 43 setclock, static, swap, sysklogd, and template.</seg>47 setclock, static, swap, sysklogd, template, and udev.</seg> 44 48 </seglistitem> 45 49 </segmentedlist> … … 258 262 </varlistentry> 259 263 264 <varlistentry id="udev-bootscripts"> 265 <term><command>udev</command></term> 266 <listitem> 267 <para>Starts and stops the Udev daemon</para> 268 <indexterm zone="ch-scripts-bootscripts udev-bootscripts"> 269 <primary sortas="d-udev">udev</primary> 270 </indexterm> 271 </listitem> 272 </varlistentry> 273 260 274 </variablelist> 261 275 -
BOOK/bootscripts/common/console.xml
r1970967 r676d923 14 14 <secondary>configuring</secondary></indexterm> 15 15 16 <para>This section discusses how to configure the <command> console</command>16 <para>This section discusses how to configure the <command>i18n</command> 17 17 bootscript that sets up the keyboard map and the console font. If non-ASCII 18 18 characters (e.g., the British pound sign and Euro character) will not be … … 21 21 nothing.</para> 22 22 23 <para>The <command> console</command> script reads the24 <filename>/etc/sysconfig/ console</filename> file for configuration23 <para>The <command>i18n</command> script reads the 24 <filename>/etc/sysconfig/i18n</filename> file for configuration 25 25 information. Decide which keymap and screen font will be used. Various 26 26 language-specific HOWTO's can also help with this (see <ulink 27 27 url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. A pre-made 28 <filename>/etc/sysconfig/ console</filename> file with known settings for28 <filename>/etc/sysconfig/i18n</filename> file with known settings for 29 29 several countries was installed with the CLFS-Bootscripts package, so the 30 30 relevant section can be uncommented if the country is supported. If still 31 in doubt, look in the <filename class="directory">/lib/kbd</filename> 32 directory for valid keymaps and screen fonts. Read 33 <filename>loadkeys(1)</filename> and <filename>setfont(8)</filename> to 34 determine the correct arguments for these programs. Once decided, create 35 the configuration file with the following command:</para> 31 in doubt, look in the <filename class="directory">/usr/share/consolefonts</filename> 32 for valid screen fonts and <filename class="directory">/usr/share/keymaps</filename> 33 for valid keymaps.</para> 36 34 37 <screen><userinput>cat >${CLFS}/etc/sysconfig/console <<"EOF" 38 <literal>KEYMAP="<replaceable>[arguments for loadkeys]</replaceable>" 39 FONT="<replaceable>[arguments for setfont]</replaceable>"</literal> 40 EOF</userinput></screen> 41 42 <para>For example, for Spanish users who also want to use the Euro 43 character (accessible by pressing AltGr+E), the following settings are 44 correct:</para> 45 46 <screen><userinput>cat >${CLFS}/etc/sysconfig/console <<"EOF" 47 <literal>KEYMAP="es euro2" 48 FONT="lat9-16 -u iso01"</literal> 49 EOF</userinput></screen> 50 51 <note> 52 <para>The <envar>FONT</envar> line above is correct only for the ISO 53 8859-15 character set. If using ISO 8859-1 and, therefore, a pound sign 54 instead of Euro, the correct <envar>FONT</envar> line would be:</para> 55 56 <screen><userinput>FONT="lat1-16"</userinput></screen> 57 58 </note> 59 60 <para>If the <envar>KEYMAP</envar> or <envar>FONT</envar> variable is not 61 set, the <command>console</command> initscript will not run the 62 corresponding program.</para> 63 64 <para>In some keymaps, the Backspace and Delete keys send characters 65 different from ones in the default keymap built into the kernel. This 66 confuses some applications. For example, Emacs displays its help (instead 67 of erasing the character before the cursor) when Backspace is pressed. 68 To check if the keymap in use is affected (this works only for i386 69 keymaps):</para> 70 71 <screen><userinput>zgrep '\W14\W' <replaceable>[/path/to/your/keymap]</replaceable></userinput></screen> 72 73 <para>If the keycode 14 is Backspace instead of Delete, create the 74 following keymap snippet to fix this issue:</para> 75 76 <screen><userinput>mkdir -p ${CLFS}/etc/kbd && cat > ${CLFS}/etc/kbd/bs-sends-del <<"EOF" 77 <literal> keycode 14 = Delete Delete Delete Delete 78 alt keycode 14 = Meta_Delete 79 altgr alt keycode 14 = Meta_Delete 80 keycode 111 = Remove 81 altgr control keycode 111 = Boot 82 control alt keycode 111 = Boot 83 altgr control alt keycode 111 = Boot</literal> 84 EOF</userinput></screen> 85 86 <para>Tell the <command>console</command> script to load this 87 snippet after the main keymap:</para> 88 89 <screen><userinput>cat >> ${CLFS}/etc/sysconfig/console <<"EOF" 90 <literal>KEYMAP_CORRECTIONS="/etc/kbd/bs-sends-del"</literal> 91 EOF</userinput></screen> 35 <para>The default <filename>/etc/sysconfig/i18n</filename> is set up for UTF-8 36 using the us keymap. You will need to edit the file to your specific needs. 37 The <filename>/etc/sysconfig/i18n</filename> has additional information it to 38 help you to assist in configuring.</para> 92 39 93 40 </sect1> -
BOOK/bootscripts/common/profile.xml
r1970967 r676d923 18 18 files to help create an environment to run in. Each file has a 19 19 specific use and may affect login and interactive environments 20 differently. The files in the <filename 21 class="directory">/etc</filename> directory provide global settings. 22 If an equivalent file exists in the home directory, it may override 23 the global settings.</para> 20 differently. The files in the <filename class="directory">/etc</filename> 21 directory provide global settings. If an equivalent file exists in the 22 home directory, it may override the global settings.</para> 24 23 25 24 <para>An interactive login shell is started after a successful login, … … 33 32 34 33 <para>For more information, see <command>info bash</command> under the 35 <emphasis>Bash Startup Files and Interactive Shells</emphasis> section.</para> 34 <emphasis>Bash Startup Files and Interactive Shells</emphasis> section, 35 and <ulink url="&cblfs-root;index.php/Bash_Startup_Files">Bash Startup 36 Files</ulink> in CBLFS.</para> 36 37 37 38 <para>The files <filename>/etc/profile</filename> and 38 39 <filename>~/.bash_profile</filename> are read when the shell is 39 invoked as an interactive login shell.</para> 40 41 <para>The base <filename>/etc/profile</filename> below sets some 42 environment variables necessary for native language support. Setting 43 them properly results in:</para> 44 45 <itemizedlist> 46 <listitem> 47 <para>The output of programs translated into the native language</para> 48 </listitem> 49 <listitem> 50 <para>Correct classification of characters into letters, digits and 51 other classes. This is necessary for <command>bash</command> to 52 properly accept non-ASCII characters in command lines in non-English 53 locales</para> 54 </listitem> 55 <listitem> 56 <para>The correct alphabetical sorting order for the country</para> 57 </listitem> 58 <listitem> 59 <para>Appropriate default paper size</para> 60 </listitem> 61 <listitem> 62 <para>Correct formatting of monetary, time, and date values</para> 63 </listitem> 64 </itemizedlist> 65 66 <para>This script also sets the <envar>INPUTRC</envar> environment variable 67 that makes Bash and Readline use the <filename>/etc/inputrc</filename> file 68 created earlier.</para> 69 70 <para>Replace <replaceable>[ll]</replaceable> below with the 71 two-letter code for the desired language (e.g., <quote>en</quote>) and 72 <replaceable>[CC]</replaceable> with the two-letter code for the 73 appropriate country (e.g., <quote>GB</quote>). 74 <replaceable>[charmap]</replaceable> should be replaced with the 75 canonical charmap for your chosen locale.</para> 76 77 <para>The list of all locales supported by Glibc can be obtained by running 78 the following command:</para> 79 80 <screen role="nodump"><userinput>locale -a</userinput></screen> 81 82 <para>Locales can have a number of synonyms, e.g. <quote>ISO-8859-1</quote> 83 is also referred to as <quote>iso8859-1</quote> and <quote>iso88591</quote>. 84 Some applications cannot handle the various synonyms correctly, so it is 85 safest to choose the canonical name for a particular locale. To determine 86 the canonical name, run the following command, where <replaceable>[locale 87 name]</replaceable> is the output given by <command>locale -a</command> for 88 your preferred locale (<quote>en_GB.iso88591</quote> in our example).</para> 89 90 <screen role="nodump"><userinput>LC_ALL=<replaceable>[locale name]</replaceable> locale charmap</userinput></screen> 91 92 <para>For the <quote>en_GB.iso88591</quote> locale, the above command 93 will print:</para> 94 95 <screen><computeroutput>ISO-8859-1</computeroutput></screen> 96 97 <para>This results in a final locale setting of <quote>en_GB.ISO-8859-1</quote>. 98 It is important that the locale found using the heuristic above is tested prior 99 to it being added to the Bash startup files:</para> 100 101 <screen role="nodump"><userinput>LC_ALL=[locale name] locale country 102 LC_ALL=[locale name] locale language 103 LC_ALL=[locale name] locale charmap 104 LC_ALL=[locale name] locale int_curr_symbol 105 LC_ALL=[locale name] locale int_prefix</userinput></screen> 106 107 <para>The above commands should print the country and language names, the 108 character encoding used by the locale, the local currency and the prefix 109 to dial before the telephone number in order to get into the country. If 110 any of the commands above fail with a message similar to the one shown 111 below, this means that your locale was either not installed in Chapter 6 112 or is not supported by the default installation of Glibc.</para> 113 114 <screen><computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput></screen> 115 116 <para>If this happens, you should either install the desired locale using 117 the <command>localedef</command> command, or consider choosing a different 118 locale. Further instructions assume that there are no such error messages 119 from Glibc.</para> 120 121 <para>Some packages beyond CLFS may also lack support for your chosen locale. 122 One example is the X library (part of the X Window System), which outputs 123 the following error message:</para> 124 125 <screen><computeroutput>Warning: locale not supported by Xlib, locale set to C</computeroutput></screen> 126 127 <para>Sometimes it is possible to fix this by removing the charmap part of 128 the locale specification, as long as that does not change the character map 129 that Glibc associates with the locale (this can be checked by running the 130 <command>locale charmap</command> command in both locales). For example, 131 one would have to change "de_DE.ISO-8859-15@euro" to 132 "de_DE@euro" in order to get this locale recognized by Xlib.</para> 133 134 <para>Other packages can also function incorrectly (but may not necessarily 135 display any error messages) if the locale name does not meet their expectations. 136 In those cases, investigating how other Linux distributions support your locale 137 might provide some useful information.</para> 138 139 <para>Once the proper locale settings have been determined, create the 140 <filename>/etc/profile</filename> file:</para> 141 142 <screen><userinput>cat > ${CLFS}/etc/profile << "EOF" 143 <literal># Begin /etc/profile 144 145 export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable> 146 export INPUTRC=/etc/inputrc 147 148 # End /etc/profile</literal> 149 EOF</userinput></screen> 150 151 <note> 152 <para>The <quote>C</quote> (default) and <quote>en_US</quote> 153 (the recommended one for United States English users) locales are 154 different.</para> 155 </note> 156 157 <para>Setting the keyboard layout, screen font, and locale-related 158 environment variables are the only internationalization steps needed to 159 support locales that use ordinary single-byte encodings and left-to-right 160 writing direction. More complex cases (including UTF-8 based locales) 161 require additional steps and additional patches because many applications 162 tend to not work properly under such conditions. These steps and patches 163 are not included in the CLFS book and such locales are not yet supported 164 by CLFS.</para> 40 invoked as an interactive login shell. In the next section, a base 41 <filename>/etc/profile</filename> will be created to set up locale 42 information.</para> 165 43 166 44 </sect1> -
BOOK/bootscripts/common/setclock.xml
r1970967 r676d923 39 39 is <emphasis>not</emphasis> set to UTC time.</para> 40 40 41 <para os="d">Create a new file <filename> ${CLFS}/etc/sysconfig/clock</filename> by running41 <para os="d">Create a new file <filename>/etc/sysconfig/clock</filename> by running 42 42 the following:</para> 43 43 -
BOOK/bootscripts/common/symlinks.xml
r1970967 r676d923 24 24 run a command similar to the following:</para> 25 25 26 <screen role="nodump"><userinput>udev test /sys/block/hdd</userinput></screen>26 <screen role="nodump"><userinput>udevadm test /sys/block/hdd</userinput></screen> 27 27 28 28 <para>Look at the lines containing the output of various *_id programs.</para> … … 99 99 fixable by creating udev rules for custom persistent symlinks. 100 100 The case of network cards is covered separately in 101 <xref linkend="ch -scripts-network"/>, and sound card configuration can101 <xref linkend="chapter-network"/>, and sound card configuration can 102 102 be found in <ulink url="&cblfs-root;">CBLFS</ulink>.</para> 103 103 … … 113 113 vendor and product IDs and/or serial numbers work):</para> 114 114 115 <screen role="nodump"><userinput>udev info -a -p /sys/class/video4linux/video0</userinput></screen>115 <screen role="nodump"><userinput>udevadm info -a -p /sys/class/video4linux/video0</userinput></screen> 116 116 117 117 <para>Then write rules that create the symlinks, e.g.:</para> -
BOOK/bootscripts/common/udev.xml
r1970967 r676d923 135 135 it will default permissions to <emphasis>660</emphasis> and ownership to 136 136 <emphasis>root:root</emphasis>. Documentation on the syntax of the Udev 137 rules configuration files areavailable in137 rules configuration files is available in 138 138 <filename>/usr/share/doc/udev-&udev-version;/index.html</filename></para> 139 139 … … 155 155 might contain the string 156 156 <quote>pci:v00001319d00000801sv00001319sd00001319bc04sc01i00</quote>. 157 The rules that CLFS installs will cause <command>udevd</command> to call158 out to <command>/sbin/modprobe</command> with the contents of the157 The default rules provided by Udev will cause <command>udevd</command> 158 to call out to <command>/sbin/modprobe</command> with the contents of the 159 159 <envar>MODALIAS</envar> uevent environment variable (that should be the 160 160 same as the contents of the <filename>modalias</filename> file in sysfs), … … 268 268 example, a poorly-writen rule can match both a SCSI disk (as desired) 269 269 and the corresponding SCSI generic device (incorrectly) by vendor. 270 Find the offending rule and make it more specific.</para> 270 Find the offending rule and make it more specific, with the help of 271 <command>udevadm info</command>.</para> 271 272 272 273 </sect3> … … 317 318 serial number or the output of various *_id utilities installed by Udev. 318 319 See <xref linkend="ch-scripts-symlinks"/> and 319 <xref linkend="ch -scripts-network"/> for examples.</para>320 <xref linkend="chapter-network"/> for examples.</para> 320 321 321 322 </sect3> … … 337 338 338 339 <listitem> 339 <para remap="verbatim">udev FAQ340 <ulink url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ"/></para>341 </listitem>342 343 <listitem>344 340 <para remap="verbatim">The <systemitem class="filesystem">sysfs</systemitem> Filesystem 345 341 <ulink url="http://www.kernel.org/pub/linux/kernel/people/mochel/doc/papers/ols-2005/mochel.pdf"/></para>
Note:
See TracChangeset
for help on using the changeset viewer.