OSDN Git Service

[lfsja-git] r12.0-92 対応。
[lfsbookja/lfsja-git.git] / src / chapter07 / chroot.ch
1 %
2 % This is part of LFSbookja package.
3 %
4 % This is a CTIE change file for the original XML source of the LFSbook.
5 %
6 @x
7 <?xml version="1.0" encoding="ISO-8859-1"?>
8 @y
9 <?xml version="1.0" encoding="UTF-8"?>
10 @z
11
12 @x
13   <title>Entering the Chroot Environment</title>
14 @y
15   <title>Chroot 環境への移行</title>
16 @z
17
18 @x
19   <para>Now that all the packages which are required to build the rest of the
20   needed tools are on the system, it is time to enter the chroot environment and
21   finish installing the temporary tools. This environment will also be
22   used to install the final system. As user <systemitem
23   class="username">root</systemitem>, run the following command to enter the
24   environment that is, at the moment, populated with nothing but temporary
25   tools:</para>
26 @y
27   <para>
28   残るツール類をビルドするために必要なパッケージは、ここまでにすべてビルドしました。
29   そこで chroot 環境に入って、一時的ツールのインストールを済ませます。
30   この環境は、最終システムに向けたインストールを行う際にも用います。
31   <systemitem class="username">root</systemitem> ユーザーになって以下のコマンドを実行します。
32   chroot 環境内は、この時点では一時的なツール類のみが利用可能な状態です。
33   </para>
34 @z
35
36 @x
37     If you don't want to use all available logical cores, replace
38     <replaceable>$(nproc)</replaceable> with the number of logical cores you
39     want to use for building packages in this chapter and the following
40     chapters.  The test suites of some packages (notably Autoconf, Libtool,
41     and Tar) in &ch-final; are not affected by <envar>MAKEFLAGS</envar>, they
42     use a <envar>TESTSUITEFLAGS</envar> environment variable instead. We
43     set that here as well for running these test suites with multiple cores.
44 @y
45     本章と次章のパッケージビルドにおいて、論理コアをすべて利用したくない場合、<replaceable>$(nproc)</replaceable> の部分は、利用したい論理コア数に書き換えてください。
46     &ch-final; において(特に Autoconf、Libtool、Tar など)は、テストスイートにおいて <envar>MAKEFLAGS</envar> を参照しないものがあり、そこでは環境変数 <envar>TESTSUITEFLAGS</envar> が代わりに用いられています。
47     そこでここでは同様にして、テストスイートを複数コアにより実行するための設定も行います。
48 @z
49
50 @x
51   <para>The <parameter>-i</parameter> option given to the <command>env</command>
52   command will clear all the variables in the chroot environment. After that, only
53   the <envar>HOME</envar>, <envar>TERM</envar>, <envar>PS1</envar>, and
54   <envar>PATH</envar> variables are set again. The
55   <parameter>TERM=$TERM</parameter> construct sets the <envar>TERM</envar>
56   variable inside chroot to the same value as outside chroot. This variable is
57   needed so programs like <command>vim</command> and <command>less</command>
58   can operate properly.  If other variables are desired, such as
59   <envar>CFLAGS</envar> or <envar>CXXFLAGS</envar>, this is a good place to set
60   them.</para>
61 @y
62   <para>
63   <command>env</command> コマンドの <parameter>-i</parameter> パラメーターは、chroot 環境での変数定義をすべてクリアするものです。
64   そして <envar>HOME</envar>, <envar>TERM</envar>, <envar>PS1</envar>, <envar>PATH</envar> という変数だけここで定義し直します。
65   <parameter>TERM=$TERM</parameter> は chroot 環境に入る前と同じ値を <envar>TERM</envar> 変数に与えます。
66   この設定は <command>vim</command> や <command>less</command> のようなプログラムの処理が適切に行われるために必要となります。
67   これ以外の変数として <envar>CFLAGS</envar> や <envar>CXXFLAGS</envar> などが必要であれば、ここで定義しておくと良いでしょう。
68   </para>
69 @z
70
71 @x
72   <para>From this point on, there is no need to use the
73   <envar>LFS</envar> variable any more because all work will be restricted
74   to the LFS file system; the <command>chroot</command> command runs the
75   Bash shell with the root
76   (<filename class="directory">/</filename>) directory set to
77   <filename class='directory'>$LFS</filename>.</para>
78 @y
79   <para>
80   ここから先は <envar>LFS</envar> 変数は不要となります。
81   すべての作業は LFS ファイルシステム内で行っていくことになるからです。
82   <command>chroot</command> コマンドは、<filename class="directory">$LFS</filename> ディレクトリがルート (<filename class="directory">/</filename> ディレクトリ) となるようにして Bash シェルを起動します。
83   </para>
84 @z
85
86 @x
87   <para>Notice that <filename class="directory">/tools/bin</filename> is not
88   in the <envar>PATH</envar>. This means that the cross toolchain will no longer be
89   used.</para>
90 @y
91   <para>
92   <filename class="directory">/tools/bin</filename> が <envar>PATH</envar> 内には存在しません。
93   つまりクロスチェーンは、もはや利用しないということです。
94   </para>
95 @z
96
97 @x
98   <para>Also note that the <command>bash</command> prompt will say
99   <computeroutput>I have no name!</computeroutput> This is normal because the
100   <filename>/etc/passwd</filename> file has not been created yet.</para>
101 @y
102   <para>
103   <command>bash</command> のプロンプトに <computeroutput>I have no name!</computeroutput> と表示されますがこれは正常です。
104   この時点ではまだ <filename>/etc/passwd</filename> を生成していないからです。
105   </para>
106 @z
107
108 @x
109     <para>It is important that all the commands throughout the remainder of this
110     chapter and the following chapters are run from within the chroot
111     environment. If you leave this environment for any reason (rebooting for
112     example), ensure that the virtual kernel filesystems are mounted as
113     explained in <xref linkend="ch-tools-bindmount"/> and <xref
114     linkend="ch-tools-kernfsmount"/> and enter chroot again before continuing
115     with the installation.</para>
116 @y
117   <para>
118   本章のこれ以降と次章では、すべてのコマンドを chroot 環境内にて実行することが必要です。
119   例えばシステムを再起動する場合のように chroot 環境からいったん抜け出した場合には、<xref
120   linkend="ch-tools-bindmount"/>と <xref linkend="ch-tools-kernfsmount"/>にて説明した仮想カーネルファイルシステムがマウントされていることを確認してください。
121   そして chroot 環境に入り直してからインストール作業を再開してください。
122   </para>
123 @z