| 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 |
% $Author$ |
| 7 |
% $Rev$ |
| 8 |
% $Date:: $ |
| 9 |
% |
| 10 |
@x |
| 11 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
| 12 |
@y |
| 13 |
<?xml version="1.0" encoding="UTF-8"?> |
| 14 |
@z |
| 15 |
|
| 16 |
@x |
| 17 |
<title>How to Build an LFS System</title> |
| 18 |
@y |
| 19 |
<title>LFS をどうやって作るか</title> |
| 20 |
@z |
| 21 |
|
| 22 |
@x |
| 23 |
<para>The LFS system will be built by using an already installed |
| 24 |
Linux distribution (such as Debian, OpenMandriva, Fedora, or openSUSE). This |
| 25 |
existing Linux system (the host) will be used as a starting point to |
| 26 |
provide necessary programs, including a compiler, linker, and shell, |
| 27 |
to build the new system. Select the <quote>development</quote> option |
| 28 |
during the distribution installation to be able to access these |
| 29 |
tools.</para> |
| 30 |
@y |
| 31 |
<para> |
| 32 |
LFS システムは、既にインストールされている Linux ディストリビューション (Debian、OpenMandriva、Fedora、openSUSE など) を利用して構築していきます。 |
| 33 |
この既存の Linux システム(ホスト)は、LFS 構築のためにさまざまなプログラム類を利用する基盤となります。 |
| 34 |
プログラム類とはコンパイラー、リンカー、シェルなどです。 |
| 35 |
したがってそのディストリビューションのインストール時には<quote>開発 (development)</quote>オプションを選択し、それらのプログラム類が利用できるようにしておく必要があります。 |
| 36 |
</para> |
| 37 |
@z |
| 38 |
|
| 39 |
@x |
| 40 |
<para>As an alternative to installing a separate distribution onto your |
| 41 |
machine, you may wish to use <!-- the Linux From Scratch LiveCD or --> a LiveCD from a |
| 42 |
commercial distribution. <!-- The LFS LiveCD works well as a host system, |
| 43 |
providing all the tools you need to successfully follow the instructions in |
| 44 |
this book. The LiveCD version is behind the current book, but is still useful |
| 45 |
as a host for building the current book. The <quote>-nosrc</quote> or |
| 46 |
<quote>-min</quote> editions of the LiveCD are the most appropriate for |
| 47 |
building a current LFS system. For more information about the LFS LiveCD or |
| 48 |
to download a copy, visit <ulink url="&livecd-root;"/>. --></para> |
| 49 |
@y |
| 50 |
<para> |
| 51 |
コンピューター内にインストールされているディストリビューションを利用するのではなく、他に提供されている LiveCD を利用することもできます。 |
| 52 |
</para> |
| 53 |
@z |
| 54 |
|
| 55 |
@x |
| 56 |
<para>The LFS LiveCD might not work on newer hardware configurations, |
| 57 |
failing to boot or failing to detect some devices such as some SATA hard |
| 58 |
drives.</para> |
| 59 |
@y |
| 60 |
<para> |
| 61 |
LFS LiveCD は最近のハードウェア環境において、うまく動作しないかもしれません。 |
| 62 |
ブートに失敗したり SATA ハードドライブのようなデバイス検出に失敗したりすることがあります。 |
| 63 |
</para> |
| 64 |
@z |
| 65 |
|
| 66 |
@x |
| 67 |
<para><xref linkend="chapter-partitioning"/> of this book describes how |
| 68 |
to create a new Linux native partition and file system. This is the place |
| 69 |
where the new LFS system will be compiled and installed. <xref |
| 70 |
linkend="chapter-getting-materials"/> explains which packages and |
| 71 |
patches need to be downloaded to build an LFS system and how to store |
| 72 |
them on the new file system. <xref linkend="chapter-final-preps"/> |
| 73 |
discusses the setup of an appropriate working environment. Please read |
| 74 |
<xref linkend="chapter-final-preps"/> carefully as it explains several |
| 75 |
important issues you need be aware of before beginning to |
| 76 |
work your way through <xref linkend="chapter-cross-tools"/> and beyond.</para> |
| 77 |
@y |
| 78 |
<para> |
| 79 |
<xref linkend="chapter-partitioning"/>では、新しく構築する Linux のためのパーティションとファイルシステムの生成方法について説明します。 |
| 80 |
そのパーティション上にて LFS システムをコンパイルしインストールします。 |
| 81 |
<xref linkend="chapter-getting-materials"/>では LFS 構築に必要となるパッケージとパッチについて説明します。 |
| 82 |
これらをダウンロードして新たなファイルシステム内に保存します。 |
| 83 |
<xref linkend="chapter-final-preps"/>は作業環境の準備について述べています。 |
| 84 |
この章では重要な説明を行っていますので、<xref linkend="chapter-cross-tools"/>以降に進む前に是非注意して読んでください。 |
| 85 |
</para> |
| 86 |
@z |
| 87 |
|
| 88 |
%@x |
| 89 |
% <para><xref linkend="chapter-temporary-tools"/> explains the |
| 90 |
% installation of a number of packages that will form the basic |
| 91 |
% development suite (or toolchain) which is used to build the actual |
| 92 |
% system in <xref linkend="chapter-building-system"/>. Some of these |
| 93 |
% packages are needed to resolve circular dependencies—for example, |
| 94 |
% to compile a compiler, you need a compiler.</para> |
| 95 |
%@y |
| 96 |
% <para> |
| 97 |
% <xref linkend="chapter-temporary-tools"/>では数多くのパッケージをインストールします。 |
| 98 |
% これらは基本的な開発ツール (ツールチェーン) を構成するものであり、<xref |
| 99 |
% linkend="chapter-building-system"/>において最終的なシステムを構築するために利用します。 |
| 100 |
% パッケージの中には自分自身を循環的に必要とするような依存関係を持つものがあります。 |
| 101 |
% 例えばコンパイラーをコンパイルするためにはコンパイラーが必要となります。 |
| 102 |
% </para> |
| 103 |
%@z |
| 104 |
|
| 105 |
@x |
| 106 |
<para><xref linkend="chapter-cross-tools"/>, explains the installation of |
| 107 |
the initial tool chain, (binutils, gcc, and glibc) using cross compilation |
| 108 |
techniques to isolate the new tools from the host system.</para> |
| 109 |
@y |
| 110 |
<para><xref linkend="chapter-cross-tools"/>では初期のツールチェーン(binutils、gcc、glibc)を、クロスコンパイルによりインストールします。 |
| 111 |
これによりこの新たなツールをホストシステムから切り離します。</para> |
| 112 |
@z |
| 113 |
|
| 114 |
%@x |
| 115 |
% <para><xref linkend="chapter-temporary-tools"/> also shows you how to |
| 116 |
% build a first pass of the toolchain, including Binutils and GCC (first pass |
| 117 |
% basically means these two core packages will be reinstalled). |
| 118 |
% The next step is to build Glibc, the C library. Glibc will be compiled by |
| 119 |
% the toolchain programs built in the first pass. Then, a second pass of the |
| 120 |
% toolchain will be built. This time, the toolchain will be dynamically linked |
| 121 |
% against the newly built Glibc. The remaining <xref |
| 122 |
% linkend="chapter-temporary-tools"/> packages are built using this second |
| 123 |
% pass toolchain. When this is done, the LFS installation process will no |
| 124 |
% longer depend on the host distribution, with the exception of the running |
| 125 |
% kernel. </para> |
| 126 |
%@y |
| 127 |
% <para> |
| 128 |
% <xref linkend="chapter-temporary-tools"/>ではツールチェーンの第1回めの構築方法を示します。 |
| 129 |
% そこではまず Binutils と GCC を構築します。 |
| 130 |
% (第1回めと表現しているということは、つまりこれら2つのパッケージは後に再構築します。) |
| 131 |
% 次に C ライブラリである Glibc を構築します。 |
| 132 |
% Glibc は第1回めのツールチェーンを用いてコンパイルされます。 |
| 133 |
% そして第2回めのツールチェーン構築を行います。 |
| 134 |
% この時のツールチェーンは新たに構築した Glibc をリンクします。 |
| 135 |
% それ以降の<xref linkend="chapter-temporary-tools"/>に示すパッケージは第2回めのツールチェーンプログラムを用いて構築します。 |
| 136 |
% 上の作業をすべて終えたら LFS のインストール作業はもはやホストディストリビューションに依存しません。 |
| 137 |
% ただし作動させるカーネルだけは使い続けます。 |
| 138 |
% </para> |
| 139 |
%@z |
| 140 |
|
| 141 |
@x |
| 142 |
<para><xref linkend="chapter-temporary-tools"/> shows you how to |
| 143 |
cross-compile basic utilities using the just built cross-toolchain.</para> |
| 144 |
@y |
| 145 |
<para><xref linkend="chapter-temporary-tools"/>では、上で作ったクロスツールチェーンを利用して、基本的ユーティリティのクロスコンパイル方法を示します。</para> |
| 146 |
@z |
| 147 |
|
| 148 |
@x |
| 149 |
<para><xref linkend="chapter-chroot-temporary-tools"/> then enters a |
| 150 |
"chroot" environment and uses the previously built tools to build |
| 151 |
the additional tools needed to build and test the final system.</para> |
| 152 |
@y |
| 153 |
<para><xref linkend="chapter-chroot-temporary-tools"/>では "chroot" 環境に入ります。 |
| 154 |
そして今作り上げたビルドツールを使って、最終的なシステムをビルドしテストするために必要となる残りのツールをビルドします。</para> |
| 155 |
@z |
| 156 |
|
| 157 |
@x |
| 158 |
<para>This effort to isolate the new system from the host distribution may |
| 159 |
seem excessive. A full technical explanation as to why this is done is |
| 160 |
provided in <xref linkend="ch-tools-toolchaintechnotes"/>.</para> |
| 161 |
@y |
| 162 |
<para> |
| 163 |
ホストシステムのツール類から新しいシステムを切り離していくこの手順は、やり過ぎのように見えるかもしれません。 |
| 164 |
<xref linkend="ch-tools-toolchaintechnotes"/>にて詳細に説明しているので参照してください。 |
| 165 |
</para> |
| 166 |
@z |
| 167 |
|
| 168 |
%@x |
| 169 |
% <para>In <xref linkend="chapter-building-system"/>, the full LFS system is |
| 170 |
% built. The <command>chroot</command> (change root) program is used to enter |
| 171 |
% a virtual environment and start a new shell whose root directory will be |
| 172 |
% set to the LFS partition. This is very similar to rebooting and instructing |
| 173 |
% the kernel to mount the LFS partition as the root partition. The system |
| 174 |
% does not actually reboot, but instead uses <command>chroot</command> because |
| 175 |
% creating a bootable system requires additional work which is not necessary |
| 176 |
% just yet. The major advantage is that <quote>chrooting</quote> allows you |
| 177 |
% to continue using the host system while LFS is being built. While waiting |
| 178 |
% for package compilations to complete, you can continue using your computer as |
| 179 |
% normal.</para> |
| 180 |
%@y |
| 181 |
% <para> |
| 182 |
% <xref linkend="chapter-building-system"/>にて LFS システムが出来上がります。 |
| 183 |
% <command>chroot</command> (ルートをチェンジする) プログラムを使って仮想的な環境に入り LFS パーティション内のディレクトリをルートディレクトリとしてシェルを起動します。 |
| 184 |
% これは LFS パーティションをルートパーティションとするシステム再起動と同じことです。 |
| 185 |
% ただ実際にはシステムを再起動はしません。 |
| 186 |
% 再起動できるシステムとするためにはもう少し作業を必要としますし、この時点ではまだそれが必要ではないので <command>chroot</command> を行う方法を取ります。 |
| 187 |
% <command>chroot</command> を使うメリットは、LFS 構築作業にあたって引き続きホストシステムを利用できることです。 |
| 188 |
% パッケージをコンパイルしている最中には、通常どおり別の作業を行うことができます。 |
| 189 |
% </para> |
| 190 |
%@z |
| 191 |
|
| 192 |
@x |
| 193 |
<para>In <xref linkend="chapter-building-system"/>, The |
| 194 |
full LFS system is built. Another advantage provided by the chroot |
| 195 |
environment is that it allows you to continue using the host system |
| 196 |
while LFS is being built. While waiting for package compilations to |
| 197 |
complete, you can continue using your computer as normal.</para> |
| 198 |
@y |
| 199 |
<para><xref linkend="chapter-building-system"/>において完全な LFS システムが出来上がります。 |
| 200 |
<command>chroot</command> を使うもう一つのメリットは、LFS 構築作業にあたって引き続きホストシステムを利用できることです。 |
| 201 |
パッケージをコンパイルしている最中には、通常どおり別の作業を行うことができます。</para> |
| 202 |
@z |
| 203 |
|
| 204 |
@x |
| 205 |
<para>To finish the installation, the basic system configuration is set up in |
| 206 |
<xref linkend="chapter-config"/>, and the kernel and boot loader are set |
| 207 |
up in <xref linkend="chapter-bootable"/>. <xref linkend="chapter-finalizing"/> |
| 208 |
contains information on continuing the LFS experience beyond this book. |
| 209 |
After the steps in this book have been implemented, the computer will be |
| 210 |
ready to reboot into the new LFS system.</para> |
| 211 |
@y |
| 212 |
<para> |
| 213 |
インストールの仕上げとして<xref linkend="chapter-config"/>にてベースシステムの設定を行い、<xref linkend="chapter-bootable"/>にてカーネルとブートローダーを設定します。 |
| 214 |
<xref linkend="chapter-finalizing"/>では LFS システム構築経験を踏まえて、その先に進むための情報を示します。 |
| 215 |
本書に示す作業をすべて実施すれば、新たな LFS システムを起動することが出来ます。 |
| 216 |
</para> |
| 217 |
@z |
| 218 |
|
| 219 |
@x |
| 220 |
<para>This is the process in a nutshell. Detailed information on each |
| 221 |
step is discussed in the following chapters and package descriptions. |
| 222 |
Items that may seem complicated will be clarified, and everything will |
| 223 |
fall into place as you embark on the LFS adventure.</para> |
| 224 |
@y |
| 225 |
<para> |
| 226 |
上はごく簡単な説明にすぎません。 |
| 227 |
各作業の詳細はこれ以降の章やパッケージの説明を参照してください。 |
| 228 |
内容が難しいと思っていても、それは徐々に理解していけるはずです。 |
| 229 |
読者の皆さんには、是非 LFS アドベンチャーに挑んで頂きたいと思います。 |
| 230 |
</para> |
| 231 |
@z |