source: clfs-sysroot/BOOK/bootscripts/common/console.xml @ 586feb7

Last change on this file since 586feb7 was 586feb7, checked in by Joe Ciccone <jciccone@…>, 17 years ago

Updated the bootscripts package and make LFS to CLFS updates.

  • Property mode set to 100644
File size: 5.2 KB
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3  "" [
4  <!ENTITY % general-entities SYSTEM "../../general.ent">
5  %general-entities;
8<sect1 id="ch-scripts-console">
9  <?dbhtml filename="console.html"?>
10  <title>Configuring the Linux Console</title>
12  <indexterm zone="ch-scripts-console">
13    <primary sortas="d-console">console</primary>
14  <secondary>configuring</secondary></indexterm>
16  <para>This section discusses how to configure the <command>console</command>
17  bootscript that sets up the keyboard map and the console font. If non-ASCII
18  characters (e.g., the British pound sign and Euro character) will not be
19  used and the keyboard is a U.S. one, skip this section. Without the
20  configuration file, the <command>console</command> bootscript will do
21  nothing.</para>
23  <para>The <command>console</command> script reads the
24  <filename>/etc/sysconfig/console</filename> file for configuration
25  information. Decide which keymap and screen font will be used. Various
26  language-specific HOWTO's can also help with this (see <ulink
27  url=""/>. A pre-made
28  <filename>/etc/sysconfig/console</filename> file with known settings for
29  several countries was installed with the LFS-Bootscripts package, so the
30  relevant section can be uncommented if the country is supported. If still
31  in doubt, look in the <filename class="directory">/usr/share/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>
37<screen><userinput>cat &gt;${CLFS}/etc/sysconfig/console &lt;&lt;"EOF"
38<literal>KEYMAP="<replaceable>[arguments for loadkeys]</replaceable>"
39FONT="<replaceable>[arguments for setfont]</replaceable>"</literal>
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>
46<screen><userinput>cat &gt;${CLFS}/etc/sysconfig/console &lt;&lt;"EOF"
47<literal>KEYMAP="es euro2"
48FONT="lat9-16 -u iso01"</literal>
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>
58  </note>
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>
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>
71<screen><userinput>zgrep '\W14\W' <replaceable>[/path/to/your/keymap]</replaceable></userinput></screen>
73  <para>If the keycode 14 is Backspace instead of Delete, create the
74  following keymap snippet to fix this issue:</para>
76<screen><userinput>mkdir -p ${CLFS}/etc/kbd &amp;&amp; cat &gt; ${CLFS}/etc/kbd/bs-sends-del &lt;&lt;"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
83altgr control alt keycode 111 = Boot</literal>
86  <para>Tell the <command>console</command> script to load this
87  snippet after the main keymap:</para>
89<screen><userinput>cat &gt;&gt; ${CLFS}/etc/sysconfig/console &lt;&lt;"EOF"
93  <para>To compile the keymap directly into the kernel instead of setting it
94  every time from the <command>console</command> bootscript, follow the
95  instructions given in <xref linkend="ch-bootable-kernel" role="."/> Doing
96  this ensures that the keyboard will always work as expected, even when
97  booting into maintenance mode (by passing <option>init=/bin/sh</option> to
98  the kernel), because the <command>console</command> bootscript will not be
99  run in that situation. Additionally, the kernel will not set the screen font
100  automatically. This should not pose many problems because ASCII characters
101  will be handled correctly, and it is unlikely that a user would need to rely
102  on non-ASCII characters while in maintenance mode.</para>
104  <para>Since the kernel will set up the keymap, it is possible to omit the
105  <envar>KEYMAP</envar> variable from the
106  <filename>/etc/sysconfig/console</filename> configuration file. It can
107  also be left in place, if desired, without consequence. Keeping it could
108  be beneficial if running several different kernels where it is difficult
109  to ensure that the keymap is compiled into every one of them.</para>
Note: See TracBrowser for help on using the repository browser.